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-02-02 15:10:15 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-02-02 15:10:15 +0300
commitbdf5d637dab13620c56063c628274746182196ad (patch)
treeac85f7fd0a998f0edd373adebf5a71f8714e9c2b /app/assets/javascripts/pipeline_new
parent0c178b535cda98a248e136ba5128f0d903edb17d (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/pipeline_new')
-rw-r--r--app/assets/javascripts/pipeline_new/components/pipeline_new_form.vue14
1 files changed, 13 insertions, 1 deletions
diff --git a/app/assets/javascripts/pipeline_new/components/pipeline_new_form.vue b/app/assets/javascripts/pipeline_new/components/pipeline_new_form.vue
index 6b045e6bf1a..69b02463235 100644
--- a/app/assets/javascripts/pipeline_new/components/pipeline_new_form.vue
+++ b/app/assets/javascripts/pipeline_new/components/pipeline_new_form.vue
@@ -116,6 +116,7 @@ export default {
totalWarnings: 0,
isWarningDismissed: false,
isLoading: false,
+ submitted: false,
};
},
computed: {
@@ -294,6 +295,7 @@ export default {
});
},
createPipeline() {
+ this.submitted = true;
const filteredVariables = this.variables
.filter(({ key, value }) => key !== '' && value !== '')
.map(({ variable_type, key, value }) => ({
@@ -313,8 +315,16 @@ export default {
redirectTo(`${this.pipelinesPath}/${data.id}`);
})
.catch((err) => {
- const { errors, warnings, total_warnings: totalWarnings } = err.response.data;
+ // always re-enable submit button
+ this.submitted = false;
+
+ const {
+ errors = [],
+ warnings = [],
+ total_warnings: totalWarnings = 0,
+ } = err?.response?.data;
const [error] = errors;
+
this.error = error;
this.warnings = warnings;
this.totalWarnings = totalWarnings;
@@ -464,6 +474,8 @@ export default {
variant="success"
class="js-no-auto-disable"
data-qa-selector="run_pipeline_button"
+ data-testid="run_pipeline_button"
+ :disabled="submitted"
>{{ s__('Pipeline|Run Pipeline') }}</gl-button
>
<gl-button :href="pipelinesPath">{{ __('Cancel') }}</gl-button>