Commit 04ef39c2 authored by Bryce Johnson's avatar Bryce Johnson

Move linkedPipelineClass logic to template.

parent 81118dd7
...@@ -63,19 +63,6 @@ ...@@ -63,19 +63,6 @@
className = 'left-margin'; className = 'left-margin';
} }
return className;
},
linkedPipelineClass(index) {
let className = '';
const isFirstStage = index === 0;
const isLastStage = index === this.graph.length - 1;
if (isFirstStage && this.hasTriggeredBy) {
className += 'has-upstream';
} else if (isLastStage && this.hasTriggered) {
className += 'has-downstream';
}
return className; return className;
}, },
}, },
...@@ -100,11 +87,13 @@ ...@@ -100,11 +87,13 @@
<ul <ul
v-if="!isLoading" v-if="!isLoading"
class="stage-column-list" class="stage-column-list">
:class="linkedPipelinesClass">
<stage-column-component <stage-column-component
v-for="(stage, index) in graph" v-for="(stage, index) in graph"
:class="linkedPipelineClass(index)" :class="{
'has-upstream': index === 0 && hasTriggeredBy,
'has-downstream': index === graph.length - 1 && hasTriggered
}"
:title="capitalizeStageName(stage.name)" :title="capitalizeStageName(stage.name)"
:jobs="stage.groups" :jobs="stage.groups"
:key="stage.name" :key="stage.name"
......
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