summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2017-04-27 09:31:42 +0100
committerFilipa Lacerda <filipa@gitlab.com>2017-04-27 09:31:42 +0100
commit34415ce9de7c69e304e6a1256cd54a996cb59ec5 (patch)
treea91325302909a9932c9bba5175d23bb5045f94e9
parent541656fd10a12d13c4f2ff0bd32bf6dffc6e0005 (diff)
downloadgitlab-ce-31202-timeago-loops.tar.gz
Changes after review31202-timeago-loops
-rw-r--r--app/assets/javascripts/pipelines/components/time_ago.js17
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