Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
4daffbe4
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,发现更多精彩内容 >>
未验证
提交
4daffbe4
编写于
9月 19, 2015
作者:
D
Dmitriy Zaporozhets
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Cleanup GitLab CI UI
Signed-off-by:
N
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
上级
34da6f00
变更
12
显示空白变更内容
内联
并排
Showing
12 changed file
with
132 addition
and
162 deletion
+132
-162
app/assets/stylesheets/ci/projects.scss
app/assets/stylesheets/ci/projects.scss
+34
-49
app/helpers/ci/application_helper.rb
app/helpers/ci/application_helper.rb
+22
-0
app/helpers/ci/builds_helper.rb
app/helpers/ci/builds_helper.rb
+0
-22
app/helpers/ci/commits_helper.rb
app/helpers/ci/commits_helper.rb
+0
-15
app/views/ci/admin/builds/_build.html.haml
app/views/ci/admin/builds/_build.html.haml
+2
-2
app/views/ci/admin/projects/_project.html.haml
app/views/ci/admin/projects/_project.html.haml
+3
-2
app/views/ci/admin/runners/show.html.haml
app/views/ci/admin/runners/show.html.haml
+2
-2
app/views/ci/builds/_build.html.haml
app/views/ci/builds/_build.html.haml
+2
-3
app/views/ci/builds/show.html.haml
app/views/ci/builds/show.html.haml
+36
-33
app/views/ci/commits/_commit.html.haml
app/views/ci/commits/_commit.html.haml
+2
-3
app/views/ci/commits/show.html.haml
app/views/ci/commits/show.html.haml
+27
-28
app/views/ci/projects/_project.html.haml
app/views/ci/projects/_project.html.haml
+2
-3
未找到文件。
app/assets/stylesheets/ci/projects.scss
浏览文件 @
4daffbe4
...
@@ -13,48 +13,6 @@
...
@@ -13,48 +13,6 @@
.builds
,
.builds
,
.projects-table
{
.projects-table
{
.build-danger
{
.ci-status
{
color
:
$gl-danger
;
border-color
:
$gl-danger
;
}
}
.build-success
{
.ci-status
{
color
:
$gl-success
;
border-color
:
$gl-success
;
}
}
.build-info
{
.ci-status
{
color
:
$gl-info
;
border-color
:
$gl-info
;
}
}
.build-disabled
{
.ci-status
{
color
:
$gl-gray
;
border-color
:
$gl-gray
;
}
}
.build-warning
{
.ci-status
{
color
:
$gl-warning
;
border-color
:
$gl-warning
;
}
}
.ci-status
{
padding
:
2px
5px
;
margin-right
:
5px
;
border
:
1px
solid
#EEE
;
@include
border-radius
(
4px
);
}
.light
{
.light
{
border-color
:
$border-color
;
border-color
:
$border-color
;
}
}
...
@@ -75,23 +33,16 @@
...
@@ -75,23 +33,16 @@
}
}
.commit-info
{
.commit-info
{
font-size
:
14px
;
.attr-name
{
.attr-name
{
font-weight
:
300
;
color
:
#666
;
margin-right
:
5px
;
margin-right
:
5px
;
}
}
pre
.commit-message
{
pre
.commit-message
{
font-size
:
14px
;
background
:
none
;
background
:
none
;
padding
:
0
;
padding
:
0
;
margin
:
0
;
margin
:
0
;
border
:
none
;
border
:
none
;
margin
:
20px
0
;
margin
:
20px
0
;
border-bottom
:
1px
solid
#EEE
;
padding-bottom
:
20px
;
border-radius
:
0
;
border-radius
:
0
;
}
}
}
}
...
@@ -105,4 +56,38 @@
...
@@ -105,4 +56,38 @@
margin-bottom
:
16px
;
margin-bottom
:
16px
;
}
}
}
}
.ci-status
{
padding
:
2px
7px
;
margin-right
:
5px
;
border
:
1px
solid
#EEE
;
white-space
:
nowrap
;
@include
border-radius
(
4px
);
&
.ci-failed
{
color
:
$gl-danger
;
border-color
:
$gl-danger
;
}
&
.ci-success
{
color
:
$gl-success
;
border-color
:
$gl-success
;
}
&
.ci-info
{
color
:
$gl-info
;
border-color
:
$gl-info
;
}
&
.ci-disabled
{
color
:
$gl-gray
;
border-color
:
$gl-gray
;
}
&
.ci-pending
,
&
.ci-running
{
color
:
$gl-warning
;
border-color
:
$gl-warning
;
}
}
}
}
app/helpers/ci/application_helper.rb
浏览文件 @
4daffbe4
...
@@ -28,5 +28,27 @@ module Ci
...
@@ -28,5 +28,27 @@ module Ci
"
#{
pluralize
(
seconds
,
"second"
)
}
"
"
#{
pluralize
(
seconds
,
"second"
)
}
"
end
end
end
end
def
ci_icon_for_status
(
status
)
icon_name
=
case
status
when
'success'
'check-square'
when
'failed'
'close'
when
'running'
,
'pending'
'clock-o'
else
'circle'
end
icon
(
icon_name
)
end
def
ci_status_with_icon
(
status
)
content_tag
:span
,
class:
"ci-status ci-
#{
status
}
"
do
ci_icon_for_status
(
status
)
+
' '
.
html_safe
+
status
end
end
end
end
end
end
app/helpers/ci/builds_helper.rb
浏览文件 @
4daffbe4
...
@@ -15,27 +15,5 @@ module Ci
...
@@ -15,27 +15,5 @@ module Ci
def
build_url
(
build
)
def
build_url
(
build
)
ci_project_build_url
(
build
.
project
,
build
)
ci_project_build_url
(
build
.
project
,
build
)
end
end
def
build_status_css_class
(
build
)
if
build
.
success?
'build-success'
elsif
build
.
failed?
'build-danger'
elsif
build
.
canceled?
'build-disabled'
else
'build-warning'
end
end
def
build_icon_css_class
(
build
)
if
build
.
success?
'fa-circle cgreen'
elsif
build
.
failed?
'fa-circle cred'
else
'fa-circle light'
end
end
end
end
end
end
app/helpers/ci/commits_helper.rb
浏览文件 @
4daffbe4
module
Ci
module
Ci
module
CommitsHelper
module
CommitsHelper
def
commit_status_css_class
(
commit
)
return
'build-info'
unless
commit
case
commit
.
status
when
'success'
'build-success'
when
'failed'
,
'canceled'
'build-danger'
when
'skipped'
'build-disabled'
else
'build-warning'
end
end
def
ci_commit_path
(
commit
)
def
ci_commit_path
(
commit
)
ci_project_ref_commits_path
(
commit
.
project
,
commit
.
ref
,
commit
.
sha
)
ci_project_ref_commits_path
(
commit
.
project
,
commit
.
ref
,
commit
.
sha
)
end
end
...
...
app/views/ci/admin/builds/_build.html.haml
浏览文件 @
4daffbe4
-
if
build
.
commit
&&
build
.
project
-
if
build
.
commit
&&
build
.
project
%tr
.build
{
class:
build_status_css_class
(
build
)}
%tr
.build
%td
.build-link
%td
.build-link
=
link_to
ci_project_build_url
(
build
.
project
,
build
)
do
=
link_to
ci_project_build_url
(
build
.
project
,
build
)
do
%strong
#{
build
.
id
}
%strong
#{
build
.
id
}
%td
.status
%td
.status
=
build
.
status
=
ci_status_with_icon
(
build
.
status
)
%td
.commit-link
%td
.commit-link
=
commit_link
(
build
.
commit
)
=
commit_link
(
build
.
commit
)
...
...
app/views/ci/admin/projects/_project.html.haml
浏览文件 @
4daffbe4
-
last_commit
=
project
.
last_commit
-
last_commit
=
project
.
last_commit
%tr
{
class:
commit_status_css_class
(
last_commit
)
}
%tr
%td
%td
=
project
.
id
=
project
.
id
%td
%td
...
@@ -7,8 +7,9 @@
...
@@ -7,8 +7,9 @@
%strong
=
project
.
name
%strong
=
project
.
name
%td
%td
-
if
last_commit
-
if
last_commit
#{
last_commit
.
status
}
(
#{
commit_link
(
last_commit
)
}
)
=
ci_status_with_icon
(
last_commit
.
status
)
-
if
project
.
last_commit_date
-
if
project
.
last_commit_date
·
=
time_ago_in_words
project
.
last_commit_date
=
time_ago_in_words
project
.
last_commit_date
ago
ago
-
else
-
else
...
...
app/views/ci/admin/runners/show.html.haml
浏览文件 @
4daffbe4
...
@@ -102,9 +102,9 @@
...
@@ -102,9 +102,9 @@
%th
Finished at
%th
Finished at
-
@builds
.
each
do
|
build
|
-
@builds
.
each
do
|
build
|
%tr
.build
.alert
{
class:
build_status_css_class
(
build
)}
%tr
.build
%td
.status
%td
.status
=
build
.
status
=
ci_status_with_icon
(
build
.
status
)
%td
.status
%td
.status
=
build
.
project
.
name
=
build
.
project
.
name
...
...
app/views/ci/builds/_build.html.haml
浏览文件 @
4daffbe4
%tr
.build
{
class:
build_status_css_class
(
build
)}
%tr
.build
%td
.status
%td
.status
%span
.ci-status
<
=
ci_status_with_icon
(
build
.
status
)
=
build
.
status
%td
.build-link
%td
.build-link
=
link_to
ci_project_build_path
(
build
.
project
,
build
)
do
=
link_to
ci_project_build_path
(
build
.
project
,
build
)
do
...
...
app/views/ci/builds/show.html.haml
浏览文件 @
4daffbe4
#up-build-trace
#up-build-trace
-
if
@commit
.
matrix?
-
if
@commit
.
matrix?
%ul
.
nav.nav-tabs.append-bottom-10
%ul
.
center-top-menu
-
@commit
.
builds_without_retry_sorted
.
each
do
|
build
|
-
@commit
.
builds_without_retry_sorted
.
each
do
|
build
|
%li
{
class:
(
'active'
if
build
==
@build
)
}
%li
{
class:
(
'active'
if
build
==
@build
)
}
=
link_to
ci_project_build_url
(
@project
,
build
)
do
=
link_to
ci_project_build_url
(
@project
,
build
)
do
%i
{
class:
build_icon_css_class
(
build
)}
=
ci_icon_for_status
(
build
.
status
)
%span
%span
Build ##{build.id}
-
if
build
.
name
-
if
build
.
name
·
=
build
.
name
=
build
.
name
-
else
=
build
.
id
-
unless
@commit
.
builds_without_retry
.
include?
(
@build
)
-
unless
@commit
.
builds_without_retry
.
include?
(
@build
)
%li
.active
%li
.active
...
@@ -19,20 +20,19 @@
...
@@ -19,20 +20,19 @@
%i
.fa.fa-warning-sign
%i
.fa.fa-warning-sign
This build was retried.
This build was retried.
.row
.gray-content-block
.col-md-9
.build-head
.build-head.alert
{
class:
build_status_css_class
(
@build
)}
%h4
%h4
-
if
@build
.
commit
.
tag?
-
if
@build
.
commit
.
tag?
Build for tag
Build for tag
%code
#{
@build
.
ref
}
%code
#{
@build
.
ref
}
-
else
-
else
Build for commit
Build for commit
%code
#{
@build
.
short_sha
}
%strong
.monospace
=
commit_link
(
@build
.
commit
)
from
from
=
link_to
ci_project_path
(
@build
.
project
,
ref:
@build
.
ref
)
do
=
link_to
ci_project_path
(
@build
.
project
,
ref:
@build
.
ref
)
do
%span
.label.label-primary
=
"
#{
@build
.
ref
}
"
%strong
.monospace
=
"
#{
@build
.
ref
}
"
-
if
@build
.
duration
-
if
@build
.
duration
.pull-right
.pull-right
...
@@ -41,12 +41,12 @@
...
@@ -41,12 +41,12 @@
#{
duration_in_words
(
@build
.
finished_at
,
@build
.
started_at
)
}
#{
duration_in_words
(
@build
.
finished_at
,
@build
.
started_at
)
}
.clearfix
.clearfix
=
@build
.
status
=
ci_status_with_icon
(
@build
.
status
)
.pull-right
.pull-right
=
@build
.
updated_at
.
stamp
(
'19:00 Aug 27'
)
=
@build
.
updated_at
.
stamp
(
'19:00 Aug 27'
)
.row.prepend-top-default
.col-md-9
.clearfix
.clearfix
-
if
@build
.
active?
-
if
@build
.
active?
.autoscroll-container
.autoscroll-container
...
@@ -150,13 +150,16 @@
...
@@ -150,13 +150,16 @@
%h4
.title
#{
pluralize
(
@builds
.
count
,
"other build"
)
}
for
#{
@build
.
short_sha
}
:
%h4
.title
#{
pluralize
(
@builds
.
count
,
"other build"
)
}
for
#{
@build
.
short_sha
}
:
%table
.builds
%table
.builds
-
@builds
.
each_with_index
do
|
build
,
i
|
-
@builds
.
each_with_index
do
|
build
,
i
|
%tr
.build
.alert
{
class:
build_status_css_class
(
build
)}
%tr
.build
%td
%td
=
link_to
ci_project_build_url
(
@project
,
build
)
do
=
ci_icon_for_status
(
build
.
status
)
%span
##{build.id}
%td
%td
=
link_to
ci_project_build_url
(
@project
,
build
)
do
-
if
build
.
name
-
if
build
.
name
=
build
.
name
=
build
.
name
-
else
%span
##{build.id}
%td
.status
=
build
.
status
%td
.status
=
build
.
status
...
...
app/views/ci/commits/_commit.html.haml
浏览文件 @
4daffbe4
%tr
.build
{
class:
commit_status_css_class
(
commit
)}
%tr
.build
%td
.status
%td
.status
%span
.ci-status
<
=
ci_status_with_icon
(
commit
.
status
)
=
commit
.
status
-
if
commit
.
running?
-
if
commit
.
running?
·
·
=
commit
.
stage
=
commit
.
stage
...
...
app/views/ci/commits/show.html.haml
浏览文件 @
4daffbe4
.commit-info
.commit-info
.append-bottom-20
=
ci_status_with_icon
(
@commit
.
status
)
.gray-content-block.middle-block
%pre
.commit-message
%pre
.commit-message
#{
@commit
.
git_commit_message
}
#{
@commit
.
git_commit_message
}
.gray-content-block.second-block
.row
.row
.col-sm-6
.col-sm-6
-
if
@commit
.
compare?
-
if
@commit
.
compare?
...
@@ -42,12 +47,6 @@
...
@@ -42,12 +47,6 @@
.bs-callout.bs-callout-warning
.bs-callout.bs-callout-warning
\.gitlab-ci.yml not found in this commit
\.gitlab-ci.yml not found in this commit
%h3
Status
.build
{
class:
commit_status_css_class
(
@commit
)}
.ci-status
=
@commit
.
status
.
titleize
%h3
%h3
Builds
Builds
-
if
@commit
.
duration
>
0
-
if
@commit
.
duration
>
0
...
...
app/views/ci/projects/_project.html.haml
浏览文件 @
4daffbe4
-
if
project
.
gitlab_ci_project
-
if
project
.
gitlab_ci_project
-
ci_project
=
project
.
gitlab_ci_project
-
ci_project
=
project
.
gitlab_ci_project
-
last_commit
=
ci_project
.
last_commit
-
last_commit
=
ci_project
.
last_commit
%tr
{
class:
commit_status_css_class
(
last_commit
)
}
%tr
%td
%td
=
link_to
[
:ci
,
ci_project
]
do
=
link_to
[
:ci
,
ci_project
]
do
=
ci_project
.
name
=
ci_project
.
name
%td
%td
-
if
last_commit
-
if
last_commit
%span
.ci-status
<
=
ci_status_with_icon
(
last_commit
.
status
)
=
last_commit
.
status
=
commit_link
(
last_commit
)
=
commit_link
(
last_commit
)
·
·
-
if
ci_project
.
last_commit_date
-
if
ci_project
.
last_commit_date
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录