diff --git a/app/assets/javascripts/ci/merge_requests/graphql/queries/get_pipeline_creation_requests.query.graphql b/app/assets/javascripts/ci/merge_requests/graphql/queries/get_pipeline_creation_requests.query.graphql new file mode 100644 index 0000000000000000000000000000000000000000..f01e63570868492f5ac336a4fdefac045d897ad8 --- /dev/null +++ b/app/assets/javascripts/ci/merge_requests/graphql/queries/get_pipeline_creation_requests.query.graphql @@ -0,0 +1,22 @@ +#import "~/ci/pipelines_page/graphql/fragments/pipeline_details.fragment.graphql" + +query getPipelineCreationRequests($fullPath: ID!, $mergeRequestIid: String!) { + project(fullPath: $fullPath) { + id + fullPath + mergeRequest(iid: $mergeRequestIid) { + id + iid + title + webPath + pipelineCreationRequests { + status + pipelineId + error + pipeline { + ...PipelineDetails + } + } + } + } +} diff --git a/app/assets/javascripts/ci/merge_requests/graphql/subscriptions/pipeline_creation_requests_updated.subscription.graphql b/app/assets/javascripts/ci/merge_requests/graphql/subscriptions/pipeline_creation_requests_updated.subscription.graphql new file mode 100644 index 0000000000000000000000000000000000000000..8c00412f0781792611258ca1bcc04fb781fae9b0 --- /dev/null +++ b/app/assets/javascripts/ci/merge_requests/graphql/subscriptions/pipeline_creation_requests_updated.subscription.graphql @@ -0,0 +1,18 @@ +#import "~/ci/pipelines_page/graphql/fragments/pipeline_details.fragment.graphql" + +subscription ciPipelineCreationRequestsUpdated($mergeRequestId: MergeRequestID!) { + ciPipelineCreationRequestsUpdated(mergeRequestId: $mergeRequestId) { + id + iid + title + webPath + pipelineCreationRequests { + status + pipelineId + error + pipeline { + ...PipelineDetails + } + } + } +} diff --git a/app/assets/javascripts/ci/pipeline_details/mixins/pipelines_mixin.js b/app/assets/javascripts/ci/pipeline_details/mixins/pipelines_mixin.js index 074e5b497590004eb78a0b8ddf9869a4825375a3..ab812eb653f88d95780c93df6bedbd9ae00907db 100644 --- a/app/assets/javascripts/ci/pipeline_details/mixins/pipelines_mixin.js +++ b/app/assets/javascripts/ci/pipeline_details/mixins/pipelines_mixin.js @@ -201,9 +201,8 @@ export default { .then(() => { if (!options.isAsync) { this.$toast.show(TOAST_MESSAGE); + this.updateTable(); } - - this.updateTable(); }) .catch((e) => { const unauthorized = e.response.status === HTTP_STATUS_UNAUTHORIZED; diff --git a/app/assets/javascripts/ci/pipelines_page/graphql/fragments/pipeline_details.fragment.graphql b/app/assets/javascripts/ci/pipelines_page/graphql/fragments/pipeline_details.fragment.graphql new file mode 100644 index 0000000000000000000000000000000000000000..44bc86c32ee691ed98b410c9345468032f4e6a47 --- /dev/null +++ b/app/assets/javascripts/ci/pipelines_page/graphql/fragments/pipeline_details.fragment.graphql @@ -0,0 +1,72 @@ +#import "~/graphql_shared/fragments/ci_icon.fragment.graphql" + +fragment PipelineDetails on Pipeline { + id + iid + detailedStatus { + ...CiIcon + name + label + hasDetails + } + createdAt + finishedAt + duration + name + ref + refPath + refText + commit { + id + name + sha + shortId + title + webUrl + author { + id + avatarUrl + webPath + name + } + } + user { + id + name + webPath + avatarUrl + } + source + latest + yamlErrors + failureReason + configSource + stuck + type + path + retryable + cancelable + stages { + nodes { + id + name + detailedStatus { + ...CiIcon + tooltip + } + } + } + mergeRequest { + id + iid + webPath + title + } + mergeRequestEventType + project { + id + fullPath + } + hasManualActions + hasScheduledActions +} diff --git a/app/assets/javascripts/commit/pipelines/legacy_pipelines_table_wrapper.vue b/app/assets/javascripts/commit/pipelines/legacy_pipelines_table_wrapper.vue index a74d7f705fa25a3abcf7186a8b356232742b6ecd..9061c44edeafb08d184ec6f03236be28bf55591a 100644 --- a/app/assets/javascripts/commit/pipelines/legacy_pipelines_table_wrapper.vue +++ b/app/assets/javascripts/commit/pipelines/legacy_pipelines_table_wrapper.vue @@ -1,18 +1,38 @@