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
Tatuya Kamada
gitlab-ce
Commits
f9cfc87c
Commit
f9cfc87c
authored
Nov 15, 2016
by
Alfredo Sumaran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move templates to its corresponding component
parent
795ce9dc
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
89 additions
and
70 deletions
+89
-70
app/assets/javascripts/cycle_analytics/components/item_build_component.js.es6
...ts/cycle_analytics/components/item_build_component.js.es6
+12
-2
app/assets/javascripts/cycle_analytics/components/item_merge_request_component.js.es6
..._analytics/components/item_merge_request_component.js.es6
+12
-2
app/assets/javascripts/cycle_analytics/components/stage_code_component.js.es6
...ts/cycle_analytics/components/stage_code_component.js.es6
+13
-2
app/assets/javascripts/cycle_analytics/components/stage_production_component.js.es6
...le_analytics/components/stage_production_component.js.es6
+13
-2
app/assets/javascripts/cycle_analytics/components/stage_review_component.js.es6
.../cycle_analytics/components/stage_review_component.js.es6
+13
-2
app/assets/javascripts/cycle_analytics/components/stage_staging_component.js.es6
...cycle_analytics/components/stage_staging_component.js.es6
+13
-1
app/assets/javascripts/cycle_analytics/components/stage_test_component.js.es6
...ts/cycle_analytics/components/stage_test_component.js.es6
+13
-2
app/views/projects/cycle_analytics/show.html.haml
app/views/projects/cycle_analytics/show.html.haml
+0
-57
No files found.
app/assets/javascripts/cycle_analytics/components/item_build_component.js.es6
View file @
f9cfc87c
...
@@ -16,9 +16,19 @@
...
@@ -16,9 +16,19 @@
*/
*/
global.cycleAnalytics.ItemBuildComponent = Vue.extend({
global.cycleAnalytics.ItemBuildComponent = Vue.extend({
template: '#item-build-component',
props: {
props: {
build: Object,
build: Object,
}
},
template: `
<div>
<p>
<h5>
<a href="build.url">
{{ build.title }}
</a>
</h5>
</p>
</div>
`,
});
});
}(window.gl || (window.gl = {})));
}(window.gl || (window.gl = {})));
app/assets/javascripts/cycle_analytics/components/item_merge_request_component.js.es6
View file @
f9cfc87c
...
@@ -15,9 +15,19 @@
...
@@ -15,9 +15,19 @@
*/
*/
global.cycleAnalytics.ItemMergeRequestComponent = Vue.extend({
global.cycleAnalytics.ItemMergeRequestComponent = Vue.extend({
template: '#item-merge-request-component',
props: {
props: {
mergeRequest: Object,
mergeRequest: Object,
}
},
template: `
<div>
<p>
<h5>
<a href="mergeRequest.url">
{{ mergeRequest.title }}
</a>
</h5>
</p>
</div>
`,
});
});
}(window.gl || (window.gl = {})));
}(window.gl || (window.gl = {})));
app/assets/javascripts/cycle_analytics/components/stage_code_component.js.es6
View file @
f9cfc87c
...
@@ -3,13 +3,24 @@
...
@@ -3,13 +3,24 @@
global.cycleAnalytics = global.cycleAnalytics || {};
global.cycleAnalytics = global.cycleAnalytics || {};
global.cycleAnalytics.StageCodeComponent = Vue.extend({
global.cycleAnalytics.StageCodeComponent = Vue.extend({
template: '#stage-code-component',
components: {
components: {
'item-merge-request-component': gl.cycleAnalytics.ItemMergeRequestComponent,
'item-merge-request-component': gl.cycleAnalytics.ItemMergeRequestComponent,
},
},
props: {
props: {
items: Array,
items: Array,
}
},
template: `
<div>
<div class="events-description">
Time spent coding
</div>
<ul class="stage-event-list">
<li class="stage-event-item" v-for="mergeRequest in items">
<item-merge-request-component :merge-request="mergeRequest"></item-merge-request-component>
</li>
</ul>
</div>
`,
});
});
})(window.gl || (window.gl = {}));
})(window.gl || (window.gl = {}));
app/assets/javascripts/cycle_analytics/components/stage_production_component.js.es6
View file @
f9cfc87c
...
@@ -3,13 +3,24 @@
...
@@ -3,13 +3,24 @@
global.cycleAnalytics = global.cycleAnalytics || {};
global.cycleAnalytics = global.cycleAnalytics || {};
global.cycleAnalytics.StageProductionComponent = Vue.extend({
global.cycleAnalytics.StageProductionComponent = Vue.extend({
template: '#stage-production-component',
components: {
components: {
'item-issue-component': gl.cycleAnalytics.ItemIssueComponent,
'item-issue-component': gl.cycleAnalytics.ItemIssueComponent,
},
},
props: {
props: {
items: Array,
items: Array,
}
},
template: `
<div>
<div class="events-description">
The total time taken from idea to production
</div>
<ul>
<li v-for="issue in items">
<item-issue-component :issue="issue"></item-issue-component>
</li>
</ul>
</div>
`
});
});
})(window.gl || (window.gl = {}));
})(window.gl || (window.gl = {}));
app/assets/javascripts/cycle_analytics/components/stage_review_component.js.es6
View file @
f9cfc87c
...
@@ -3,13 +3,24 @@
...
@@ -3,13 +3,24 @@
global.cycleAnalytics = global.cycleAnalytics || {};
global.cycleAnalytics = global.cycleAnalytics || {};
global.cycleAnalytics.StageReviewComponent = Vue.extend({
global.cycleAnalytics.StageReviewComponent = Vue.extend({
template: '#stage-review-component',
components: {
components: {
'item-merge-request-component': gl.cycleAnalytics.ItemMergeRequestComponent,
'item-merge-request-component': gl.cycleAnalytics.ItemMergeRequestComponent,
},
},
props: {
props: {
items: Array,
items: Array,
}
},
template: `
<div>
<div class="events-description">
The time taken to review the code
</div>
<ul class="stage-event-list">
<li class="stage-event-item" v-for="mergeRequest in items">
<item-merge-request-component :merge-request="mergeRequest"></item-merge-request-component>
</li>
</ul>
</div>
`,
});
});
})(window.gl || (window.gl = {}));
})(window.gl || (window.gl = {}));
app/assets/javascripts/cycle_analytics/components/stage_staging_component.js.es6
View file @
f9cfc87c
...
@@ -9,7 +9,19 @@
...
@@ -9,7 +9,19 @@
},
},
props: {
props: {
items: Array,
items: Array,
}
},
template: `
<div>
<div class="events-description">
The time taken in staging
</div>
<ul>
<li v-for="build in items">
<item-build-component :build="build"></item-build-component>
</li>
</ul>
</div>
`,
});
});
})(window.gl || (window.gl = {}));
})(window.gl || (window.gl = {}));
app/assets/javascripts/cycle_analytics/components/stage_test_component.js.es6
View file @
f9cfc87c
...
@@ -3,13 +3,24 @@
...
@@ -3,13 +3,24 @@
global.cycleAnalytics = global.cycleAnalytics || {};
global.cycleAnalytics = global.cycleAnalytics || {};
global.cycleAnalytics.StageTestComponent = Vue.extend({
global.cycleAnalytics.StageTestComponent = Vue.extend({
template: '#stage-test-component',
components: {
components: {
'item-build-component': gl.cycleAnalytics.ItemBuildComponent,
'item-build-component': gl.cycleAnalytics.ItemBuildComponent,
},
},
props: {
props: {
items: Array,
items: Array,
}
},
template: `
<div>
<div class="events-description">
The time taken to build and test the application
</div>
<ul class="stage-event-list">
<li class="stage-event-item" v-for="build in items">
<item-build-component :build="build"></item-build-component>
</li>
</ul>
</div>
`,
});
});
})(window.gl || (window.gl = {}));
})(window.gl || (window.gl = {}));
app/views/projects/cycle_analytics/show.html.haml
View file @
f9cfc87c
...
@@ -93,60 +93,3 @@
...
@@ -93,60 +93,3 @@
%p
No results
%p
No results
%template
{
"v-if"
=>
"state.items.length && !isLoadingStage && !isEmptyStage"
}
%template
{
"v-if"
=>
"state.items.length && !isLoadingStage && !isEmptyStage"
}
%component
{
":is"
=>
"currentStage.component"
,
":items"
=>
"state.items"
}
%component
{
":is"
=>
"currentStage.component"
,
":items"
=>
"state.items"
}
%script
{
type:
'text/x-template'
,
id:
'stage-code-component'
}
%div
.events-description
Time spent coding
%ul
%li
{
"v-for"
=>
"mergeRequest in items"
}
%item-merge-request-component
{
":merge-request"
=>
"mergeRequest"
}
%script
{
type:
'text/x-template'
,
id:
'stage-test-component'
}
%div
.events-description
The time taken to build and test the application
%ul
%li
{
"v-for"
=>
"build in items"
}
%item-build-component
{
":build"
=>
"build"
}
%script
{
type:
'text/x-template'
,
id:
'stage-review-component'
}
%div
.events-description
The time taken to review the code
%ul
%li
{
"v-for"
=>
"mergeRequest in items"
}
%item-merge-request-component
{
":merge-request"
=>
"mergeRequest"
}
%script
{
type:
'text/x-template'
,
id:
'stage-staging-component'
}
%div
.events-description
The time taken in staging
%ul
%li
{
"v-for"
=>
"build in items"
}
%item-build-component
{
":build"
=>
"build"
}
%script
{
type:
'text/x-template'
,
id:
'stage-production-component'
}
%div
.events-description
The total time taken from idea to production
%ul
%li
{
"v-for"
=>
"issue in items"
}
%item-issue-component
{
":issue"
=>
"issue"
}
%script
{
type:
'text/x-template'
,
id:
'item-merge-request-component'
}
%div
%p
%h5
merge request -
%a
{
:href
=>
"mergeRequest.url"
}
{{ mergeRequest.title }}
%script
{
type:
'text/x-template'
,
id:
'item-build-component'
}
%div
%p
%h5
build -
%a
{
:href
=>
"build.url"
}
{{ build.title }}
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