Commit bc49974d authored by Filipa Lacerda's avatar Filipa Lacerda Committed by Kamil Trzcinski

Adds stop environment button to environments list

parent 08e70857
...@@ -24,6 +24,14 @@ ...@@ -24,6 +24,14 @@
.branch-name { .branch-name {
color: $gl-dark-link-color; color: $gl-dark-link-color;
} }
.close-env-link {
color: $table-text-gray;
.close-env-icon {
font-size: 14px;
}
}
} }
.table.builds.environments { .table.builds.environments {
......
...@@ -14,6 +14,11 @@ ...@@ -14,6 +14,11 @@
= custom_icon('icon_play') = custom_icon('icon_play')
%span= action.name.humanize %span= action.name.humanize
- if :can_be_stopped?
.inline
%a.close-env-link.btn
= icon('stop', class: 'close-env-icon')
- if local_assigns.fetch(:allow_rollback, false) - if local_assigns.fetch(:allow_rollback, false)
= link_to [:retry, @project.namespace.becomes(Namespace), @project, deployment.deployable], method: :post, class: 'btn btn-build' do = link_to [:retry, @project.namespace.becomes(Namespace), @project, deployment.deployable], method: :post, class: 'btn btn-build' do
- if deployment.last? - if deployment.last?
......
- last_deployment = environment.last_deployment - last_deployment = environment.last_deployment
- can_be_stopped = true
%tr.environment %tr.environment
%td %td
...@@ -20,5 +21,5 @@ ...@@ -20,5 +21,5 @@
- if last_deployment - if last_deployment
#{time_ago_with_tooltip(last_deployment.created_at)} #{time_ago_with_tooltip(last_deployment.created_at)}
%td %td.hidden-xs
= render 'projects/deployments/actions', deployment: last_deployment = render 'projects/deployments/actions', deployment: last_deployment, can_be_stopped: can_be_stopped
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
%th Commit %th Commit
%th Build %th Build
%th %th
%th %th.hidden-xs
= render @deployments = render @deployments
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment