Commit c02178b1 authored by Winnie Hellmann's avatar Winnie Hellmann

Display confirmation only when triggering scheduled jobs not manual

parent 545d5be0
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment