Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
0cf83903
Commit
0cf83903
authored
Nov 02, 2020
by
Martin Wortschack
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix regressuib in durationFormatted
parent
12de7161
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
2 deletions
+18
-2
app/assets/javascripts/pipelines/components/pipelines_list/time_ago.vue
...ascripts/pipelines/components/pipelines_list/time_ago.vue
+18
-2
No files found.
app/assets/javascripts/pipelines/components/pipelines_list/time_ago.vue
View file @
0cf83903
<
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
}
`
;
},
},
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment