diff options
Diffstat (limited to 'app/assets/javascripts/pipelines/components/pipelines_actions.vue')
-rw-r--r-- | app/assets/javascripts/pipelines/components/pipelines_actions.vue | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/app/assets/javascripts/pipelines/components/pipelines_actions.vue b/app/assets/javascripts/pipelines/components/pipelines_actions.vue index f0e845d0773..16e69759091 100644 --- a/app/assets/javascripts/pipelines/components/pipelines_actions.vue +++ b/app/assets/javascripts/pipelines/components/pipelines_actions.vue @@ -26,8 +26,13 @@ export default { methods: { onClickAction(action) { 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 + 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/52156 // eslint-disable-next-line no-alert if (!window.confirm(confirmationMessage)) { return; @@ -49,7 +54,7 @@ export default { remainingTime(action) { const remainingMilliseconds = new Date(action.scheduled_at).getTime() - Date.now(); - return formatTime(remainingMilliseconds); + return formatTime(Math.max(0, remainingMilliseconds)); }, }, }; |