diff options
author | Winnie Hellmann <winnie@gitlab.com> | 2018-10-04 09:19:50 +0200 |
---|---|---|
committer | Winnie Hellmann <winnie@gitlab.com> | 2018-10-04 09:54:00 +0200 |
commit | c02178b1051d4ae294e8828a71aeaeac3d9680de (patch) | |
tree | d42ca0d3613adf23249ee9650857ae310d414947 /app/assets/javascripts | |
parent | 545d5be0b3b090fea405f9347f7674a3d7af106c (diff) | |
download | gitlab-ce-c02178b1051d4ae294e8828a71aeaeac3d9680de.tar.gz |
Display confirmation only when triggering scheduled jobs not manual
Diffstat (limited to 'app/assets/javascripts')
-rw-r--r-- | app/assets/javascripts/pipelines/components/pipelines_actions.vue | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/app/assets/javascripts/pipelines/components/pipelines_actions.vue b/app/assets/javascripts/pipelines/components/pipelines_actions.vue index 1768c7dc2b3..f0e845d0773 100644 --- a/app/assets/javascripts/pipelines/components/pipelines_actions.vue +++ b/app/assets/javascripts/pipelines/components/pipelines_actions.vue @@ -25,11 +25,13 @@ export default { }, methods: { onClickAction(action) { - const confirmationMessage = sprintf(s__("DelayedJobs|Are you sure you want to run %{jobName} immediately? This job will run automatically after it's timer finishes."), { jobName: action.name }); - // https://gitlab.com/gitlab-org/gitlab-ce/issues/52099 - // eslint-disable-next-line no-alert - if (!window.confirm(confirmationMessage)) { - return; + if (action.scheduled_at) { + const confirmationMessage = sprintf(s__("DelayedJobs|Are you sure you want to run %{jobName} immediately? This job will run automatically after it's timer finishes."), { jobName: action.name }); + // https://gitlab.com/gitlab-org/gitlab-ce/issues/52099 + // eslint-disable-next-line no-alert + if (!window.confirm(confirmationMessage)) { + return; + } } this.isLoading = true; |