BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
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
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
11 deletions
+11
-11
merge_request_widget.js.es6
app/assets/javascripts/merge_request_widget.js.es6
+2
-2
environments.scss
app/assets/stylesheets/pages/environments.scss
+2
-2
merge_requests.scss
app/assets/stylesheets/pages/merge_requests.scss
+1
-1
_stop.html.haml
app/views/projects/environments/_stop.html.haml
+2
-2
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 @@
...
@@ -17,7 +17,7 @@
View on <%- external_url_formatted %>
View on <%- external_url_formatted %>
</a>
</a>
</span>
</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?">
<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"/>
<i class="fa fa-stop-circle-o"/>
Stop environment
Stop environment
...
@@ -213,7 +213,7 @@
...
@@ -213,7 +213,7 @@
if (!environment.external_url || !environment.external_url_formatted) $('.js-environment-link', $template).remove();
if (!environment.external_url || !environment.external_url_formatted) $('.js-environment-link', $template).remove();
if (!environment.stop_url) {
if (!environment.stop_url) {
$('.js-
close
-env-link', $template).remove();
$('.js-
stop
-env-link', $template).remove();
}
}
if (environment.deployed_at && environment.deployed_at_formatted) {
if (environment.deployed_at && environment.deployed_at_formatted) {
...
...
app/assets/stylesheets/pages/environments.scss
View file @
c3cf103f
...
@@ -38,10 +38,10 @@
...
@@ -38,10 +38,10 @@
color
:
$gl-dark-link-color
;
color
:
$gl-dark-link-color
;
}
}
.
close
-env-link
{
.
stop
-env-link
{
color
:
$table-text-gray
;
color
:
$table-text-gray
;
.
close
-env-icon
{
.
stop
-env-icon
{
font-size
:
14px
;
font-size
:
14px
;
}
}
}
}
...
...
app/assets/stylesheets/pages/merge_requests.scss
View file @
c3cf103f
...
@@ -184,7 +184,7 @@
...
@@ -184,7 +184,7 @@
float
:
right
;
float
:
right
;
}
}
.
close
-env-container
{
.
stop
-env-container
{
color
:
$gl-text-color
;
color
:
$gl-text-color
;
float
:
right
;
float
:
right
;
...
...
app/views/projects/environments/_stop.html.haml
View file @
c3cf103f
-
if
can?
(
current_user
,
:create_deployment
,
environment
)
&&
environment
.
stoppable?
-
if
can?
(
current_user
,
:create_deployment
,
environment
)
&&
environment
.
stoppable?
.inline
.inline
=
link_to
stop_namespace_project_environment_path
(
@project
.
namespace
,
@project
,
environment
),
method: :post
,
=
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
class:
'btn
stop
-env-link'
,
rel:
'nofollow'
,
data:
{
confirm:
'Are you sure you want to stop this environment?'
}
do
=
icon
(
'stop'
,
class:
'
close
-env-icon'
)
=
icon
(
'stop'
,
class:
'
stop
-env-icon'
)
spec/features/environments_spec.rb
View file @
c3cf103f
...
@@ -94,7 +94,7 @@ feature 'Environments', feature: true do
...
@@ -94,7 +94,7 @@ feature 'Environments', feature: true do
end
end
scenario
'does not show stop button'
do
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
scenario
'does not show external link button'
do
scenario
'does not show external link button'
do
...
@@ -116,11 +116,11 @@ feature 'Environments', feature: true do
...
@@ -116,11 +116,11 @@ feature 'Environments', feature: true do
given
(
:deployment
)
{
create
(
:deployment
,
environment:
environment
,
deployable:
build
,
on_stop:
'close_app'
)
}
given
(
:deployment
)
{
create
(
:deployment
,
environment:
environment
,
deployable:
build
,
on_stop:
'close_app'
)
}
scenario
'does show stop button'
do
scenario
'does show stop button'
do
expect
(
page
).
to
have_selector
(
'.
close
-env-link'
)
expect
(
page
).
to
have_selector
(
'.
stop
-env-link'
)
end
end
scenario
'starts build when stop button clicked'
do
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'
)
expect
(
page
).
to
have_content
(
'close_app'
)
end
end
...
@@ -129,7 +129,7 @@ feature 'Environments', feature: true do
...
@@ -129,7 +129,7 @@ feature 'Environments', feature: true do
let
(
:role
)
{
:reporter
}
let
(
:role
)
{
:reporter
}
scenario
'does not show stop button'
do
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
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