summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2016-10-06 14:16:03 +0200
committerKamil Trzcinski <ayufan@ayufan.eu>2016-10-06 14:16:03 +0200
commit0e1f39d8cee3a6d23fccb195f8257178df840805 (patch)
tree6e84589c4c567e69680718b911b075c53d188687 /app/views
parentc319cc5ab5064459aaf803ee719a08e9663726ea (diff)
downloadgitlab-ce-0e1f39d8cee3a6d23fccb195f8257178df840805.tar.gz
Allow to close environments
Diffstat (limited to 'app/views')
-rw-r--r--app/views/projects/deployments/_actions.haml5
-rw-r--r--app/views/projects/environments/index.html.haml4
-rw-r--r--app/views/projects/environments/show.html.haml1
3 files changed, 4 insertions, 6 deletions
diff --git a/app/views/projects/deployments/_actions.haml b/app/views/projects/deployments/_actions.haml
index 2d9c229ed5b..7b7e37353e3 100644
--- a/app/views/projects/deployments/_actions.haml
+++ b/app/views/projects/deployments/_actions.haml
@@ -16,9 +16,8 @@
- if local_assigns.fetch(:allow_close, false) && deployment.closeable?
.inline
- %a.close-env-link.btn
- = link_to [:play, @project.namespace.becomes(Namespace), @project, deployment.close_action], method: :post, rel: 'nofollow', data: { confirm: 'Are you sure you want to close this environment?' } do
- = icon('stop', class: 'close-env-icon')
+ = link_to [:play, @project.namespace.becomes(Namespace), @project, deployment.close_action], method: :post, class: 'btn close-env-link', rel: 'nofollow', data: { confirm: 'Are you sure you want to close this environment?' } do
+ = 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' do
diff --git a/app/views/projects/environments/index.html.haml b/app/views/projects/environments/index.html.haml
index 702cccd6ab3..11e2ff506b4 100644
--- a/app/views/projects/environments/index.html.haml
+++ b/app/views/projects/environments/index.html.haml
@@ -7,12 +7,12 @@
%ul.nav-links
%li{class: ('active' if @scope.nil?)}
= link_to project_environments_path(@project) do
- Availabe
+ Available
%span.badge.js-avaibale-environments-count
= number_with_delimiter(@all_environments.opened.count)
%li{class: ('active' if @scope == 'closed')}
- = link_to project_environments_path(@project, scope: :stopped) do
+ = link_to project_environments_path(@project, scope: :closed) do
Stopped
%span.badge.js-stopped-environments-count
= number_with_delimiter(@all_environments.closed.count)
diff --git a/app/views/projects/environments/show.html.haml b/app/views/projects/environments/show.html.haml
index 5f4a0ef082c..4981b95a19b 100644
--- a/app/views/projects/environments/show.html.haml
+++ b/app/views/projects/environments/show.html.haml
@@ -14,7 +14,6 @@
= link_to 'Edit', edit_namespace_project_environment_path(@project.namespace, @project, @environment), class: 'btn'
- if @environment.opened? && last_deployment.try(:close_action)
= link_to 'Close', [:play, @project.namespace.becomes(Namespace), @project, last_deployment.close_action], data: { confirm: 'Are you sure you want to close this environment?' }, class: 'btn btn-danger', method: :post
- = link_to 'Destroy', namespace_project_environment_path(@project.namespace, @project, @environment), data: { confirm: 'Are you sure you want to delete this environment?' }, class: 'btn btn-danger', method: :delete
- if @deployments.blank?
.blank-state.blank-state-no-icon