Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
65f32060
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,发现更多精彩内容 >>
提交
65f32060
编写于
12月 08, 2016
作者:
K
Kamil Trzcinski
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove ci_status_with_icon helper and replace it with partial [ci skip]
上级
609bc0a0
变更
8
显示空白变更内容
内联
并排
Showing
8 changed file
with
17 addition
and
34 deletion
+17
-34
app/helpers/ci_status_helper.rb
app/helpers/ci_status_helper.rb
+1
-19
app/views/admin/runners/show.html.haml
app/views/admin/runners/show.html.haml
+1
-1
app/views/ci/status/_icon_with_label.html.haml
app/views/ci/status/_icon_with_label.html.haml
+10
-0
app/views/projects/builds/_header.html.haml
app/views/projects/builds/_header.html.haml
+1
-1
app/views/projects/ci/builds/_build.html.haml
app/views/projects/ci/builds/_build.html.haml
+1
-4
app/views/projects/ci/pipelines/_pipeline.html.haml
app/views/projects/ci/pipelines/_pipeline.html.haml
+1
-4
app/views/projects/generic_commit_statuses/_generic_commit_status.html.haml
.../generic_commit_statuses/_generic_commit_status.html.haml
+1
-4
app/views/projects/pipelines/_info.html.haml
app/views/projects/pipelines/_info.html.haml
+1
-1
未找到文件。
app/helpers/ci_status_helper.rb
浏览文件 @
65f32060
...
...
@@ -4,25 +4,7 @@ module CiStatusHelper
builds_namespace_project_commit_path
(
project
.
namespace
,
project
,
pipeline
.
sha
)
end
def
ci_status_with_icon
(
status
,
target
=
nil
)
content
=
ci_icon_for_status
(
status
)
+
ci_text_for_status
(
status
)
klass
=
"ci-status ci-
#{
status
}
"
if
target
link_to
content
,
target
,
class:
klass
else
content_tag
:span
,
content
,
class:
klass
end
end
def
ci_text_for_status
(
status
)
if
detailed_status?
(
status
)
status
.
text
else
status
end
end
# Is used by Commit and Merge Request Widget
def
ci_label_for_status
(
status
)
if
detailed_status?
(
status
)
return
status
.
label
...
...
app/views/admin/runners/show.html.haml
浏览文件 @
65f32060
...
...
@@ -91,7 +91,7 @@
%strong
##{build.id}
%td
.status
=
ci_status_with_icon
(
build
.
status
)
=
render
"ci/status/icon_with_label"
,
subject:
build
%td
.status
-
if
project
...
...
app/views/ci/status/_icon_with_label.html.haml
0 → 100644
浏览文件 @
65f32060
-
details_path
=
subject
.
details_path
if
subject
.
has_details?
(
current_user
)
-
klass
=
"ci-status ci-
#{
subject
.
status
}
"
-
if
details_path
=
link_to
details_path
,
class:
klass
do
=
custom_icon
(
status
.
icon
)
=
status
.
text
-
else
%span
{
class:
klass
}
=
custom_icon
(
status
.
icon
)
=
status
.
text
app/views/projects/builds/_header.html.haml
浏览文件 @
65f32060
.content-block.build-header
.header-content
=
ci_status_with_icon
(
@build
.
status
)
=
render
"ci/status/icon_with_label"
,
subject:
build
Build
%strong
##{@build.id}
in pipeline
...
...
app/views/projects/ci/builds/_build.html.haml
浏览文件 @
65f32060
...
...
@@ -9,10 +9,7 @@
%tr
.build.commit
{
class:
(
'retried'
if
retried
)}
%td
.status
-
if
can?
(
current_user
,
:read_build
,
build
)
=
ci_status_with_icon
(
build
.
status
,
namespace_project_build_url
(
build
.
project
.
namespace
,
build
.
project
,
build
))
-
else
=
ci_status_with_icon
(
build
.
status
)
=
render
"ci/status/icon_with_label"
,
subject:
build
%td
.branch-commit
-
if
can?
(
current_user
,
:read_build
,
build
)
...
...
app/views/projects/ci/pipelines/_pipeline.html.haml
浏览文件 @
65f32060
-
status
=
pipeline
.
status
-
detailed_status
=
pipeline
.
detailed_status
-
show_commit
=
local_assigns
.
fetch
(
:show_commit
,
true
)
-
show_branch
=
local_assigns
.
fetch
(
:show_branch
,
true
)
%tr
.commit
%td
.commit-link
=
link_to
namespace_project_pipeline_path
(
pipeline
.
project
.
namespace
,
pipeline
.
project
,
pipeline
.
id
),
class:
"ci-status ci-
#{
detailed_status
}
"
do
=
ci_icon_for_status
(
detailed_status
)
=
ci_text_for_status
(
detailed_status
)
=
render
"ci/status/icon_with_label"
,
subject:
pipeline
%td
=
link_to
namespace_project_pipeline_path
(
pipeline
.
project
.
namespace
,
pipeline
.
project
,
pipeline
.
id
)
do
...
...
app/views/projects/generic_commit_statuses/_generic_commit_status.html.haml
浏览文件 @
65f32060
...
...
@@ -8,10 +8,7 @@
%tr
.generic_commit_status
{
class:
(
'retried'
if
retried
)}
%td
.status
-
if
can?
(
current_user
,
:read_commit_status
,
generic_commit_status
)
&&
generic_commit_status
.
target_url
=
ci_status_with_icon
(
generic_commit_status
.
status
,
generic_commit_status
.
target_url
)
-
else
=
ci_status_with_icon
(
generic_commit_status
.
status
)
=
render
"ci/status/icon_with_label"
,
subject:
generic_commit_status
%td
.generic_commit_status-link
-
if
can?
(
current_user
,
:read_commit_status
,
generic_commit_status
)
&&
generic_commit_status
.
target_url
...
...
app/views/projects/pipelines/_info.html.haml
浏览文件 @
65f32060
.page-content-header
.header-main-content
=
ci_status_with_icon
(
@pipeline
.
detailed_status
)
=
render
"ci/status/icon_with_label"
,
subject:
@pipeline
%strong
Pipeline ##{@commit.pipelines.last.id}
triggered
#{
time_ago_with_tooltip
(
@commit
.
authored_date
)
}
by
=
author_avatar
(
@commit
,
size:
24
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录