Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
94cec500
Commit
94cec500
authored
Jun 28, 2016
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not show build retry link when build is active
parent
2efee5f6
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
1 deletion
+38
-1
app/views/projects/builds/_sidebar.html.haml
app/views/projects/builds/_sidebar.html.haml
+1
-1
spec/views/projects/builds/show.html.haml_spec.rb
spec/views/projects/builds/show.html.haml_spec.rb
+37
-0
No files found.
app/views/projects/builds/_sidebar.html.haml
View file @
94cec500
...
@@ -40,7 +40,7 @@
...
@@ -40,7 +40,7 @@
.block
{
class:
(
"block-first"
if
!
@build
.
coverage
&&
!
(
can?
(
current_user
,
:read_build
,
@project
)
&&
(
@build
.
artifacts?
||
@build
.
artifacts_expired?
)))
}
.block
{
class:
(
"block-first"
if
!
@build
.
coverage
&&
!
(
can?
(
current_user
,
:read_build
,
@project
)
&&
(
@build
.
artifacts?
||
@build
.
artifacts_expired?
)))
}
.title
.title
Build details
Build details
-
if
@build
.
retryable?
-
if
@build
.
retryable?
&&
!
@build
.
active?
=
link_to
"Retry"
,
retry_namespace_project_build_path
(
@project
.
namespace
,
@project
,
@build
),
class:
'pull-right'
,
method: :post
=
link_to
"Retry"
,
retry_namespace_project_build_path
(
@project
.
namespace
,
@project
,
@build
),
class:
'pull-right'
,
method: :post
-
if
@build
.
merge_request
-
if
@build
.
merge_request
%p
.build-detail-row
%p
.build-detail-row
...
...
spec/views/projects/builds/show.html.haml_spec.rb
0 → 100644
View file @
94cec500
require
'spec_helper'
describe
'projects/builds/show'
do
include
Devise
::
TestHelpers
let
(
:build
)
{
create
(
:ci_build
)
}
let
(
:project
)
{
build
.
project
}
before
do
assign
(
:build
,
build
)
assign
(
:project
,
project
)
allow
(
view
).
to
receive
(
:can?
).
and_return
(
true
)
end
context
'when build is running'
do
before
do
build
.
run!
render
end
it
'does not show retry button'
do
expect
(
rendered
).
not_to
have_link
(
'Retry'
)
end
end
context
'when build is not running'
do
before
do
build
.
success!
render
end
it
'shows retry button'
do
expect
(
rendered
).
to
have_link
(
'Retry'
)
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment