debian-mirror-gitlab/app/assets/javascripts/pipelines/components/graph/graph_component.vue

45 lines
1.4 KiB
Vue
Raw Normal View History

2017-08-17 22:00:37 +05:30
<script>
2019-02-15 15:39:39 +05:30
import { GlLoadingIcon } from '@gitlab/ui';
2018-05-09 12:01:36 +05:30
import StageColumnComponent from './stage_column_component.vue';
2019-03-02 22:35:43 +05:30
import GraphMixin from '../../mixins/graph_component_mixin';
2019-12-04 20:38:33 +05:30
import GraphWidthMixin from '~/pipelines/mixins/graph_width_mixin';
2017-08-17 22:00:37 +05:30
2018-05-09 12:01:36 +05:30
export default {
components: {
StageColumnComponent,
2018-12-13 13:39:08 +05:30
GlLoadingIcon,
2018-05-09 12:01:36 +05:30
},
2019-12-04 20:38:33 +05:30
mixins: [GraphMixin, GraphWidthMixin],
2018-05-09 12:01:36 +05:30
};
2017-08-17 22:00:37 +05:30
</script>
<template>
<div class="build-content middle-block js-pipeline-graph">
2018-03-27 19:54:05 +05:30
<div class="pipeline-visualization pipeline-graph pipeline-tab-content">
2019-12-04 20:38:33 +05:30
<div
:style="{
paddingLeft: `${graphLeftPadding}px`,
paddingRight: `${graphRightPadding}px`,
}"
>
<gl-loading-icon v-if="isLoading" class="m-auto" :size="3" />
2017-08-17 22:00:37 +05:30
2019-12-04 20:38:33 +05:30
<ul v-if="!isLoading" class="stage-column-list">
<stage-column-component
v-for="(stage, index) in graph"
:key="stage.name"
:class="{
'append-right-48': shouldAddRightMargin(index),
}"
:title="capitalizeStageName(stage.name)"
:groups="stage.groups"
:stage-connector-class="stageConnectorClass(index, stage)"
:is-first-column="isFirstColumn(index)"
:action="stage.status.action"
@refreshPipelineGraph="refreshPipelineGraph"
/>
</ul>
</div>
2017-08-17 22:00:37 +05:30
</div>
</div>
</template>