Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
7b207847
G
gitlab-foss
项目概览
李少辉-开发者
/
gitlab-foss
通知
15
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gitlab-foss
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
7b207847
编写于
2月 10, 2017
作者:
A
Alfredo Sumaran
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Revert "Merge branch 'add-additional-checks-to-ca-data' into 'master'
This reverts commit
b7c5ca49
, reversing changes made to
9745c98b
.
上级
63caff8f
变更
14
隐藏空白更改
内联
并排
Showing
14 changed file
with
29 addition
and
167 deletion
+29
-167
app/assets/javascripts/cycle_analytics/cycle_analytics_bundle.js.es6
...javascripts/cycle_analytics/cycle_analytics_bundle.js.es6
+2
-2
app/assets/javascripts/cycle_analytics/cycle_analytics_store.js.es6
.../javascripts/cycle_analytics/cycle_analytics_store.js.es6
+20
-27
app/assets/javascripts/cycle_analytics/default_event_objects.js.es6
.../javascripts/cycle_analytics/default_event_objects.js.es6
+0
-98
app/assets/javascripts/lib/utils/text_utility.js
app/assets/javascripts/lib/utils/text_utility.js
+1
-9
app/assets/javascripts/wikis.js.es6
app/assets/javascripts/wikis.js.es6
+5
-1
app/serializers/analytics_stage_entity.rb
app/serializers/analytics_stage_entity.rb
+0
-1
app/views/projects/cycle_analytics/show.html.haml
app/views/projects/cycle_analytics/show.html.haml
+1
-1
lib/gitlab/cycle_analytics/code_stage.rb
lib/gitlab/cycle_analytics/code_stage.rb
+0
-4
lib/gitlab/cycle_analytics/issue_stage.rb
lib/gitlab/cycle_analytics/issue_stage.rb
+0
-4
lib/gitlab/cycle_analytics/plan_stage.rb
lib/gitlab/cycle_analytics/plan_stage.rb
+0
-4
lib/gitlab/cycle_analytics/production_stage.rb
lib/gitlab/cycle_analytics/production_stage.rb
+0
-4
lib/gitlab/cycle_analytics/review_stage.rb
lib/gitlab/cycle_analytics/review_stage.rb
+0
-4
lib/gitlab/cycle_analytics/staging_stage.rb
lib/gitlab/cycle_analytics/staging_stage.rb
+0
-4
lib/gitlab/cycle_analytics/test_stage.rb
lib/gitlab/cycle_analytics/test_stage.rb
+0
-4
未找到文件。
app/assets/javascripts/cycle_analytics/cycle_analytics_bundle.js.es6
浏览文件 @
7b207847
...
...
@@ -97,7 +97,7 @@ $(() => {
}
this.isLoadingStage = true;
cycleAnalyticsStore.setStageEvents([]
, stage
);
cycleAnalyticsStore.setStageEvents([]);
cycleAnalyticsStore.setActiveStage(stage);
cycleAnalyticsService
...
...
@@ -107,7 +107,7 @@ $(() => {
})
.done((response) => {
this.isEmptyStage = !response.events.length;
cycleAnalyticsStore.setStageEvents(response.events
, stage
);
cycleAnalyticsStore.setStageEvents(response.events);
})
.error(() => {
this.isEmptyStage = true;
...
...
app/assets/javascripts/cycle_analytics/cycle_analytics_store.js.es6
浏览文件 @
7b207847
/* eslint-disable no-param-reassign */
require('../lib/utils/text_utility');
const DEFAULT_EVENT_OBJECTS = require('./default_event_objects');
((global) => {
global.cycleAnalytics = global.cycleAnalytics || {};
...
...
@@ -38,12 +34,11 @@ const DEFAULT_EVENT_OBJECTS = require('./default_event_objects');
});
newData.stages.forEach((item) => {
const stage
Slug = gl.text.dasherize(item.title.toLowerCase()
);
const stage
Name = item.title.toLowerCase(
);
item.active = false;
item.isUserAllowed = data.permissions[stageSlug];
item.emptyStageText = EMPTY_STAGE_TEXTS[stageSlug];
item.component = `stage-${stageSlug}-component`;
item.slug = stageSlug;
item.isUserAllowed = data.permissions[stageName];
item.emptyStageText = EMPTY_STAGE_TEXTS[stageName];
item.component = `stage-${stageName}-component`;
});
newData.analytics = data;
return newData;
...
...
@@ -63,33 +58,31 @@ const DEFAULT_EVENT_OBJECTS = require('./default_event_objects');
this.deactivateAllStages();
stage.active = true;
},
setStageEvents(events
, stage
) {
this.state.events = this.decorateEvents(events
, stage
);
setStageEvents(events) {
this.state.events = this.decorateEvents(events);
},
decorateEvents(events
, stage
) {
decorateEvents(events) {
const newEvents = [];
events.forEach((item) => {
if (!item) return;
const eventItem = Object.assign({}, DEFAULT_EVENT_OBJECTS[stage.slug], item);
eventItem.totalTime = eventItem.total_time;
eventItem.author.webUrl = eventItem.author.web_url;
eventItem.author.avatarUrl = eventItem.author.avatar_url;
item.totalTime = item.total_time;
item.author.webUrl = item.author.web_url;
item.author.avatarUrl = item.author.avatar_url;
if (
eventItem.created_at) eventItem.createdAt = eventI
tem.created_at;
if (
eventItem.short_sha) eventItem.shortSha = eventI
tem.short_sha;
if (
eventItem.commit_url) eventItem.commitUrl = eventI
tem.commit_url;
if (
item.created_at) item.createdAt = i
tem.created_at;
if (
item.short_sha) item.shortSha = i
tem.short_sha;
if (
item.commit_url) item.commitUrl = i
tem.commit_url;
delete
eventI
tem.author.web_url;
delete
eventI
tem.author.avatar_url;
delete
eventI
tem.total_time;
delete
eventI
tem.created_at;
delete
eventI
tem.short_sha;
delete
eventI
tem.commit_url;
delete
i
tem.author.web_url;
delete
i
tem.author.avatar_url;
delete
i
tem.total_time;
delete
i
tem.created_at;
delete
i
tem.short_sha;
delete
i
tem.commit_url;
newEvents.push(
eventI
tem);
newEvents.push(
i
tem);
});
return newEvents;
...
...
app/assets/javascripts/cycle_analytics/default_event_objects.js.es6
已删除
100644 → 0
浏览文件 @
63caff8f
module.exports = {
issue: {
created_at: '',
url: '',
iid: '',
title: '',
total_time: {},
author: {
avatar_url: '',
id: '',
name: '',
web_url: '',
},
},
plan: {
title: '',
commit_url: '',
short_sha: '',
total_time: {},
author: {
name: '',
id: '',
avatar_url: '',
web_url: '',
},
},
code: {
title: '',
iid: '',
created_at: '',
url: '',
total_time: {},
author: {
name: '',
id: '',
avatar_url: '',
web_url: '',
},
},
test: {
name: '',
id: '',
date: '',
url: '',
short_sha: '',
commit_url: '',
total_time: {},
branch: {
name: '',
url: '',
},
},
review: {
title: '',
iid: '',
created_at: '',
url: '',
state: '',
total_time: {},
author: {
name: '',
id: '',
avatar_url: '',
web_url: '',
},
},
staging: {
id: '',
short_sha: '',
date: '',
url: '',
commit_url: '',
total_time: {},
author: {
name: '',
id: '',
avatar_url: '',
web_url: '',
},
branch: {
name: '',
url: '',
},
},
production: {
title: '',
created_at: '',
url: '',
iid: '',
total_time: {},
author: {
name: '',
id: '',
avatar_url: '',
web_url: '',
},
},
};
app/assets/javascripts/lib/utils/text_utility.js
浏览文件 @
7b207847
/* eslint-disable func-names, space-before-function-paren, wrap-iife, no-var, no-param-reassign, no-cond-assign, quotes, one-var, one-var-declaration-per-line, operator-assignment, no-else-return, prefer-template, prefer-arrow-callback, no-empty, max-len, consistent-return, no-unused-vars, no-return-assign, max-len */
require
(
'
vendor/latinise
'
);
(
function
()
{
(
function
(
w
)
{
var
base
;
...
...
@@ -166,14 +164,8 @@ require('vendor/latinise');
gl
.
text
.
pluralize
=
function
(
str
,
count
)
{
return
str
+
(
count
>
1
||
count
===
0
?
'
s
'
:
''
);
};
gl
.
text
.
truncate
=
function
(
string
,
maxLength
)
{
return
gl
.
text
.
truncate
=
function
(
string
,
maxLength
)
{
return
string
.
substr
(
0
,
(
maxLength
-
3
))
+
'
...
'
;
};
gl
.
text
.
dasherize
=
function
(
str
)
{
return
str
.
replace
(
/
[
_
\s]
+/g
,
'
-
'
);
};
gl
.
text
.
slugify
=
function
(
str
)
{
return
str
.
trim
().
toLowerCase
().
latinise
();
};
})(
window
);
}).
call
(
this
);
app/assets/javascripts/wikis.js.es6
浏览文件 @
7b207847
/* eslint-disable no-param-reassign */
/* global Breakpoints */
require('vendor/latinise');
require('./breakpoints');
require('vendor/jquery.nicescroll');
((global) => {
const dasherize = str => str.replace(/[_\s]+/g, '-');
const slugify = str => dasherize(str.trim().toLowerCase().latinise());
class Wikis {
constructor() {
this.bp = Breakpoints.get();
...
...
@@ -30,7 +34,7 @@ require('vendor/jquery.nicescroll');
if (!this.newWikiForm) return;
const slugInput = this.newWikiForm.querySelector('#new_wiki_path');
const slug =
gl.text.
slugify(slugInput.value);
const slug = slugify(slugInput.value);
if (slug.length > 0) {
const wikisPath = slugInput.getAttribute('data-wikis-path');
...
...
app/serializers/analytics_stage_entity.rb
浏览文件 @
7b207847
...
...
@@ -2,7 +2,6 @@ class AnalyticsStageEntity < Grape::Entity
include
EntityDateHelper
expose
:title
expose
:legend
expose
:description
expose
:median
,
as: :value
do
|
stage
|
...
...
app/views/projects/cycle_analytics/show.html.haml
浏览文件 @
7b207847
...
...
@@ -44,7 +44,7 @@
Last 90 days
.stage-panel-container
.panel.panel-default.stage-panel
.panel-heading
.panel-heading
%nav
.col-headers
%ul
%li
.stage-header
...
...
lib/gitlab/cycle_analytics/code_stage.rb
浏览文件 @
7b207847
...
...
@@ -13,10 +13,6 @@ module Gitlab
:code
end
def
legend
"Related Merge Requests"
end
def
description
"Time until first merge request"
end
...
...
lib/gitlab/cycle_analytics/issue_stage.rb
浏览文件 @
7b207847
...
...
@@ -14,10 +14,6 @@ module Gitlab
:issue
end
def
legend
"Related Issues"
end
def
description
"Time before an issue gets scheduled"
end
...
...
lib/gitlab/cycle_analytics/plan_stage.rb
浏览文件 @
7b207847
...
...
@@ -14,10 +14,6 @@ module Gitlab
:plan
end
def
legend
"Related Commits"
end
def
description
"Time before an issue starts implementation"
end
...
...
lib/gitlab/cycle_analytics/production_stage.rb
浏览文件 @
7b207847
...
...
@@ -15,10 +15,6 @@ module Gitlab
:production
end
def
legend
"Related Issues"
end
def
description
"From issue creation until deploy to production"
end
...
...
lib/gitlab/cycle_analytics/review_stage.rb
浏览文件 @
7b207847
...
...
@@ -13,10 +13,6 @@ module Gitlab
:review
end
def
legend
"Relative Merged Requests"
end
def
description
"Time between merge request creation and merge/close"
end
...
...
lib/gitlab/cycle_analytics/staging_stage.rb
浏览文件 @
7b207847
...
...
@@ -14,10 +14,6 @@ module Gitlab
:staging
end
def
legend
"Relative Deployed Builds"
end
def
description
"From merge request merge until deploy to production"
end
...
...
lib/gitlab/cycle_analytics/test_stage.rb
浏览文件 @
7b207847
...
...
@@ -13,10 +13,6 @@ module Gitlab
:test
end
def
legend
"Relative Builds Trigger by Commits"
end
def
description
"Total test time for all commits/merges"
end
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录