Commit f14432c7 authored by Martin Wortschack's avatar Martin Wortschack

Merge branch 'remove-downstream-node-lines' into 'master'

Remove downstream pipeline connecting lines (1/3)

See merge request gitlab-org/gitlab!21196
parents 4b9a82a6 6735658c
...@@ -100,9 +100,6 @@ export default { ...@@ -100,9 +100,6 @@ export default {
hasOnlyOneJob(stage) { hasOnlyOneJob(stage) {
return stage.groups.length === 1; return stage.groups.length === 1;
}, },
hasDownstream(index, length) {
return index === length - 1 && this.hasTriggered;
},
hasUpstream(index) { hasUpstream(index) {
return index === 0 && this.hasTriggeredBy; return index === 0 && this.hasTriggeredBy;
}, },
...@@ -160,7 +157,6 @@ export default { ...@@ -160,7 +157,6 @@ export default {
:key="stage.name" :key="stage.name"
:class="{ :class="{
'has-upstream prepend-left-64': hasUpstream(index), 'has-upstream prepend-left-64': hasUpstream(index),
'has-downstream': hasDownstream(index, graph.length),
'has-only-one-job': hasOnlyOneJob(stage), 'has-only-one-job': hasOnlyOneJob(stage),
'append-right-46': shouldAddRightMargin(index), 'append-right-46': shouldAddRightMargin(index),
}" }"
......
<script> <script>
import LinkedPipeline from './linked_pipeline.vue'; import LinkedPipeline from './linked_pipeline.vue';
import { __ } from '~/locale';
export default { export default {
components: { components: {
...@@ -27,6 +28,9 @@ export default { ...@@ -27,6 +28,9 @@ export default {
}; };
return `graph-position-${this.graphPosition} ${positionValues[this.graphPosition]}`; return `graph-position-${this.graphPosition} ${positionValues[this.graphPosition]}`;
}, },
isUpstream() {
return this.columnTitle === __('Upstream');
},
}, },
}; };
</script> </script>
...@@ -34,13 +38,12 @@ export default { ...@@ -34,13 +38,12 @@ export default {
<template> <template>
<div :class="columnClass" class="stage-column linked-pipelines-column"> <div :class="columnClass" class="stage-column linked-pipelines-column">
<div class="stage-name linked-pipelines-column-title">{{ columnTitle }}</div> <div class="stage-name linked-pipelines-column-title">{{ columnTitle }}</div>
<div class="cross-project-triangle"></div> <div v-if="isUpstream" class="cross-project-triangle"></div>
<ul> <ul>
<linked-pipeline <linked-pipeline
v-for="(pipeline, index) in linkedPipelines" v-for="(pipeline, index) in linkedPipelines"
:key="pipeline.id" :key="pipeline.id"
:class="{ :class="{
'flat-connector-before': index === 0 && graphPosition === 'right',
active: pipeline.isExpanded, active: pipeline.isExpanded,
'left-connector': pipeline.isExpanded && graphPosition === 'left', 'left-connector': pipeline.isExpanded && graphPosition === 'left',
}" }"
......
---
title: Remove downstream pipeline connecting lines
merge_request: 21196
author:
type: removed
...@@ -35,4 +35,8 @@ describe('Linked Pipelines Column', () => { ...@@ -35,4 +35,8 @@ describe('Linked Pipelines Column', () => {
expect(linkedPipelineElements.length).toBe(props.linkedPipelines.length); expect(linkedPipelineElements.length).toBe(props.linkedPipelines.length);
}); });
it('renders cross project triangle when column is upstream', () => {
expect(vm.$el.querySelector('.cross-project-triangle')).toBeDefined();
});
}); });
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