summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/pipelines/components/graph/linked_pipelines_column.vue
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-02-18 10:34:06 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-02-18 10:34:06 +0000
commit859a6fb938bb9ee2a317c46dfa4fcc1af49608f0 (patch)
treed7f2700abe6b4ffcb2dcfc80631b2d87d0609239 /app/assets/javascripts/pipelines/components/graph/linked_pipelines_column.vue
parent446d496a6d000c73a304be52587cd9bbc7493136 (diff)
downloadgitlab-ce-859a6fb938bb9ee2a317c46dfa4fcc1af49608f0.tar.gz
Add latest changes from gitlab-org/gitlab@13-9-stable-eev13.9.0-rc42
Diffstat (limited to 'app/assets/javascripts/pipelines/components/graph/linked_pipelines_column.vue')
-rw-r--r--app/assets/javascripts/pipelines/components/graph/linked_pipelines_column.vue32
1 files changed, 22 insertions, 10 deletions
diff --git a/app/assets/javascripts/pipelines/components/graph/linked_pipelines_column.vue b/app/assets/javascripts/pipelines/components/graph/linked_pipelines_column.vue
index 40e6a01b88c..3ce77a1c60a 100644
--- a/app/assets/javascripts/pipelines/components/graph/linked_pipelines_column.vue
+++ b/app/assets/javascripts/pipelines/components/graph/linked_pipelines_column.vue
@@ -1,8 +1,8 @@
<script>
import getPipelineDetails from 'shared_queries/pipelines/get_pipeline_details.query.graphql';
-import LinkedPipeline from './linked_pipeline.vue';
import { LOAD_FAILURE } from '../../constants';
-import { UPSTREAM } from './constants';
+import { ONE_COL_WIDTH, UPSTREAM } from './constants';
+import LinkedPipeline from './linked_pipeline.vue';
import { unwrapPipelineData, toggleQueryPollingByVisibility, reportToSentry } from './utils';
export default {
@@ -39,6 +39,7 @@ export default {
'gl-pl-3',
'gl-mb-5',
],
+ minWidth: `${ONE_COL_WIDTH}px`,
computed: {
columnClass() {
const positionValues = {
@@ -47,12 +48,6 @@ export default {
};
return `graph-position-${this.graphPosition} ${positionValues[this.graphPosition]}`;
},
- graphPosition() {
- return this.isUpstream ? 'left' : 'right';
- },
- isUpstream() {
- return this.type === UPSTREAM;
- },
computedTitleClasses() {
const positionalClasses = this.isUpstream
? ['gl-w-full', 'gl-text-right', 'gl-linked-pipeline-padding']
@@ -60,6 +55,15 @@ export default {
return [...this.$options.titleClasses, ...positionalClasses];
},
+ graphPosition() {
+ return this.isUpstream ? 'left' : 'right';
+ },
+ isUpstream() {
+ return this.type === UPSTREAM;
+ },
+ minWidth() {
+ return this.isUpstream ? 0 : this.$options.minWidth;
+ },
},
methods: {
getPipelineData(pipeline) {
@@ -79,6 +83,7 @@ export default {
},
result() {
this.loadingPipelineId = null;
+ this.$emit('scrollContainer');
},
error(err, _vm, _key, type) {
this.$emit('error', LOAD_FAILURE);
@@ -130,6 +135,9 @@ export default {
this.$emit('pipelineExpandToggle', jobName, expanded);
},
+ showContainer(id) {
+ return this.isExpanded(id) || this.isLoadingPipeline(id);
+ },
},
};
</script>
@@ -158,9 +166,13 @@ export default {
@pipelineClicked="onPipelineClick(pipeline)"
@pipelineExpandToggle="onPipelineExpandToggle"
/>
- <div v-if="isExpanded(pipeline.id)" class="gl-display-inline-block">
+ <div
+ v-if="showContainer(pipeline.id)"
+ :style="{ minWidth }"
+ class="gl-display-inline-block"
+ >
<pipeline-graph
- v-if="currentPipeline"
+ v-if="isExpanded(pipeline.id)"
:type="type"
class="d-inline-block gl-mt-n2"
:pipeline="currentPipeline"