Skip to content

Commit b0204f2

Browse files
committed
Remove unused code & tidy
1 parent b16d196 commit b0204f2

File tree

4 files changed

+5
-22
lines changed

4 files changed

+5
-22
lines changed

src/mixins/graphql.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
import { mapState } from 'vuex'
2-
3-
/**
1+
/*
42
* Copyright (C) NIWA & British Crown (Met Office) & Contributors.
53
*
64
* This program is free software: you can redistribute it and/or modify
@@ -17,15 +15,18 @@ import { mapState } from 'vuex'
1715
* along with this program. If not, see <http://www.gnu.org/licenses/>.
1816
*/
1917

18+
import { mapState } from 'vuex'
19+
2020
/**
2121
* A mixin that contains data used for a GraphQL subscription, such as the
2222
* query variables.
2323
*
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
2525
* :workflowName param.
2626
*/
2727
export default {
2828
props: {
29+
/** This is set by vue-router */
2930
workflowName: {
3031
type: String,
3132
required: true

src/router/index.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,15 +90,12 @@ router.beforeEach(async (to, from) => {
9090

9191
// Set toolbar title:
9292
let title = to.name
93-
let workflowName = null
9493
if (to.meta.toolbar) {
9594
// When a workflow is being displayed, we set the title to a
9695
// different value.
9796
title = to.params.workflowName
98-
workflowName = to.params.workflowName
9997
}
10098
store.commit('app/setTitle', title)
101-
store.commit('workflows/SET_WORKFLOW_NAME', workflowName)
10299
store.dispatch('setAlert', null)
103100
})
104101

src/store/workflows.module.js

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,6 @@ const state = () => ({
3333
$index: {},
3434
children: []
3535
},
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
4636
})
4737

4838
const getters = {
@@ -475,10 +465,6 @@ function remove (state, prunedID) {
475465
}
476466

477467
const mutations = {
478-
// the old callback methods
479-
SET_WORKFLOW_NAME (state, data) {
480-
state.workflowName = data
481-
},
482468
// the new cylc tree methods
483469
CREATE: createTree,
484470
UPDATE: update,

tests/unit/components/cylc/toolbar.vue.spec.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ describe('Toolbar component', () => {
4848
status: WorkflowState.RUNNING.name
4949
}
5050
]
51-
store.state.workflows.workflowName = 'test'
5251
})
5352

5453
it('should mount the component', async () => {

0 commit comments

Comments
 (0)