diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-08 12:09:43 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-08 12:09:43 +0300 |
commit | f5050253469fc0961c02deec0e698ad62bdd9de5 (patch) | |
tree | 30bbd8f8b556fd5b730f0123921138ee1d6bdaa2 /app/assets/javascripts/pipelines/components | |
parent | f6cdec670b9b757fc2225a2c6627ab79765e5b8a (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/pipelines/components')
-rw-r--r-- | app/assets/javascripts/pipelines/components/graph/graph_component.vue | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/app/assets/javascripts/pipelines/components/graph/graph_component.vue b/app/assets/javascripts/pipelines/components/graph/graph_component.vue index 6a836adba01..ef3f4d0e3f6 100644 --- a/app/assets/javascripts/pipelines/components/graph/graph_component.vue +++ b/app/assets/javascripts/pipelines/components/graph/graph_component.vue @@ -99,7 +99,17 @@ export default { downstreamNode.classList.contains('child-pipeline') ? 15 : 30, ); - this.$emit('onClickTriggered', this.pipeline, pipeline); + /** + * If the expanded trigger is defined and the id is different than the + * pipeline we clicked, then it means we clicked on a sibling downstream link + * and we want to reset the pipeline store. Triggering the reset without + * this condition would mean not allowing downstreams of downstreams to expand + */ + if (this.expandedTriggered?.id !== pipeline.id) { + this.$emit('onResetTriggered', this.pipeline, pipeline); + } + + this.$emit('onClickTriggered', pipeline); }, calculateMarginTop(downstreamNode, pixelDiff) { return `${downstreamNode.offsetTop - downstreamNode.offsetParent.offsetTop - pixelDiff}px`; @@ -136,9 +146,7 @@ export default { :pipeline="expandedTriggeredBy" :is-linked-pipeline="true" :mediator="mediator" - @onClickTriggeredBy=" - (parentPipeline, pipeline) => clickTriggeredByPipeline(parentPipeline, pipeline) - " + @onClickTriggeredBy="clickTriggeredByPipeline" @refreshPipelineGraph="requestRefreshPipelineGraph" /> @@ -148,9 +156,7 @@ export default { :column-title="__('Upstream')" :project-id="pipelineProjectId" graph-position="left" - @linkedPipelineClick=" - linkedPipeline => $emit('onClickTriggeredBy', pipeline, linkedPipeline) - " + @linkedPipelineClick="$emit('onClickTriggeredBy', $event)" /> <ul @@ -197,9 +203,7 @@ export default { :is-linked-pipeline="true" :style="{ 'margin-top': downstreamMarginTop }" :mediator="mediator" - @onClickTriggered=" - (parentPipeline, pipeline) => clickTriggeredPipeline(parentPipeline, pipeline) - " + @onClickTriggered="clickTriggeredPipeline" @refreshPipelineGraph="requestRefreshPipelineGraph" /> </div> |