diff options
-rw-r--r-- | app/assets/javascripts/pipelines/components/time_ago.js | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/app/assets/javascripts/pipelines/components/time_ago.js b/app/assets/javascripts/pipelines/components/time_ago.js index e780b6dce73..188f74cc705 100644 --- a/app/assets/javascripts/pipelines/components/time_ago.js +++ b/app/assets/javascripts/pipelines/components/time_ago.js @@ -1,4 +1,3 @@ -import _ from 'underscore'; import iconTimerSvg from 'icons/_icon_timer.svg'; import '../../lib/utils/datetime_utility'; @@ -22,8 +21,7 @@ export default { }, updated() { - // We need to destroy old tooltip - $(this.$refs.tooltip).tooltip('destroy').tooltip(); + $(this.$refs.tooltip).tooltip('fixTitle'); }, computed: { @@ -32,7 +30,7 @@ export default { }, hasFinishedTime() { - return !_.isEmpty(this.finishedTime); + return this.finishedTime !== ''; }, localTimeFinished() { @@ -60,10 +58,6 @@ export default { return `${hh}:${mm}:${ss}`; }, - durationContent() { - return `${this.iconTimerSvg}${this.durationFormated}`; - }, - finishedTimeFormated() { const timeAgo = gl.utils.getTimeago(); @@ -75,8 +69,11 @@ export default { <td class="pipelines-time-ago"> <p class="duration" - v-if="hasDuration" - v-html="durationContent"> + v-if="hasDuration"> + <span + v-html="iconTimerSvg"> + </span> + {{durationFormated}} </p> <p |