From 34415ce9de7c69e304e6a1256cd54a996cb59ec5 Mon Sep 17 00:00:00 2001 From: Filipa Lacerda Date: Thu, 27 Apr 2017 09:31:42 +0100 Subject: Changes after review --- app/assets/javascripts/pipelines/components/time_ago.js | 17 +++++++---------- 1 file 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 {

+ v-if="hasDuration"> + + + {{durationFormated}}