Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
fe5ae3b0
Commit
fe5ae3b0
authored
Nov 16, 2016
by
Alfredo Sumaran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adde TotalTimeComponent as global component
parent
06fd2879
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
8 deletions
+33
-8
app/assets/javascripts/cycle_analytics/components/item_issue_component.js.es6
...ts/cycle_analytics/components/item_issue_component.js.es6
+1
-8
app/assets/javascripts/cycle_analytics/components/total_time_component.js.es6
...ts/cycle_analytics/components/total_time_component.js.es6
+29
-0
app/assets/javascripts/cycle_analytics/cycle_analytics_bundle.js
...ets/javascripts/cycle_analytics/cycle_analytics_bundle.js
+3
-0
No files found.
app/assets/javascripts/cycle_analytics/components/item_issue_component.js.es6
View file @
fe5ae3b0
...
...
@@ -45,14 +45,7 @@
</span>
</div>
<div class="item-time">
<span class="hours" v-if="issue.totalTime.hours">
{{ issue.totalTime.hours }}
<abbr title="Hours">hr</abbr>
</span>
<span class="minutes" v-if="issue.totalTime.minutes">
{{ issue.totalTime.minutes }}
<abbr title="Minutes">mins</abbr>
</span>
<total-time :time="issue.totalTime"></total-time>
</div>
</div>
`,
...
...
app/assets/javascripts/cycle_analytics/components/total_time_component.js.es6
0 → 100644
View file @
fe5ae3b0
((global) => {
global.cycleAnalytics = global.cycleAnalytics || {};
global.cycleAnalytics.TotalTimeComponent = Vue.extend({
props: {
time: Object,
},
template: `
<span>
<span class="days" v-if="time.days">
{{ time.days }}
<abbr title="Days">{{ time.days === 1 ? 'day' : 'days' }}</abbr>
</span>
<span class="hours" v-if="time.hours">
{{ time.hours }}
<abbr title="Hours">hr</abbr>
</span>
<span class="mins" v-if="time.mins">
{{ time.mins }}
<abbr title="Minutes">mins</abbr>
</span>
<span class="seconds hide" v-if="time.seconds">
{{ time.seconds }}
<abbr title="Seconds">s</abbr>
</span>
</span>
`,
});
})(window.gl || (window.gl = {}));
app/assets/javascripts/cycle_analytics/cycle_analytics_bundle.js
View file @
fe5ae3b0
...
...
@@ -115,4 +115,7 @@ $(() => {
},
},
});
// Register global components
Vue
.
component
(
'
total-time
'
,
gl
.
cycleAnalytics
.
TotalTimeComponent
);
});
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment