Commit 1bf74bfd authored by Filipa Lacerda's avatar Filipa Lacerda

Moves string to a constant

parent f4aced6f
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
import CommitComponent from '../../vue_shared/components/commit.vue'; import CommitComponent from '../../vue_shared/components/commit.vue';
import LoadingButton from '../../vue_shared/components/loading_button.vue'; import LoadingButton from '../../vue_shared/components/loading_button.vue';
import Icon from '../../vue_shared/components/icon.vue'; import Icon from '../../vue_shared/components/icon.vue';
import { PIPELINES_TABLE } from '../constants.js'
/** /**
* Pipeline table row. * Pipeline table row.
...@@ -46,6 +47,7 @@ ...@@ -46,6 +47,7 @@
required: true, required: true,
}, },
}, },
pipelinesTable: PIPELINES_TABLE,
data() { data() {
return { return {
isRetrying: false, isRetrying: false,
...@@ -297,7 +299,7 @@ ...@@ -297,7 +299,7 @@
v-for="(stage, index) in pipeline.details.stages" v-for="(stage, index) in pipeline.details.stages"
:key="index"> :key="index">
<pipeline-stage <pipeline-stage
type="PIPELINES_TABLE" :type="$options.pipelinesTable"
:stage="stage" :stage="stage"
:update-dropdown="updateGraphDropdown" :update-dropdown="updateGraphDropdown"
/> />
......
...@@ -21,6 +21,7 @@ import Icon from '../../vue_shared/components/icon.vue'; ...@@ -21,6 +21,7 @@ import Icon from '../../vue_shared/components/icon.vue';
import LoadingIcon from '../../vue_shared/components/loading_icon.vue'; import LoadingIcon from '../../vue_shared/components/loading_icon.vue';
import JobComponent from './graph/job_component.vue'; import JobComponent from './graph/job_component.vue';
import tooltip from '../../vue_shared/directives/tooltip'; import tooltip from '../../vue_shared/directives/tooltip';
import { PIPELINES_TABLE } from '../constants.js'
export default { export default {
components: { components: {
...@@ -141,7 +142,7 @@ export default { ...@@ -141,7 +142,7 @@ export default {
}, },
pipelineActionRequestComplete() { pipelineActionRequestComplete() {
if (this.type === 'PIPELINES_TABLE') { if (this.type === PIPELINES_TABLE) {
// warn the table to update // warn the table to update
eventHub.$emit('refreshPipelinesTable'); eventHub.$emit('refreshPipelinesTable');
} else { } else {
......
// eslint-disable-next-line import/prefer-default-export
export const CANCEL_REQUEST = 'CANCEL_REQUEST'; export const CANCEL_REQUEST = 'CANCEL_REQUEST';
export const PIPELINES_TABLE = 'PIPELINES_TABLE';
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment