diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-17 18:09:01 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-17 18:09:01 +0300 |
commit | d88ab3545c27cd674f5fb8bff5fb64a9eeed590f (patch) | |
tree | c0c6cc7065a765a6c93d67cebbe0dd16431296bd /app/assets/javascripts/pipelines | |
parent | f0a387b4a5f08d6739894455664b4d3cb1509cc6 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/pipelines')
-rw-r--r-- | app/assets/javascripts/pipelines/components/header_component.vue | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/app/assets/javascripts/pipelines/components/header_component.vue b/app/assets/javascripts/pipelines/components/header_component.vue index afe624928af..37878f3fb6d 100644 --- a/app/assets/javascripts/pipelines/components/header_component.vue +++ b/app/assets/javascripts/pipelines/components/header_component.vue @@ -93,6 +93,7 @@ export default { data() { return { pipeline: null, + failureMessages: [], failureType: null, isCanceling: false, isRetrying: false, @@ -159,8 +160,9 @@ export default { }, }, methods: { - reportFailure(errorType) { + reportFailure(errorType, errorMessages = []) { this.failureType = errorType; + this.failureMessages = errorMessages; }, async postPipelineAction(name, mutation) { try { @@ -176,7 +178,7 @@ export default { if (errors.length > 0) { this.isRetrying = false; - this.reportFailure(POST_FAILURE); + this.reportFailure(POST_FAILURE, errors); } else { await this.$apollo.queries.pipeline.refetch(); if (!this.isFinished) { @@ -214,7 +216,7 @@ export default { }); if (errors.length > 0) { - this.reportFailure(DELETE_FAILURE); + this.reportFailure(DELETE_FAILURE, errors); this.isDeleting = false; } else { redirectTo(setUrlFragment(this.paths.pipelinesPath, 'delete_success')); @@ -231,9 +233,11 @@ export default { </script> <template> <div class="js-pipeline-header-container"> - <gl-alert v-if="hasError" :variant="failure.variant" :dismissible="false">{{ - failure.text - }}</gl-alert> + <gl-alert v-if="hasError" :title="failure.text" :variant="failure.variant" :dismissible="false"> + <div v-for="(failureMessage, index) in failureMessages" :key="`failure-message-${index}`"> + {{ failureMessage }} + </div> + </gl-alert> <ci-header v-if="shouldRenderContent" :status="pipeline.detailedStatus" |