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
Jérome Perrin
gitlab-ce
Commits
c3cf103f
Commit
c3cf103f
authored
Oct 17, 2016
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updates class name for consistency
parent
34e19b9b
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
11 deletions
+11
-11
app/assets/javascripts/merge_request_widget.js.es6
app/assets/javascripts/merge_request_widget.js.es6
+2
-2
app/assets/stylesheets/pages/environments.scss
app/assets/stylesheets/pages/environments.scss
+2
-2
app/assets/stylesheets/pages/merge_requests.scss
app/assets/stylesheets/pages/merge_requests.scss
+1
-1
app/views/projects/environments/_stop.html.haml
app/views/projects/environments/_stop.html.haml
+2
-2
spec/features/environments_spec.rb
spec/features/environments_spec.rb
+4
-4
No files found.
app/assets/javascripts/merge_request_widget.js.es6
View file @
c3cf103f
...
...
@@ -17,7 +17,7 @@
View on <%- external_url_formatted %>
</a>
</span>
<span class="
close-env-container js-close
-env-link">
<span class="
stop-env-container js-stop
-env-link">
<a href="<%- stop_url %>" class="close-evn-link" data-method="post" rel="nofollow" data-confirm="Are you sure you want to stop this environment?">
<i class="fa fa-stop-circle-o"/>
Stop environment
...
...
@@ -213,7 +213,7 @@
if (!environment.external_url || !environment.external_url_formatted) $('.js-environment-link', $template).remove();
if (!environment.stop_url) {
$('.js-
close
-env-link', $template).remove();
$('.js-
stop
-env-link', $template).remove();
}
if (environment.deployed_at && environment.deployed_at_formatted) {
...
...
app/assets/stylesheets/pages/environments.scss
View file @
c3cf103f
...
...
@@ -38,10 +38,10 @@
color
:
$gl-dark-link-color
;
}
.
close
-env-link
{
.
stop
-env-link
{
color
:
$table-text-gray
;
.
close
-env-icon
{
.
stop
-env-icon
{
font-size
:
14px
;
}
}
...
...
app/assets/stylesheets/pages/merge_requests.scss
View file @
c3cf103f
...
...
@@ -184,7 +184,7 @@
float
:
right
;
}
.
close
-env-container
{
.
stop
-env-container
{
color
:
$gl-text-color
;
float
:
right
;
...
...
app/views/projects/environments/_stop.html.haml
View file @
c3cf103f
-
if
can?
(
current_user
,
:create_deployment
,
environment
)
&&
environment
.
stoppable?
.inline
=
link_to
stop_namespace_project_environment_path
(
@project
.
namespace
,
@project
,
environment
),
method: :post
,
class:
'btn
close
-env-link'
,
rel:
'nofollow'
,
data:
{
confirm:
'Are you sure you want to stop this environment?'
}
do
=
icon
(
'stop'
,
class:
'
close
-env-icon'
)
class:
'btn
stop
-env-link'
,
rel:
'nofollow'
,
data:
{
confirm:
'Are you sure you want to stop this environment?'
}
do
=
icon
(
'stop'
,
class:
'
stop
-env-icon'
)
spec/features/environments_spec.rb
View file @
c3cf103f
...
...
@@ -94,7 +94,7 @@ feature 'Environments', feature: true do
end
scenario
'does not show stop button'
do
expect
(
page
).
not_to
have_selector
(
'.
close
-env-link'
)
expect
(
page
).
not_to
have_selector
(
'.
stop
-env-link'
)
end
scenario
'does not show external link button'
do
...
...
@@ -116,11 +116,11 @@ feature 'Environments', feature: true do
given
(
:deployment
)
{
create
(
:deployment
,
environment:
environment
,
deployable:
build
,
on_stop:
'close_app'
)
}
scenario
'does show stop button'
do
expect
(
page
).
to
have_selector
(
'.
close
-env-link'
)
expect
(
page
).
to
have_selector
(
'.
stop
-env-link'
)
end
scenario
'starts build when stop button clicked'
do
first
(
'.
close
-env-link'
).
click
first
(
'.
stop
-env-link'
).
click
expect
(
page
).
to
have_content
(
'close_app'
)
end
...
...
@@ -129,7 +129,7 @@ feature 'Environments', feature: true do
let
(
:role
)
{
:reporter
}
scenario
'does not show stop button'
do
expect
(
page
).
not_to
have_selector
(
'.
close
-env-link'
)
expect
(
page
).
not_to
have_selector
(
'.
stop
-env-link'
)
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