File tree Expand file tree Collapse file tree 4 files changed +5
-22
lines changed
tests/unit/components/cylc Expand file tree Collapse file tree 4 files changed +5
-22
lines changed Original file line number Diff line number Diff line change 1
- import { mapState } from 'vuex'
2
-
3
- /**
1
+ /*
4
2
* Copyright (C) NIWA & British Crown (Met Office) & Contributors.
5
3
*
6
4
* This program is free software: you can redistribute it and/or modify
@@ -17,15 +15,18 @@ import { mapState } from 'vuex'
17
15
* along with this program. If not, see <http://www.gnu.org/licenses/>.
18
16
*/
19
17
18
+ import { mapState } from 'vuex'
19
+
20
20
/**
21
21
* A mixin that contains data used for a GraphQL subscription, such as the
22
22
* query variables.
23
23
*
24
- * To be used in Views that are bound to VueRouter routes that contain the
24
+ * To be used in Views that are bound to Vue-Router routes that contain the
25
25
* :workflowName param.
26
26
*/
27
27
export default {
28
28
props : {
29
+ /** This is set by vue-router */
29
30
workflowName : {
30
31
type : String ,
31
32
required : true
Original file line number Diff line number Diff line change @@ -90,15 +90,12 @@ router.beforeEach(async (to, from) => {
90
90
91
91
// Set toolbar title:
92
92
let title = to . name
93
- let workflowName = null
94
93
if ( to . meta . toolbar ) {
95
94
// When a workflow is being displayed, we set the title to a
96
95
// different value.
97
96
title = to . params . workflowName
98
- workflowName = to . params . workflowName
99
97
}
100
98
store . commit ( 'app/setTitle' , title )
101
- store . commit ( 'workflows/SET_WORKFLOW_NAME' , workflowName )
102
99
store . dispatch ( 'setAlert' , null )
103
100
} )
104
101
Original file line number Diff line number Diff line change @@ -33,16 +33,6 @@ const state = () => ({
33
33
$index : { } ,
34
34
children : [ ]
35
35
} ,
36
- /**
37
- * This holds the name of the current workflow. This is set by VueRouter
38
- * and is used to decide what's the current workflow. It is used in conjunction
39
- * with the workflows/workflows (above) when finding the current workflow and
40
- * using it, for instance, to create the GraphQL variables of a workflow
41
- * view (see mixins used in the Tree View).
42
- *
43
- * @type {String }
44
- */
45
- workflowName : null
46
36
} )
47
37
48
38
const getters = {
@@ -475,10 +465,6 @@ function remove (state, prunedID) {
475
465
}
476
466
477
467
const mutations = {
478
- // the old callback methods
479
- SET_WORKFLOW_NAME ( state , data ) {
480
- state . workflowName = data
481
- } ,
482
468
// the new cylc tree methods
483
469
CREATE : createTree ,
484
470
UPDATE : update ,
Original file line number Diff line number Diff line change @@ -48,7 +48,6 @@ describe('Toolbar component', () => {
48
48
status : WorkflowState . RUNNING . name
49
49
}
50
50
]
51
- store . state . workflows . workflowName = 'test'
52
51
} )
53
52
54
53
it ( 'should mount the component' , async ( ) => {
You can’t perform that action at this time.
0 commit comments