diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-03-23 21:08:47 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-03-23 21:08:47 +0300 |
commit | 82f12c20905e97952cf673e74ec05267fee0b43b (patch) | |
tree | a0e49d069165ef4227537b129e43825fb4689c51 /app/assets/javascripts/jobs | |
parent | 16dbaf57bc4d87aa8a2bca8bf9db7cab26d841c4 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/jobs')
-rw-r--r-- | app/assets/javascripts/jobs/components/table/cells/duration_cell.vue | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/app/assets/javascripts/jobs/components/table/cells/duration_cell.vue b/app/assets/javascripts/jobs/components/table/cells/duration_cell.vue index 19594c4955d..120f01db8f0 100644 --- a/app/assets/javascripts/jobs/components/table/cells/duration_cell.vue +++ b/app/assets/javascripts/jobs/components/table/cells/duration_cell.vue @@ -1,6 +1,6 @@ <script> import { GlIcon, GlTooltipDirective } from '@gitlab/ui'; -import timeagoMixin from '~/vue_shared/mixins/timeago'; +import { formatDate, getTimeago, durationTimeFormatted } from '~/lib/utils/datetime_utility'; export default { iconSize: 12, @@ -10,7 +10,6 @@ export default { components: { GlIcon, }, - mixins: [timeagoMixin], props: { job: { type: Object, @@ -24,6 +23,15 @@ export default { duration() { return this.job?.duration; }, + timeFormatted() { + return getTimeago().format(this.finishedTime); + }, + tooltipTitle() { + return formatDate(this.finishedTime); + }, + durationFormatted() { + return durationTimeFormatted(this.duration); + }, }, }; </script> @@ -32,18 +40,18 @@ export default { <div> <div v-if="duration" data-testid="job-duration"> <gl-icon name="timer" :size="$options.iconSize" data-testid="duration-icon" /> - {{ durationTimeFormatted(duration) }} + {{ durationFormatted }} </div> <div v-if="finishedTime" data-testid="job-finished-time"> <gl-icon name="calendar" :size="$options.iconSize" data-testid="finished-time-icon" /> <time v-gl-tooltip - :title="tooltipTitle(finishedTime)" + :title="tooltipTitle" :datetime="finishedTime" data-placement="top" data-container="body" > - {{ timeFormatted(finishedTime) }} + {{ timeFormatted }} </time> </div> </div> |