Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
a1f7b2bc
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,发现更多精彩内容 >>
未验证
提交
a1f7b2bc
编写于
1月 19, 2018
作者:
F
Filipa Lacerda
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Do not render non triggered empty state for pending jobs
Put back non triggered information
上级
e4952f17
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
19 addition
and
5 deletion
+19
-5
app/views/projects/jobs/_empty_state.html.haml
app/views/projects/jobs/_empty_state.html.haml
+2
-3
app/views/projects/jobs/show.html.haml
app/views/projects/jobs/show.html.haml
+3
-2
spec/features/projects/jobs_spec.rb
spec/features/projects/jobs_spec.rb
+14
-0
未找到文件。
app/views/projects/jobs/_empty_state.html.haml
浏览文件 @
a1f7b2bc
-
illustration
=
local_assigns
.
fetch
(
:illustration
)
-
illustration
=
local_assigns
.
fetch
(
:illustration
)
-
illustration_size
=
local_assigns
.
fetch
(
:illustration_size
)
-
illustration_size
=
local_assigns
.
fetch
(
:illustration_size
)
-
title
=
local_assigns
.
fetch
(
:title
)
-
title
=
local_assigns
.
fetch
(
:title
)
-
content
=
local_assigns
.
fetch
(
:content
,
nil
)
-
content
=
local_assigns
.
fetch
(
:content
)
-
action
=
local_assigns
.
fetch
(
:action
,
nil
)
-
action
=
local_assigns
.
fetch
(
:action
,
nil
)
.row.empty-state
.row.empty-state
...
@@ -11,8 +11,7 @@
...
@@ -11,8 +11,7 @@
.col-xs-12
.col-xs-12
.text-content
.text-content
%h4
.text-center
=
title
%h4
.text-center
=
title
-
if
content
%p
=
content
%p
=
content
-
if
action
-
if
action
.text-center
.text-center
=
action
=
action
app/views/projects/jobs/show.html.haml
浏览文件 @
a1f7b2bc
...
@@ -95,11 +95,12 @@
...
@@ -95,11 +95,12 @@
title:
_
(
'This job requires a manual action'
),
title:
_
(
'This job requires a manual action'
),
content:
_
(
'This job depends on a user to trigger its process. Often they are used to deploy code to production environments'
),
content:
_
(
'This job depends on a user to trigger its process. Often they are used to deploy code to production environments'
),
action:
(
link_to
_
(
'Trigger this manual action'
),
play_project_job_path
(
@project
,
@build
),
method: :post
,
class:
'btn btn-primary'
,
title:
_
(
'Trigger this manual action'
)
)
action:
(
link_to
_
(
'Trigger this manual action'
),
play_project_job_path
(
@project
,
@build
),
method: :post
,
class:
'btn btn-primary'
,
title:
_
(
'Trigger this manual action'
)
)
-
els
e
-
els
if
@build
.
created?
=
render
'empty_state'
,
=
render
'empty_state'
,
illustration:
'illustrations/job_not_triggered.svg'
,
illustration:
'illustrations/job_not_triggered.svg'
,
illustration_size:
'svg-306'
,
illustration_size:
'svg-306'
,
title:
_
(
'This job has not been triggered yet'
)
title:
_
(
'This job has not been triggered yet'
),
content:
_
(
'This job depends on upstream jobs that need to succeed in order for this job to be triggered.'
)
=
render
"sidebar"
=
render
"sidebar"
...
...
spec/features/projects/jobs_spec.rb
浏览文件 @
a1f7b2bc
...
@@ -403,6 +403,20 @@ feature 'Jobs' do
...
@@ -403,6 +403,20 @@ feature 'Jobs' do
it
'shows empty state'
do
it
'shows empty state'
do
expect
(
page
).
to
have_content
(
'This job has not been triggered yet'
)
expect
(
page
).
to
have_content
(
'This job has not been triggered yet'
)
expect
(
page
).
to
have_content
(
'This job depends on upstream jobs that need to succeed in order for this job to be triggered.'
)
end
end
context
'Pending job'
do
let
(
:job
)
{
create
(
:ci_build
,
:pending
,
pipeline:
pipeline
)
}
before
do
visit
project_job_path
(
project
,
job
)
end
it
'does not show non triggered screen'
do
expect
(
page
).
not_to
have_content
(
'This job has not been triggered yet'
)
expect
(
page
).
not_to
have_content
(
'This job depends on upstream jobs that need to succeed in order for this job to be triggered.'
)
end
end
end
end
end
end
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录