Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwinniehell <git@winniehell.de>2017-03-05 22:43:05 +0300
committerwinniehell <git@winniehell.de>2017-03-05 23:22:40 +0300
commit572f9782d5e8d6307784b61db0dfce48f5118445 (patch)
tree11b25c46733462729e4303b26b4895d983f14df0 /app/assets/javascripts/cycle_analytics/components/total_time_component.js
parent4cd2ab52548e89cd7259cfb7ce320fdfa203fe84 (diff)
Remove .es6 from file extensions (!9241)
Diffstat (limited to 'app/assets/javascripts/cycle_analytics/components/total_time_component.js')
-rw-r--r--app/assets/javascripts/cycle_analytics/components/total_time_component.js25
1 files changed, 25 insertions, 0 deletions
diff --git a/app/assets/javascripts/cycle_analytics/components/total_time_component.js b/app/assets/javascripts/cycle_analytics/components/total_time_component.js
new file mode 100644
index 00000000000..0d85e1a4678
--- /dev/null
+++ b/app/assets/javascripts/cycle_analytics/components/total_time_component.js
@@ -0,0 +1,25 @@
+/* eslint-disable no-param-reassign */
+/* global Vue */
+
+((global) => {
+ global.cycleAnalytics = global.cycleAnalytics || {};
+
+ global.cycleAnalytics.TotalTimeComponent = Vue.extend({
+ props: {
+ time: Object,
+ },
+ template: `
+ <span class="total-time">
+ <template v-if="Object.keys(time).length">
+ <template v-if="time.days">{{ time.days }} <span>{{ time.days === 1 ? 'day' : 'days' }}</span></template>
+ <template v-if="time.hours">{{ time.hours }} <span>hr</span></template>
+ <template v-if="time.mins && !time.days">{{ time.mins }} <span>mins</span></template>
+ <template v-if="time.seconds && Object.keys(time).length === 1 || time.seconds === 0">{{ time.seconds }} <span>s</span></template>
+ </template>
+ <template v-else>
+ --
+ </template>
+ </span>
+ `,
+ });
+})(window.gl || (window.gl = {}));