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
1a7cc190
Commit
1a7cc190
authored
Nov 18, 2016
by
Alfredo Sumaran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make linters happy
parent
283134a7
Changes
13
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
40 additions
and
92 deletions
+40
-92
.eslintrc
.eslintrc
+2
-1
app/assets/javascripts/cycle_analytics/components/item_commit_component.js.es6
...s/cycle_analytics/components/item_commit_component.js.es6
+0
-49
app/assets/javascripts/cycle_analytics/components/stage_code_component.js.es6
...ts/cycle_analytics/components/stage_code_component.js.es6
+1
-2
app/assets/javascripts/cycle_analytics/components/stage_issue_component.js.es6
...s/cycle_analytics/components/stage_issue_component.js.es6
+1
-2
app/assets/javascripts/cycle_analytics/components/stage_plan_component.js.es6
...ts/cycle_analytics/components/stage_plan_component.js.es6
+1
-2
app/assets/javascripts/cycle_analytics/components/stage_production_component.js.es6
...le_analytics/components/stage_production_component.js.es6
+2
-3
app/assets/javascripts/cycle_analytics/components/stage_review_component.js.es6
.../cycle_analytics/components/stage_review_component.js.es6
+1
-2
app/assets/javascripts/cycle_analytics/components/stage_staging_component.js.es6
...cycle_analytics/components/stage_staging_component.js.es6
+1
-2
app/assets/javascripts/cycle_analytics/components/stage_test_component.js.es6
...ts/cycle_analytics/components/stage_test_component.js.es6
+1
-2
app/assets/javascripts/cycle_analytics/components/total_time_component.js.es6
...ts/cycle_analytics/components/total_time_component.js.es6
+2
-1
app/assets/javascripts/cycle_analytics/cycle_analytics_service.js.es6
...avascripts/cycle_analytics/cycle_analytics_service.js.es6
+8
-8
app/assets/javascripts/cycle_analytics/cycle_analytics_store.js.es6
.../javascripts/cycle_analytics/cycle_analytics_store.js.es6
+5
-5
app/assets/stylesheets/pages/cycle_analytics.scss
app/assets/stylesheets/pages/cycle_analytics.scss
+15
-13
No files found.
.eslintrc
View file @
1a7cc190
...
@@ -25,6 +25,7 @@
...
@@ -25,6 +25,7 @@
"Turbolinks": false,
"Turbolinks": false,
"window": false,
"window": false,
"Vue": false,
"Vue": false,
"Flash": false
"Flash": false,
"Cookies": false
}
}
}
}
app/assets/javascripts/cycle_analytics/components/item_commit_component.js.es6
deleted
100644 → 0
View file @
283134a7
((global) => {
global.cycleAnalytics = global.cycleAnalytics || {};
/*
`commit` prop should have
- Commit title
- Commit URL
- Commit Short SHA
- Commit author
- Commit author profile URL
- Commit author avatar URL
- Total time
*/
global.cycleAnalytics.ItemCommitComponent = Vue.extend({
props: {
commit: Object,
},
template: `
<div>
<div class="item-details item-conmmit-component">
<img class="avatar" :src="commit.author.avatarUrl">
<h5 class="item-title commit-title">
<a :href="commit.commitUrl">
{{ commit.title }}
</a>
</h5>
<span>
First
<span class="commit-icon">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 40 40">
<path fill="#8F8F8F" fill-rule="evenodd" d="M28.7769836,18 C27.8675252,13.9920226 24.2831748,11 20,11 C15.7168252,11 12.1324748,13.9920226 11.2230164,18 L4.0085302,18 C2.90195036,18 2,18.8954305 2,20 C2,21.1122704 2.8992496,22 4.0085302,22 L11.2230164,22 C12.1324748,26.0079774 15.7168252,29 20,29 C24.2831748,29 27.8675252,26.0079774 28.7769836,22 L35.9914698,22 C37.0980496,22 38,21.1045695 38,20 C38,18.8877296 37.1007504,18 35.9914698,18 L28.7769836,18 L28.7769836,18 Z M20,25 C22.7614237,25 25,22.7614237 25,20 C25,17.2385763 22.7614237,15 20,15 C17.2385763,15 15,17.2385763 15,20 C15,22.7614237 17.2385763,25 20,25 L20,25 Z"/>
</svg>
</span>
<a :href="commit.commitUrl" class="commit-hash-link monospace">{{ commit.shortSha }}</a>
pushed by
<a :href="commit.author.webUrl" class="commit-author-link">
{{ commit.author.name }}
</a>
</span>
</div>
<div class="item-time">
<total-time :time="commit.totalTime"></total-time>
</div>
<div>
`,
});
}(window.gl || (window.gl = {})));
app/assets/javascripts/cycle_analytics/components/stage_code_component.js.es6
View file @
1a7cc190
/* eslint-disable no-param-reassign */
((global) => {
((global) => {
global.cycleAnalytics = global.cycleAnalytics || {};
global.cycleAnalytics = global.cycleAnalytics || {};
global.cycleAnalytics.StageCodeComponent = Vue.extend({
global.cycleAnalytics.StageCodeComponent = Vue.extend({
...
@@ -40,5 +40,4 @@
...
@@ -40,5 +40,4 @@
</div>
</div>
`,
`,
});
});
})(window.gl || (window.gl = {}));
})(window.gl || (window.gl = {}));
app/assets/javascripts/cycle_analytics/components/stage_issue_component.js.es6
View file @
1a7cc190
/* eslint-disable no-param-reassign */
((global) => {
((global) => {
global.cycleAnalytics = global.cycleAnalytics || {};
global.cycleAnalytics = global.cycleAnalytics || {};
global.cycleAnalytics.StageIssueComponent = Vue.extend({
global.cycleAnalytics.StageIssueComponent = Vue.extend({
...
@@ -42,5 +42,4 @@
...
@@ -42,5 +42,4 @@
</div>
</div>
`,
`,
});
});
})(window.gl || (window.gl = {}));
})(window.gl || (window.gl = {}));
app/assets/javascripts/cycle_analytics/components/stage_plan_component.js.es6
View file @
1a7cc190
/* eslint-disable no-param-reassign */
((global) => {
((global) => {
global.cycleAnalytics = global.cycleAnalytics || {};
global.cycleAnalytics = global.cycleAnalytics || {};
global.cycleAnalytics.StagePlanComponent = Vue.extend({
global.cycleAnalytics.StagePlanComponent = Vue.extend({
...
@@ -43,5 +43,4 @@
...
@@ -43,5 +43,4 @@
</div>
</div>
`,
`,
});
});
})(window.gl || (window.gl = {}));
})(window.gl || (window.gl = {}));
app/assets/javascripts/cycle_analytics/components/stage_production_component.js.es6
View file @
1a7cc190
/* eslint-disable no-param-reassign */
((global) => {
((global) => {
global.cycleAnalytics = global.cycleAnalytics || {};
global.cycleAnalytics = global.cycleAnalytics || {};
global.cycleAnalytics.StageProductionComponent = Vue.extend({
global.cycleAnalytics.StageProductionComponent = Vue.extend({
...
@@ -40,7 +40,6 @@
...
@@ -40,7 +40,6 @@
</li>
</li>
</ul>
</ul>
</div>
</div>
`
`
,
});
});
})(window.gl || (window.gl = {}));
})(window.gl || (window.gl = {}));
app/assets/javascripts/cycle_analytics/components/stage_review_component.js.es6
View file @
1a7cc190
/* eslint-disable no-param-reassign */
((global) => {
((global) => {
global.cycleAnalytics = global.cycleAnalytics || {};
global.cycleAnalytics = global.cycleAnalytics || {};
global.cycleAnalytics.StageReviewComponent = Vue.extend({
global.cycleAnalytics.StageReviewComponent = Vue.extend({
...
@@ -52,5 +52,4 @@
...
@@ -52,5 +52,4 @@
</div>
</div>
`,
`,
});
});
})(window.gl || (window.gl = {}));
})(window.gl || (window.gl = {}));
app/assets/javascripts/cycle_analytics/components/stage_staging_component.js.es6
View file @
1a7cc190
/* eslint-disable no-param-reassign */
((global) => {
((global) => {
global.cycleAnalytics = global.cycleAnalytics || {};
global.cycleAnalytics = global.cycleAnalytics || {};
global.cycleAnalytics.StageStagingComponent = Vue.extend({
global.cycleAnalytics.StageStagingComponent = Vue.extend({
...
@@ -43,5 +43,4 @@
...
@@ -43,5 +43,4 @@
</div>
</div>
`,
`,
});
});
})(window.gl || (window.gl = {}));
})(window.gl || (window.gl = {}));
app/assets/javascripts/cycle_analytics/components/stage_test_component.js.es6
View file @
1a7cc190
/* eslint-disable no-param-reassign */
((global) => {
((global) => {
global.cycleAnalytics = global.cycleAnalytics || {};
global.cycleAnalytics = global.cycleAnalytics || {};
global.cycleAnalytics.StageTestComponent = Vue.extend({
global.cycleAnalytics.StageTestComponent = Vue.extend({
...
@@ -50,5 +50,4 @@
...
@@ -50,5 +50,4 @@
</div>
</div>
`,
`,
});
});
})(window.gl || (window.gl = {}));
})(window.gl || (window.gl = {}));
app/assets/javascripts/cycle_analytics/components/total_time_component.js.es6
View file @
1a7cc190
/* eslint-disable no-param-reassign */
((global) => {
((global) => {
global.cycleAnalytics = global.cycleAnalytics || {};
global.cycleAnalytics = global.cycleAnalytics || {};
...
@@ -10,7 +11,7 @@
...
@@ -10,7 +11,7 @@
<template v-if="time.days">{{ time.days }} <span>{{ time.days === 1 ? 'day' : 'days' }}</span></template>
<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.hours">{{ time.hours }} <span>hr</span></template>
<template v-if="time.mins && !time.days">{{ time.mins }} <span>mins</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 v-if="time.seconds && Object.keys(time).length === 1 ||
time.seconds === 0">{{ time.seconds }} <span>s</span></template>
</span>
</span>
`,
`,
});
});
...
...
app/assets/javascripts/cycle_analytics/cycle_analytics_service.js.es6
View file @
1a7cc190
/* eslint-disable no-param-reassign */
((global) => {
((global) => {
global.cycleAnalytics = global.cycleAnalytics || {};
global.cycleAnalytics = global.cycleAnalytics || {};
...
@@ -16,26 +17,25 @@
...
@@ -16,26 +17,25 @@
contentType: 'application/json',
contentType: 'application/json',
data: {
data: {
cycle_analytics: {
cycle_analytics: {
start_date: options.startDate
start_date: options.startDate
,
}
}
,
}
}
,
});
});
}
}
fetchStageData(options) {
fetchStageData(options) {
le
t {
cons
t {
stage,
stage,
startDate,
startDate,
} = options;
} = options;
return $.get(`${this.requestPath}/events/${stage.title.toLowerCase()}.json`, {
return $.get(`${this.requestPath}/events/${stage.title.toLowerCase()}.json`, {
cycle_analytics: {
cycle_analytics: {
start_date:
options.startDate
start_date:
startDate,
}
}
,
});
});
}
}
}
;
}
global.cycleAnalytics.CycleAnalyticsService = CycleAnalyticsService;
global.cycleAnalytics.CycleAnalyticsService = CycleAnalyticsService;
})(window.gl || (window.gl = {}));
})(window.gl || (window.gl = {}));
app/assets/javascripts/cycle_analytics/cycle_analytics_store.js.es6
View file @
1a7cc190
/* eslint-disable no-param-reassign */
((global) => {
((global) => {
global.cycleAnalytics = global.cycleAnalytics || {};
global.cycleAnalytics = global.cycleAnalytics || {};
...
@@ -7,13 +8,13 @@
...
@@ -7,13 +8,13 @@
stats: '',
stats: '',
analytics: '',
analytics: '',
events: [],
events: [],
stages:[],
stages:
[],
},
},
setCycleAnalyticsData(data) {
setCycleAnalyticsData(data) {
this.state = Object.assign(this.state, this.decorateData(data));
this.state = Object.assign(this.state, this.decorateData(data));
},
},
decorateData(data) {
decorateData(data) {
le
t newData = {};
cons
t newData = {};
newData.stages = data.stats || [];
newData.stages = data.stats || [];
newData.summary = data.summary || [];
newData.summary = data.summary || [];
...
@@ -38,7 +39,7 @@
...
@@ -38,7 +39,7 @@
this.state.hasError = state;
this.state.hasError = state;
},
},
deactivateAllStages() {
deactivateAllStages() {
this.state.stages.forEach(
stage
=> {
this.state.stages.forEach(
(stage)
=> {
stage.active = false;
stage.active = false;
});
});
},
},
...
@@ -50,7 +51,7 @@
...
@@ -50,7 +51,7 @@
this.state.events = this.decorateEvents(events);
this.state.events = this.decorateEvents(events);
},
},
decorateEvents(events) {
decorateEvents(events) {
le
t newEvents = events;
cons
t newEvents = events;
newEvents.forEach((item) => {
newEvents.forEach((item) => {
item.totalTime = item.total_time;
item.totalTime = item.total_time;
...
@@ -75,5 +76,4 @@
...
@@ -75,5 +76,4 @@
return this.state.stages.find(stage => stage.active);
return this.state.stages.find(stage => stage.active);
},
},
};
};
})(window.gl || (window.gl = {}));
})(window.gl || (window.gl = {}));
app/assets/stylesheets/pages/cycle_analytics.scss
View file @
1a7cc190
...
@@ -216,7 +216,7 @@
...
@@ -216,7 +216,7 @@
border-right-color
:
transparent
;
border-right-color
:
transparent
;
border-top-color
:
$border-color
;
border-top-color
:
$border-color
;
border-bottom-color
:
$border-color
;
border-bottom-color
:
$border-color
;
box-shadow
:
inset
2px
0
px
0px
0px
$active-item-blue
;
box-shadow
:
inset
2px
0
0
0
$active-item-blue
;
.stage-name
{
.stage-name
{
font-weight
:
600
;
font-weight
:
600
;
...
@@ -279,7 +279,7 @@
...
@@ -279,7 +279,7 @@
.stage-event-item
{
.stage-event-item
{
list-style-type
:
none
;
list-style-type
:
none
;
padding
:
0
0
$gl-padding
;
padding
:
0
0
$gl-padding
;
margin
:
0
$gl-padding
$gl-padding
$gl-padding
;
margin
:
0
$gl-padding
$gl-padding
;
border-bottom
:
solid
1px
$gray-darker
;
border-bottom
:
solid
1px
$gray-darker
;
@include
clearfix
;
@include
clearfix
;
...
@@ -288,7 +288,8 @@
...
@@ -288,7 +288,8 @@
margin-bottom
:
0
;
margin-bottom
:
0
;
}
}
.item-details
,
.item-time
{
.item-details
,
.item-time
{
float
:
left
;
float
:
left
;
}
}
...
@@ -297,9 +298,11 @@
...
@@ -297,9 +298,11 @@
}
}
.item-title
{
.item-title
{
margin
:
0
0
2px
0
;
margin
:
0
0
2px
;
&
.issue-title
,
&
.commit-title
,
&
.merge-merquest-title
{
&
.issue-title
,
&
.commit-title
,
&
.merge-merquest-title
{
max-width
:
100%
;
max-width
:
100%
;
display
:
block
;
display
:
block
;
@include
text-overflow
();
@include
text-overflow
();
...
@@ -325,7 +328,8 @@
...
@@ -325,7 +328,8 @@
}
}
}
}
.issue-date
,
.build-date
{
.issue-date
,
.build-date
{
color
:
$gl-text-color
;
color
:
$gl-text-color
;
}
}
...
@@ -434,12 +438,10 @@
...
@@ -434,12 +438,10 @@
align-items
:
center
;
align-items
:
center
;
}
}
.overview-text
{
}
.overview-image
{
.overview-image
{
text-align
:
right
;
text-align
:
right
;
}
}
.overview-icon
{
.overview-icon
{
svg
{
svg
{
width
:
365px
;
width
:
365px
;
...
...
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