diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2018-10-30 12:49:55 +0000 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2018-10-30 12:49:55 +0000 |
commit | e10ca5eb843f45123ef96c0858d2ff76c9892b8c (patch) | |
tree | 41daa0e3397be8cce10994f2e3d2688d96095e45 /app | |
parent | 6fd7a2dc066267e3cd217ebee19df2482d92d30e (diff) | |
parent | 557cf4fa7633c65e7beacb273550de85cb9e130e (diff) | |
download | gitlab-ce-e10ca5eb843f45123ef96c0858d2ff76c9892b8c.tar.gz |
Merge branch 'winh-pipeline-actions-dynamic-timer' into 'master'
Add dynamic timer for delayed jobs in pipelines list
See merge request gitlab-org/gitlab-ce!22621
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/javascripts/pipelines/components/pipelines_actions.vue | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/app/assets/javascripts/pipelines/components/pipelines_actions.vue b/app/assets/javascripts/pipelines/components/pipelines_actions.vue index 16e69759091..d032ad73f71 100644 --- a/app/assets/javascripts/pipelines/components/pipelines_actions.vue +++ b/app/assets/javascripts/pipelines/components/pipelines_actions.vue @@ -1,9 +1,9 @@ <script> import { s__, sprintf } from '~/locale'; -import { formatTime } from '~/lib/utils/datetime_utility'; import eventHub from '../event_hub'; import icon from '../../vue_shared/components/icon.vue'; import tooltip from '../../vue_shared/directives/tooltip'; +import GlCountdown from '~/vue_shared/components/gl_countdown.vue'; export default { directives: { @@ -11,6 +11,7 @@ export default { }, components: { icon, + GlCountdown, }, props: { actions: { @@ -51,11 +52,6 @@ export default { return !action.playable; }, - - remainingTime(action) { - const remainingMilliseconds = new Date(action.scheduled_at).getTime() - Date.now(); - return formatTime(Math.max(0, remainingMilliseconds)); - }, }, }; </script> @@ -100,7 +96,7 @@ export default { class="pull-right" > <icon name="clock" /> - {{ remainingTime(action) }} + <gl-countdown :end-date-string="action.scheduled_at" /> </span> </button> </li> |