Skip to content

Commit

Permalink
removed the installed state
Browse files Browse the repository at this point in the history
* The installed state was the same as "stopped" but with the additional
  information that the workflow had not yet been run.
* Added this information to the workflow status message in cylc-uiserver
  (as it is offline information).
* Improved the workflow status message provided by cylc-flow.
* Put the status message into the UI toolbar.
  • Loading branch information
oliver-sanders authored and hjoliver committed Oct 15, 2021
1 parent 0d50dba commit eacb1f0
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 9 deletions.
1 change: 1 addition & 0 deletions src/components/cylc/gscan/GScan.vue
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<span class="mr-2">
<workflow-icon
:status="scope.node.node.status"
:statusMsg="scope.node.node.statusMsg"
/>
</span>
<v-tooltip top>
Expand Down
6 changes: 5 additions & 1 deletion src/components/cylc/gscan/WorkflowIcon.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
{{ getIcon() }}
</v-icon>
</template>
<span>{{ status }}</span>
<span>{{ statusMsg || status }}</span>
</v-tooltip>
</template>

Expand All @@ -42,6 +42,10 @@ export default {
status: {
required: true,
type: String
},
statusMsg: {
required: false,
type: String
}
},

Expand Down
9 changes: 7 additions & 2 deletions src/components/cylc/workflow/Toolbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
{{ svgPaths.stop }}
</v-icon>

<!-- TODO: add workflow latest message -->
<span></span>
<!-- workflow status message -->
<span class="status-msg">
{{ statusMsg }}
</span>

<v-spacer />

Expand Down Expand Up @@ -181,6 +183,9 @@ export default {
this.currentWorkflow.status === WorkflowState.STOPPED.name
)
},
statusMsg () {
return this.currentWorkflow.statusMsg || ''
},
enabled () {
// object holding the states of controls that are supposed to be enabled
// NOTE: this is a temporary solution until we are able to subscribe to
Expand Down
1 change: 1 addition & 0 deletions src/graphql/queries.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ fragment WorkflowData on Workflow {
id
name
status
statusMsg
owner
host
port
Expand Down
5 changes: 1 addition & 4 deletions src/model/WorkflowState.model.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ import {
mdiPauseCircle,
mdiPlayCircle,
mdiSkipNextCircle,
mdiStopCircle,
mdiFolderPlus
mdiStopCircle
} from '@mdi/js'

/**
Expand All @@ -34,7 +33,6 @@ export class WorkflowState extends Enumify {
static PAUSED = new WorkflowState('paused', mdiPauseCircle)
static STOPPING = new WorkflowState('stopping', mdiSkipNextCircle)
static STOPPED = new WorkflowState('stopped', mdiStopCircle)
static INSTALLED = new WorkflowState('installed', mdiFolderPlus)
static ERROR = new WorkflowState('error', mdiHelpCircle)
static _ = this.closeEnum()

Expand All @@ -60,7 +58,6 @@ export const WorkflowStateOrder = new Map([
[WorkflowState.PAUSED.name, 0],
[WorkflowState.STOPPING.name, 0],
[WorkflowState.STOPPED.name, 1],
[WorkflowState.INSTALLED.name, 2],
[WorkflowState.ERROR.name, 3]
])

Expand Down
5 changes: 3 additions & 2 deletions src/styles/cylc/_toolbar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,9 @@
padding-right: 0.5rem;
}

span {
color: $font-default-color;
.status-msg {
color: $font-dimished-color;
padding-left: 1rem;
}

.add-view {
Expand Down
1 change: 1 addition & 0 deletions src/styles/cylc/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@
$brand-success: #BDD5F7;

$font-default-color: #448AFF;
$font-dimished-color: #707070;

0 comments on commit eacb1f0

Please sign in to comment.