diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-03 00:09:10 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-03 00:09:10 +0300 |
commit | a97f1426db3f521d2fcf699fa106a2ca4eddb801 (patch) | |
tree | 01ab04f8cd044e46998602cabe5bc77285bad782 /app/assets/javascripts/pipelines | |
parent | 77cf68da37567a0432108d6755b6c7578e5b7dc8 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/pipelines')
-rw-r--r-- | app/assets/javascripts/pipelines/components/pipelines_list/time_ago.vue | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/app/assets/javascripts/pipelines/components/pipelines_list/time_ago.vue b/app/assets/javascripts/pipelines/components/pipelines_list/time_ago.vue index 7fe495aa342..1d117cfe34a 100644 --- a/app/assets/javascripts/pipelines/components/pipelines_list/time_ago.vue +++ b/app/assets/javascripts/pipelines/components/pipelines_list/time_ago.vue @@ -1,7 +1,6 @@ <script> import { GlIcon, GlTooltipDirective } from '@gitlab/ui'; import timeagoMixin from '~/vue_shared/mixins/timeago'; -import { formatTime } from '~/lib/utils/datetime_utility'; export default { directives: { @@ -27,7 +26,24 @@ export default { return this.finishedTime !== ''; }, durationFormatted() { - return formatTime(this.duration); + const date = new Date(this.duration * 1000); + + let hh = date.getUTCHours(); + let mm = date.getUTCMinutes(); + let ss = date.getSeconds(); + + // left pad + if (hh < 10) { + hh = `0${hh}`; + } + if (mm < 10) { + mm = `0${mm}`; + } + if (ss < 10) { + ss = `0${ss}`; + } + + return `${hh}:${mm}:${ss}`; }, }, }; |