Skip to content

Commit d0dcb03

Browse files
committed
Add workflow Cylc version to toolbar and menu
1 parent 918a943 commit d0dcb03

File tree

4 files changed

+15
-4
lines changed

4 files changed

+15
-4
lines changed

src/components/cylc/commandMenu/Menu.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,9 @@ export default {
226226
ret += ''
227227
if (this.node.type === 'workflow') {
228228
ret += upperFirst(this.node.node.statusMsg || this.node.node.status || 'state unknown')
229+
if (this.node.node.cylcVersion) {
230+
ret += ` • Cylc ${this.node.node.cylcVersion}`
231+
}
229232
} else {
230233
ret += upperFirst(this.node.node.state || 'state unknown')
231234
if (this.node.node.isHeld) {

src/components/cylc/workspace/Toolbar.vue

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
125125
</v-chip>
126126

127127
<!-- workflow status message -->
128-
<span class="status-msg text-md-body-1 text-body-2">
129-
{{ statusMsg }}
128+
<span class="status-msg text-body-2">
129+
{{ statusAndVersion }}
130130
</span>
131131

132132
<v-spacer class="mx-0" />
@@ -221,6 +221,7 @@ import subscriptionComponentMixin from '@/mixins/subscriptionComponent'
221221
import SubscriptionQuery from '@/model/SubscriptionQuery.model'
222222
import gql from 'graphql-tag'
223223
import { eventBus } from '@/services/eventBus'
224+
import { upperFirst } from 'lodash-es'
224225
225226
const QUERY = gql(`
226227
subscription Workflow ($workflowId: ID) {
@@ -242,6 +243,7 @@ fragment WorkflowData on Workflow {
242243
status
243244
statusMsg
244245
nEdgeDistance
246+
cylcVersion
245247
}
246248
247249
fragment AddedDelta on Added {
@@ -341,8 +343,12 @@ export default {
341343
this.currentWorkflow.node.status === WorkflowState.STOPPED.name
342344
)
343345
},
344-
statusMsg () {
345-
return this.currentWorkflow.node.statusMsg || ''
346+
statusAndVersion () {
347+
let ret = upperFirst(this.currentWorkflow.node.statusMsg || '')
348+
if (this.currentWorkflow.node.cylcVersion) {
349+
ret += ` • Cylc ${this.currentWorkflow.node.cylcVersion}`
350+
}
351+
return ret
346352
},
347353
enabled () {
348354
// object holding the states of controls that are supposed to be enabled

src/services/mock/json/workflows/multi.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
"statusMsg": "paused",
6666
"owner": "user",
6767
"host": "ncc1701.starfleet.gov",
68+
"cylcVersion": "8.5.0.dev",
6869
"port": 43078,
6970
"stateTotals": {
7071
"waiting": 2,

src/services/mock/json/workflows/one.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"owner": "user",
88
"host": "localhost",
99
"port": 43079,
10+
"cylcVersion": "8.4.2",
1011
"status": "running",
1112
"statusMsg": "running",
1213
"stateTotals": {

0 commit comments

Comments
 (0)