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 { ...@@ -25,11 +25,13 @@ export default {
}, },
methods: { methods: {
onClickAction(action) { 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 }); if (action.scheduled_at) {
// https://gitlab.com/gitlab-org/gitlab-ce/issues/52099 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 });
// eslint-disable-next-line no-alert // https://gitlab.com/gitlab-org/gitlab-ce/issues/52099
if (!window.confirm(confirmationMessage)) { // eslint-disable-next-line no-alert
return; if (!window.confirm(confirmationMessage)) {
return;
}
} }
this.isLoading = true; 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