diff options
4 files changed, 17 insertions, 3 deletions
diff --git a/app/assets/stylesheets/pages/environments.scss b/app/assets/stylesheets/pages/environments.scss index d01c60ee6ab..2e14bdb0eb3 100644 --- a/app/assets/stylesheets/pages/environments.scss +++ b/app/assets/stylesheets/pages/environments.scss @@ -24,6 +24,14 @@ .branch-name { color: $gl-dark-link-color; } + + .close-env-link { + color: $table-text-gray; + + .close-env-icon { + font-size: 14px; + } + } } .table.builds.environments { diff --git a/app/views/projects/deployments/_actions.haml b/app/views/projects/deployments/_actions.haml index 16d134eb6b6..a1d9da285c0 100644 --- a/app/views/projects/deployments/_actions.haml +++ b/app/views/projects/deployments/_actions.haml @@ -14,6 +14,11 @@ = custom_icon('icon_play') %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) = link_to [:retry, @project.namespace.becomes(Namespace), @project, deployment.deployable], method: :post, class: 'btn btn-build' do - if deployment.last? diff --git a/app/views/projects/environments/_environment.html.haml b/app/views/projects/environments/_environment.html.haml index 36a6162a5a8..27b7254fcfb 100644 --- a/app/views/projects/environments/_environment.html.haml +++ b/app/views/projects/environments/_environment.html.haml @@ -1,4 +1,5 @@ - last_deployment = environment.last_deployment +- can_be_stopped = true %tr.environment %td @@ -20,5 +21,5 @@ - if last_deployment #{time_ago_with_tooltip(last_deployment.created_at)} - %td - = render 'projects/deployments/actions', deployment: last_deployment + %td.hidden-xs + = render 'projects/deployments/actions', deployment: last_deployment, can_be_stopped: can_be_stopped diff --git a/app/views/projects/environments/show.html.haml b/app/views/projects/environments/show.html.haml index 8f8c1c4ce22..6412c809d52 100644 --- a/app/views/projects/environments/show.html.haml +++ b/app/views/projects/environments/show.html.haml @@ -30,7 +30,7 @@ %th Commit %th Build %th - %th + %th.hidden-xs = render @deployments |