Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-01-12 21:11:03 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-01-12 21:11:03 +0300
commit141ef7e93971ca11f404065554f6cc1e43e46a80 (patch)
treef34b72081b7cb7eb25dbf7dc7900bb95c98606d4 /app/assets/javascripts/pipelines
parent84dd3070dff9e36897345bbfd8dc1bf3470376ae (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/pipelines')
-rw-r--r--app/assets/javascripts/pipelines/components/pipeline_graph/pipeline_graph.vue31
1 files changed, 10 insertions, 21 deletions
diff --git a/app/assets/javascripts/pipelines/components/pipeline_graph/pipeline_graph.vue b/app/assets/javascripts/pipelines/components/pipeline_graph/pipeline_graph.vue
index 1ac2802c367..8e46df094cb 100644
--- a/app/assets/javascripts/pipelines/components/pipeline_graph/pipeline_graph.vue
+++ b/app/assets/javascripts/pipelines/components/pipeline_graph/pipeline_graph.vue
@@ -126,33 +126,22 @@ export default {
},
},
watch: {
- isPipelineDataEmpty: {
+ pipelineData: {
immediate: true,
- handler(isDataEmpty) {
- if (isDataEmpty) {
+ handler() {
+ if (this.isPipelineDataEmpty) {
this.reportFailure(EMPTY_PIPELINE_DATA);
- }
- },
- },
- isInvalidCiConfig: {
- immediate: true,
- handler(isInvalid) {
- if (isInvalid) {
+ } else if (this.isInvalidCiConfig) {
this.reportFailure(INVALID_CI_CONFIG);
+ } else {
+ this.$nextTick(() => {
+ this.computeGraphDimensions();
+ this.prepareLinkData();
+ });
}
},
},
},
- mounted() {
- if (!this.isPipelineDataEmpty && !this.isInvalidCiConfig) {
- // This guarantee that all sub-elements are rendered
- // https://v3.vuejs.org/api/options-lifecycle-hooks.html#mounted
- this.$nextTick(() => {
- this.getGraphDimensions();
- this.prepareLinkData();
- });
- }
- },
methods: {
prepareLinkData() {
try {
@@ -194,7 +183,7 @@ export default {
removeHighlightNeeds() {
this.highlightedJob = null;
},
- getGraphDimensions() {
+ computeGraphDimensions() {
this.width = `${this.$refs[this.$options.CONTAINER_REF].scrollWidth}`;
this.height = `${this.$refs[this.$options.CONTAINER_REF].scrollHeight}`;
},