From da5140e285b06ac610d29d0e11d806273730786e Mon Sep 17 00:00:00 2001 From: Oliver Sanders Date: Mon, 11 Oct 2021 12:19:00 +0100 Subject: [PATCH] removed the installed state * 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. --- src/components/cylc/workflow/Toolbar.vue | 9 +++++++-- src/graphql/queries.js | 1 + src/model/WorkflowState.model.js | 5 +---- src/styles/cylc/_toolbar.scss | 4 ++-- src/styles/cylc/_variables.scss | 1 + 5 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/components/cylc/workflow/Toolbar.vue b/src/components/cylc/workflow/Toolbar.vue index 7acc0cb93a..b6014f881b 100644 --- a/src/components/cylc/workflow/Toolbar.vue +++ b/src/components/cylc/workflow/Toolbar.vue @@ -70,8 +70,10 @@ along with this program. If not, see . {{ svgPaths.stop }} - - + + + {{ statusMsg }} + @@ -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 diff --git a/src/graphql/queries.js b/src/graphql/queries.js index 50798e2177..ccbe0b2627 100644 --- a/src/graphql/queries.js +++ b/src/graphql/queries.js @@ -29,6 +29,7 @@ fragment WorkflowData on Workflow { id name status + statusMsg owner host port diff --git a/src/model/WorkflowState.model.js b/src/model/WorkflowState.model.js index 47455693b1..c151e3df33 100644 --- a/src/model/WorkflowState.model.js +++ b/src/model/WorkflowState.model.js @@ -22,8 +22,7 @@ import { mdiPauseCircle, mdiPlayCircle, mdiSkipNextCircle, - mdiStopCircle, - mdiFolderPlus + mdiStopCircle } from '@mdi/js' /** @@ -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() @@ -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] ]) diff --git a/src/styles/cylc/_toolbar.scss b/src/styles/cylc/_toolbar.scss index 25c42acf07..1415286a69 100644 --- a/src/styles/cylc/_toolbar.scss +++ b/src/styles/cylc/_toolbar.scss @@ -45,8 +45,8 @@ padding-right: 0.5rem; } - span { - color: $font-default-color; + .status-msg { + color: $font-dimished-color; } .add-view { diff --git a/src/styles/cylc/_variables.scss b/src/styles/cylc/_variables.scss index e947127631..872ecfa0a2 100644 --- a/src/styles/cylc/_variables.scss +++ b/src/styles/cylc/_variables.scss @@ -18,3 +18,4 @@ $brand-success: #BDD5F7; $font-default-color: #448AFF; +$font-dimished-color: #707070;