Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
8842f552
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 搜索 >>
提交
8842f552
编写于
12月 07, 2016
作者:
K
Kamil Trzcinski
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Code review
上级
93c72e0f
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
18 addition
and
21 deletion
+18
-21
app/models/ci/stage.rb
app/models/ci/stage.rb
+3
-1
app/views/projects/commit/_pipeline.html.haml
app/views/projects/commit/_pipeline.html.haml
+2
-3
app/views/projects/pipelines/_graph.html.haml
app/views/projects/pipelines/_graph.html.haml
+2
-2
app/views/projects/pipelines/_with_tabs.html.haml
app/views/projects/pipelines/_with_tabs.html.haml
+2
-3
app/views/projects/stage/_graph.html.haml
app/views/projects/stage/_graph.html.haml
+6
-5
spec/lib/gitlab/ci/status/factory_spec.rb
spec/lib/gitlab/ci/status/factory_spec.rb
+1
-5
spec/lib/gitlab/ci/status/pipeline/factory_spec.rb
spec/lib/gitlab/ci/status/pipeline/factory_spec.rb
+2
-2
未找到文件。
app/models/ci/stage.rb
浏览文件 @
8842f552
...
...
@@ -9,7 +9,9 @@ module Ci
delegate
:project
,
to: :pipeline
def
initialize
(
pipeline
,
name
:,
status:
nil
)
@pipeline
,
@name
,
@status
=
pipeline
,
name
,
status
@pipeline
=
pipeline
@name
=
name
@status
=
status
end
def
to_param
...
...
app/views/projects/commit/_pipeline.html.haml
浏览文件 @
8842f552
...
...
@@ -25,7 +25,7 @@
=
time_interval_in_words
pipeline
.
duration
.row-content-block.build-content.middle-block.pipeline-graph.hidden
=
render
"projects/pipelines/graph"
,
subject:
pipeline
=
render
"projects/pipelines/graph"
,
subject:
pipeline
,
as: :pipeline
-
if
pipeline
.
yaml_errors
.
present?
.bs-callout.bs-callout-danger
...
...
@@ -50,5 +50,4 @@
-
if
pipeline
.
project
.
build_coverage_enabled?
%th
Coverage
%th
-
pipeline
.
stages
.
each
do
|
stage
|
=
render
"projects/stage/stage"
,
subject:
stage
=
render
partial:
"projects/stage/stage"
,
collection:
pipeline
.
stages
,
as: :stage
app/views/projects/pipelines/_graph.html.haml
浏览文件 @
8842f552
-
pipeline
=
local_assigns
.
fetch
(
:pipeline
)
.pipeline-visualization
%ul
.stage-column-list
-
subject
.
stages
.
each
do
|
stage
|
=
render
"projects/stage/graph"
,
subject:
stage
=
render
partial:
"projects/stage/graph"
,
collection:
pipeline
.
stages
,
as: :stage
app/views/projects/pipelines/_with_tabs.html.haml
浏览文件 @
8842f552
...
...
@@ -13,7 +13,7 @@
.tab-content
#js-tab-pipeline
.tab-pane
.build-content.middle-block.pipeline-graph
=
render
"projects/pipelines/graph"
,
subject:
pipeline
=
render
"projects/pipelines/graph"
,
subject:
pipeline
,
as: :pipeline
#js-tab-builds
.tab-pane
-
if
pipeline
.
yaml_errors
.
present?
...
...
@@ -39,5 +39,4 @@
-
if
pipeline
.
project
.
build_coverage_enabled?
%th
Coverage
%th
-
pipeline
.
stages
.
each
do
|
stage
|
=
render
"projects/stage/stage"
,
subject:
stage
=
render
partial:
"projects/stage/stage"
,
collection:
pipeline
.
stages
,
as: :stage
app/views/projects/stage/_graph.html.haml
浏览文件 @
8842f552
-
stage
=
local_assigns
.
fetch
(
:stage
)
-
statuses
=
stage
.
statuses
.
latest
-
status_groups
=
statuses
.
sort_by
(
&
:name
).
group_by
(
&
:group_name
)
%li
.stage-column
.stage-name
%a
{
name:
s
ubject
.
name
}
-
if
s
ubject
.
name
=
s
ubject
.
name
.
titleize
%a
{
name:
s
tage
.
name
}
-
if
s
tage
.
name
=
s
tage
.
name
.
titleize
.builds-container
%ul
-
statuses
=
subject
.
statuses
.
latest
-
status_groups
=
statuses
.
sort_by
(
&
:name
).
group_by
(
&
:group_name
)
-
status_groups
.
each
do
|
group_name
,
grouped_statuses
|
-
if
grouped_statuses
.
one?
-
status
=
grouped_statuses
.
first
...
...
spec/lib/gitlab/ci/status/factory_spec.rb
浏览文件 @
8842f552
require
'spec_helper'
describe
Gitlab
::
Ci
::
Status
::
Factory
do
let
(
:object
)
{
double
(
status: :created
)
}
subject
do
described_class
.
new
(
object
)
end
let
(
:status
)
do
subject
.
fabricate!
end
let
(
:status
)
{
subject
.
fabricate!
}
context
'when object has a core status'
do
HasStatus
::
AVAILABLE_STATUSES
.
each
do
|
core_status
|
...
...
spec/lib/gitlab/ci/status/pipeline/factory_spec.rb
浏览文件 @
8842f552
...
...
@@ -21,7 +21,7 @@ describe Gitlab::Ci::Status::Pipeline::Factory do
Gitlab
::
Ci
::
Status
.
const_get
(
core_status
.
capitalize
))
end
it
'extends core status with common
stag
e methods'
do
it
'extends core status with common
pipelin
e methods'
do
expect
(
status
).
to
have_details
expect
(
status
).
not_to
have_action
expect
(
status
.
details_path
)
...
...
@@ -45,7 +45,7 @@ describe Gitlab::Ci::Status::Pipeline::Factory do
.
to
be_a
Gitlab
::
Ci
::
Status
::
Pipeline
::
SuccessWithWarnings
end
it
'extends core status with common
stag
e methods'
do
it
'extends core status with common
pipelin
e methods'
do
expect
(
status
).
to
have_details
end
end
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录