2017-05-06 17:02:06 +00:00
|
|
|
<script>
|
2018-06-28 14:25:49 +00:00
|
|
|
import _ from 'underscore';
|
2018-10-17 11:11:52 +00:00
|
|
|
import JobItem from './job_item.vue';
|
|
|
|
import JobGroupDropdown from './job_group_dropdown.vue';
|
2017-05-06 17:02:06 +00:00
|
|
|
|
2018-04-06 15:42:19 +00:00
|
|
|
export default {
|
|
|
|
components: {
|
2018-10-17 11:11:52 +00:00
|
|
|
JobItem,
|
|
|
|
JobGroupDropdown,
|
2018-04-06 15:42:19 +00:00
|
|
|
},
|
|
|
|
props: {
|
|
|
|
title: {
|
|
|
|
type: String,
|
|
|
|
required: true,
|
2017-05-06 17:02:06 +00:00
|
|
|
},
|
2018-10-17 11:11:52 +00:00
|
|
|
groups: {
|
2018-04-06 15:42:19 +00:00
|
|
|
type: Array,
|
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
isFirstColumn: {
|
|
|
|
type: Boolean,
|
|
|
|
required: false,
|
|
|
|
default: false,
|
|
|
|
},
|
|
|
|
stageConnectorClass: {
|
|
|
|
type: String,
|
|
|
|
required: false,
|
|
|
|
default: '',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
methods: {
|
2018-10-17 11:11:52 +00:00
|
|
|
groupId(group) {
|
|
|
|
return `ci-badge-${_.escape(group.name)}`;
|
2018-04-06 15:42:19 +00:00
|
|
|
},
|
|
|
|
buildConnnectorClass(index) {
|
|
|
|
return index === 0 && !this.isFirstColumn ? 'left-connector' : '';
|
2017-05-08 14:53:54 +00:00
|
|
|
},
|
2018-05-15 15:55:07 +00:00
|
|
|
pipelineActionRequestComplete() {
|
|
|
|
this.$emit('refreshPipelineGraph');
|
|
|
|
},
|
2018-04-06 15:42:19 +00:00
|
|
|
},
|
|
|
|
};
|
2017-05-06 17:02:06 +00:00
|
|
|
</script>
|
|
|
|
<template>
|
2017-05-08 14:53:54 +00:00
|
|
|
<li
|
2018-06-11 09:49:47 +00:00
|
|
|
:class="stageConnectorClass"
|
2018-11-12 21:22:19 +00:00
|
|
|
class="stage-column"
|
|
|
|
>
|
2017-05-06 17:02:06 +00:00
|
|
|
<div class="stage-name">
|
2018-01-05 00:18:35 +00:00
|
|
|
{{ title }}
|
2017-05-06 17:02:06 +00:00
|
|
|
</div>
|
|
|
|
<div class="builds-container">
|
|
|
|
<ul>
|
|
|
|
<li
|
2018-10-17 11:11:52 +00:00
|
|
|
v-for="(group, index) in groups"
|
|
|
|
:id="groupId(group)"
|
|
|
|
:key="group.id"
|
2017-05-08 14:53:54 +00:00
|
|
|
:class="buildConnnectorClass(index)"
|
2018-06-11 09:49:47 +00:00
|
|
|
class="build"
|
2018-01-05 00:18:35 +00:00
|
|
|
>
|
2017-05-06 17:02:06 +00:00
|
|
|
|
|
|
|
<div class="curve"></div>
|
|
|
|
|
2018-10-17 11:11:52 +00:00
|
|
|
<job-item
|
|
|
|
v-if="group.size === 1"
|
|
|
|
:job="group.jobs[0]"
|
2017-05-06 17:02:06 +00:00
|
|
|
css-class-job-name="build-content"
|
2018-05-15 15:55:07 +00:00
|
|
|
@pipelineActionRequestComplete="pipelineActionRequestComplete"
|
2018-01-05 00:18:35 +00:00
|
|
|
/>
|
2017-05-06 17:02:06 +00:00
|
|
|
|
2018-10-17 11:11:52 +00:00
|
|
|
<job-group-dropdown
|
|
|
|
v-if="group.size > 1"
|
|
|
|
:group="group"
|
2018-05-15 15:55:07 +00:00
|
|
|
@pipelineActionRequestComplete="pipelineActionRequestComplete"
|
2018-01-05 00:18:35 +00:00
|
|
|
/>
|
2017-05-06 17:02:06 +00:00
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
</template>
|