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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
2748a01a
Commit
2748a01a
authored
Nov 16, 2016
by
Alfredo Sumaran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use stage description form endpoint response
parent
fe5ae3b0
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
35 additions
and
23 deletions
+35
-23
app/assets/javascripts/cycle_analytics/components/item_issue_component.js.es6
...ts/cycle_analytics/components/item_issue_component.js.es6
+2
-3
app/assets/javascripts/cycle_analytics/components/stage_code_component.js.es6
...ts/cycle_analytics/components/stage_code_component.js.es6
+1
-1
app/assets/javascripts/cycle_analytics/components/stage_issue_component.js.es6
...s/cycle_analytics/components/stage_issue_component.js.es6
+1
-1
app/assets/javascripts/cycle_analytics/components/stage_plan_component.js.es6
...ts/cycle_analytics/components/stage_plan_component.js.es6
+1
-1
app/assets/javascripts/cycle_analytics/components/stage_production_component.js.es6
...le_analytics/components/stage_production_component.js.es6
+1
-1
app/assets/javascripts/cycle_analytics/components/stage_review_component.js.es6
.../cycle_analytics/components/stage_review_component.js.es6
+2
-1
app/assets/javascripts/cycle_analytics/components/stage_staging_component.js.es6
...cycle_analytics/components/stage_staging_component.js.es6
+2
-1
app/assets/javascripts/cycle_analytics/components/stage_test_component.js.es6
...ts/cycle_analytics/components/stage_test_component.js.es6
+1
-1
app/assets/javascripts/cycle_analytics/cycle_analytics_bundle.js
...ets/javascripts/cycle_analytics/cycle_analytics_bundle.js
+3
-3
app/assets/javascripts/cycle_analytics/cycle_analytics_store.js.es6
.../javascripts/cycle_analytics/cycle_analytics_store.js.es6
+14
-3
app/controllers/projects/cycle_analytics_controller.rb
app/controllers/projects/cycle_analytics_controller.rb
+5
-5
app/views/projects/cycle_analytics/show.html.haml
app/views/projects/cycle_analytics/show.html.haml
+2
-2
No files found.
app/assets/javascripts/cycle_analytics/components/item_issue_component.js.es6
View file @
2748a01a
...
...
@@ -15,7 +15,6 @@
*/
global.cycleAnalytics.ItemIssueComponent = Vue.extend({
template: '#item-issue-component',
props: {
issue: Object,
},
...
...
@@ -39,8 +38,8 @@
</span>
<span>
by
<a
href="issue.profile
" class="issue-author-link">
{{ issue.author }}
<a
:href="issue.author.web_url
" class="issue-author-link">
{{ issue.author
.name
}}
</a>
</span>
</div>
...
...
app/assets/javascripts/cycle_analytics/components/stage_code_component.js.es6
View file @
2748a01a
...
...
@@ -13,7 +13,7 @@
template: `
<div>
<div class="events-description">
{{ stage.
shortD
escription }}
{{ stage.
d
escription }}
</div>
<ul class="stage-event-list">
<li class="stage-event-item" v-for="mergeRequest in items">
...
...
app/assets/javascripts/cycle_analytics/components/stage_issue_component.js.es6
View file @
2748a01a
...
...
@@ -13,7 +13,7 @@
template: `
<div>
<div class="events-description">
{{ stage.
shortD
escription }}
{{ stage.
d
escription }}
</div>
<ul class="stage-event-list">
<li class="stage-event-item" v-for="issue in items">
...
...
app/assets/javascripts/cycle_analytics/components/stage_plan_component.js.es6
View file @
2748a01a
...
...
@@ -13,7 +13,7 @@
template: `
<div>
<div class="events-description">
{{ stage.
shortD
escription }}
{{ stage.
d
escription }}
</div>
<ul class="stage-event-list">
<li class="stage-event-item" v-for="commit in items">
...
...
app/assets/javascripts/cycle_analytics/components/stage_production_component.js.es6
View file @
2748a01a
...
...
@@ -13,7 +13,7 @@
template: `
<div>
<div class="events-description">
{{ stage.
shortD
escription }}
{{ stage.
d
escription }}
</div>
<ul>
<li v-for="issue in items">
...
...
app/assets/javascripts/cycle_analytics/components/stage_review_component.js.es6
View file @
2748a01a
...
...
@@ -8,11 +8,12 @@
},
props: {
items: Array,
stage: Object,
},
template: `
<div>
<div class="events-description">
The time taken to review the code
{{ stage.description }}
</div>
<ul class="stage-event-list">
<li class="stage-event-item" v-for="mergeRequest in items">
...
...
app/assets/javascripts/cycle_analytics/components/stage_staging_component.js.es6
View file @
2748a01a
...
...
@@ -9,11 +9,12 @@
},
props: {
items: Array,
stage: Object,
},
template: `
<div>
<div class="events-description">
The time taken in staging
{{ stage.description }}
</div>
<ul>
<li v-for="build in items">
...
...
app/assets/javascripts/cycle_analytics/components/stage_test_component.js.es6
View file @
2748a01a
...
...
@@ -13,7 +13,7 @@
template: `
<div>
<div class="events-description">
{{ stage.
shortD
escription }}
{{ stage.
d
escription }}
</div>
<ul class="stage-event-list">
<li class="stage-event-item" v-for="build in items">
...
...
app/assets/javascripts/cycle_analytics/cycle_analytics_bundle.js
View file @
2748a01a
...
...
@@ -86,7 +86,7 @@ $(() => {
if
(
this
.
currentStage
===
stage
)
return
;
this
.
isLoadingStage
=
true
;
cycleAnalyticsStore
.
setStage
Item
s
([]);
cycleAnalyticsStore
.
setStage
Event
s
([]);
cycleAnalyticsStore
.
setActiveStage
(
stage
);
cycleAnalyticsService
...
...
@@ -95,8 +95,8 @@ $(() => {
startDate
:
this
.
startDate
,
})
.
done
((
response
)
=>
{
this
.
isEmptyStage
=
!
response
.
item
s
.
length
;
cycleAnalyticsStore
.
setStage
Items
(
response
.
item
s
);
this
.
isEmptyStage
=
!
response
.
event
s
.
length
;
cycleAnalyticsStore
.
setStage
Events
(
response
.
event
s
);
})
.
error
(()
=>
{
this
.
isEmptyStage
=
true
;
...
...
app/assets/javascripts/cycle_analytics/cycle_analytics_store.js.es6
View file @
2748a01a
...
...
@@ -6,7 +6,7 @@
summary: '',
stats: '',
analytics: '',
item
s: [],
event
s: [],
stages:[],
},
setCycleAnalyticsData(data) {
...
...
@@ -47,8 +47,19 @@
this.deactivateAllStages();
stage.active = true;
},
setStageItems(items) {
this.state.items = items;
setStageEvents(events) {
this.state.events = this.decorateEvents(events);
},
decorateEvents(events) {
let newEvents = events;
newEvents.forEach((item) => {
item.totalTime = item.total_time;
delete item.total_time;
});
return newEvents;
},
currentActiveStage() {
return this.state.stages.find(stage => stage.active);
...
...
app/controllers/projects/cycle_analytics_controller.rb
View file @
2748a01a
...
...
@@ -31,11 +31,11 @@ class Projects::CycleAnalyticsController < Projects::ApplicationController
cycle_analytics_view_data
=
[[
:issue
,
"Issue"
,
"Related Issues"
,
"Time before an issue gets scheduled"
],
[
:plan
,
"Plan"
,
"Related Commits"
,
"Time before an issue starts implementation"
],
[
:code
,
"Code"
,
"Related Merge Requests"
,
"Time
until first merge request
"
],
[
:test
,
"Test"
,
"Relative Builds Trigger by Commits"
,
"T
otal test time for all commits/merges
"
],
[
:review
,
"Review"
,
"Relative Merged Requests"
,
"T
ime between merge request creation and merge/clos
e"
],
[
:staging
,
"Staging"
,
"Relative Deployed Builds"
,
"
From merge request merge until deploy to production
"
],
[
:production
,
"Production"
,
"Related Issues"
,
"
From issue creation until deploy
to production"
]]
[
:code
,
"Code"
,
"Related Merge Requests"
,
"Time
spent coding
"
],
[
:test
,
"Test"
,
"Relative Builds Trigger by Commits"
,
"T
he time taken to build and test the application
"
],
[
:review
,
"Review"
,
"Relative Merged Requests"
,
"T
he time taken to review the cod
e"
],
[
:staging
,
"Staging"
,
"Relative Deployed Builds"
,
"
The time taken in staging
"
],
[
:production
,
"Production"
,
"Related Issues"
,
"
The total time taken from idea
to production"
]]
stats
=
cycle_analytics_view_data
.
reduce
([])
do
|
stats
,
(
stage_method
,
stage_text
,
stage_legend
,
stage_description
)
|
value
=
@cycle_analytics
.
send
(
stage_method
).
presence
...
...
app/views/projects/cycle_analytics/show.html.haml
View file @
2748a01a
...
...
@@ -83,5 +83,5 @@
=
icon
(
"spinner spin"
,
"v-show"
=>
"isLoadingStage"
)
%template
{
"v-if"
=>
"isEmptyStage"
}
=
render
partial:
"empty_stage"
%template
{
"v-if"
=>
"state.
item
s.length && !isLoadingStage && !isEmptyStage"
}
%component
{
":is"
=>
"currentStage.component"
,
":stage"
=>
"currentStage"
,
":items"
=>
"state.
item
s"
}
%template
{
"v-if"
=>
"state.
event
s.length && !isLoadingStage && !isEmptyStage"
}
%component
{
":is"
=>
"currentStage.component"
,
":stage"
=>
"currentStage"
,
":items"
=>
"state.
event
s"
}
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