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 committed Oct 11, 2021
1 parent bc7f5ff commit da5140e
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 8 deletions.
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 style="padding-left: 1rem;">
{{ 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
4 changes: 2 additions & 2 deletions src/styles/cylc/_toolbar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@
padding-right: 0.5rem;
}

span {
color: $font-default-color;
.status-msg {
color: $font-dimished-color;
}

.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 da5140e

Please sign in to comment.