summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/cycle_analytics/components/total_time_component.js
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-04-22 21:01:50 +0200
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-04-22 21:01:50 +0200
commit8c8f6db4578051300794c7032bc63d68f70cce16 (patch)
treef48f82ed1418ff9a6d810b4f354629d7a275b606 /app/assets/javascripts/cycle_analytics/components/total_time_component.js
parenta8231ea1befd803fb5892ea3e6679219f5d7d8e5 (diff)
parent1005389f70070245092c1ae5f3f9b10b8e7c102e (diff)
downloadgitlab-ce-8c8f6db4578051300794c7032bc63d68f70cce16.tar.gz
Merge branch 'master' into feature/gb/manual-actions-protected-branches-permissions
* master: (274 commits) Update VERSION to 9.2.0-pre Update CHANGELOG.md for 9.1.0 Update Auto Deploy documentation Disable import URL field in New project form since it's hidden by default Remove reference to burndown charts since they don't exist for ce. Use master_password for Sentinel Refactor Discussions docs Start versioning cached markdown fields Refactor add_users method for project and group Improved the spec Now correctly tests against different forms Refactor environments components into vue files - part 3 Adding animation for all dropdown fix placeholder visibility submodule_links: handle urls that don't end with .git Add help regarding vue resource and where to include it Append .json to ajax endpoint to prevent browser to display raw json Fixed the preview keyboard shortcut focusing wrong tab Fix broken link Added new discussions docs Started on resolvable discussions docs ...
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.js41
1 files changed, 20 insertions, 21 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
index b4442ea5566..77edcb76273 100644
--- a/app/assets/javascripts/cycle_analytics/components/total_time_component.js
+++ b/app/assets/javascripts/cycle_analytics/components/total_time_component.js
@@ -2,25 +2,24 @@
import Vue from 'vue';
-((global) => {
- global.cycleAnalytics = global.cycleAnalytics || {};
+const global = window.gl || (window.gl = {});
+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 = {}));
+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>
+ `,
+});