Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
f668a785
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,发现更多精彩内容 >>
未验证
提交
f668a785
编写于
6月 29, 2016
作者:
C
Connor Shea
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Starting work on the warn_on_failure feature for the MR build status.
上级
1d7ac164
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
23 addition
and
5 deletion
+23
-5
app/assets/javascripts/merge_request_widget.js.coffee
app/assets/javascripts/merge_request_widget.js.coffee
+4
-2
app/assets/stylesheets/pages/merge_requests.scss
app/assets/stylesheets/pages/merge_requests.scss
+8
-0
app/assets/stylesheets/pages/status.scss
app/assets/stylesheets/pages/status.scss
+6
-2
app/helpers/ci_status_helper.rb
app/helpers/ci_status_helper.rb
+4
-0
app/views/projects/merge_requests/widget/_heading.html.haml
app/views/projects/merge_requests/widget/_heading.html.haml
+1
-1
未找到文件。
app/assets/javascripts/merge_request_widget.js.coffee
浏览文件 @
f668a785
...
...
@@ -57,6 +57,8 @@ class @MergeRequestWidget
ciLabelForStatus
:
(
status
)
->
if
status
is
'success'
'passed'
else
if
status
is
'success_with_warnings'
'passed with warnings'
else
status
...
...
@@ -116,7 +118,7 @@ class @MergeRequestWidget
showCIStatus
:
(
state
)
->
return
if
not
state
?
$
(
'.ci_widget'
).
hide
()
allowed_states
=
[
"failed"
,
"canceled"
,
"running"
,
"pending"
,
"success"
,
"skipped"
,
"not_found"
]
allowed_states
=
[
"failed"
,
"canceled"
,
"running"
,
"pending"
,
"success"
,
"s
uccess_with_warnings"
,
"s
kipped"
,
"not_found"
]
if
state
in
allowed_states
$
(
'.ci_widget.ci-'
+
state
).
show
()
switch
state
...
...
@@ -124,7 +126,7 @@ class @MergeRequestWidget
@
setMergeButtonClass
(
'btn-danger'
)
when
"running"
@
setMergeButtonClass
(
'btn-warning'
)
when
"success"
when
"success"
,
"success_with_warnings"
@
setMergeButtonClass
(
'btn-create'
)
else
$
(
'.ci_widget.ci-error'
).
show
()
...
...
app/assets/stylesheets/pages/merge_requests.scss
浏览文件 @
f668a785
...
...
@@ -68,6 +68,14 @@
color
:
$gl-success
;
}
&
.ci-success_with_warnings
{
color
:
$gl-success
;
i
{
color
:
$gl-warning
;
}
}
&
.ci-skipped
{
background-color
:
#eee
;
color
:
#888
;
...
...
app/assets/stylesheets/pages/status.scss
浏览文件 @
f668a785
...
...
@@ -15,7 +15,8 @@
border-color
:
$gl-danger
;
}
&
.ci-success
{
&
.ci-success
,
&
.ci-success_with_warnings
{
color
:
$gl-success
;
border-color
:
$gl-success
;
}
...
...
@@ -49,9 +50,12 @@
.ci-status-icon-failed
{
color
:
$gl-danger
;
}
.ci-status-icon-pending
{
.ci-status-icon-pending
,
.ci-status-icon-success_with_warning
{
color
:
$gl-warning
;
}
.ci-status-icon-running
{
color
:
$blue-normal
;
}
...
...
app/helpers/ci_status_helper.rb
浏览文件 @
f668a785
...
...
@@ -17,6 +17,8 @@ module CiStatusHelper
def
ci_label_for_status
(
status
)
if
status
==
'success'
'passed'
elsif
status
==
'success_with_warnings'
'passed with warnings'
else
status
end
...
...
@@ -27,6 +29,8 @@ module CiStatusHelper
case
status
when
'success'
'check'
when
'success_with_warnings'
'exclamation-triangle'
when
'failed'
'close'
when
'pending'
...
...
app/views/projects/merge_requests/widget/_heading.html.haml
浏览文件 @
f668a785
-
if
@pipeline
.mr-widget-heading
-
%w[success skipped canceled failed running pending]
.
each
do
|
status
|
-
%w[success s
uccess_with_warnings s
kipped canceled failed running pending]
.
each
do
|
status
|
.ci_widget
{
class:
"ci-#{status}"
,
style:
(
"display:none"
unless
@pipeline
.
status
==
status
)
}
=
ci_icon_for_status
(
status
)
%span
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录