gitlab-org--gitlab-foss/app/views/projects/environments/show.html.haml

73 lines
3.7 KiB
Text
Raw Normal View History

2016-06-10 17:36:54 -04:00
- @no_container = true
- add_to_breadcrumbs "Environments", project_environments_path(@project)
- breadcrumb_title @environment.name
2016-04-29 09:14:38 -04:00
- page_title "Environments"
2016-06-30 09:01:26 -04:00
%div{ class: container_class }
- if can?(current_user, :stop_environment, @environment)
#stop-environment-modal.modal.fade{ tabindex: -1 }
.modal-dialog
.modal-content
.modal-header
%h4.modal-title.d-flex.mw-100
Stopping
%span.has-tooltip.text-truncate.ml-1.mr-1.flex-fill{ title: @environment.name, data: { container: '#stop-environment-modal' } }
= @environment.name
?
.modal-body
%p= s_('Environments|Are you sure you want to stop this environment?')
- unless @environment.stop_action?
.warning_message
%p= s_('Environments|Note that this action will stop the environment, but it will %{emphasis_start}not%{emphasis_end} have an effect on any existing deployment due to no “stop environment action” being defined in the %{ci_config_link_start}.gitlab-ci.yml%{ci_config_link_end} file.').html_safe % { emphasis_start: '<strong>'.html_safe,
emphasis_end: '</strong>'.html_safe,
ci_config_link_start: '<a href="https://docs.gitlab.com/ee/ci/yaml/" target="_blank" rel="noopener noreferrer">'.html_safe,
ci_config_link_end: '</a>'.html_safe }
%a{ href: 'https://docs.gitlab.com/ee/ci/environments.html#stopping-an-environment',
target: '_blank',
rel: 'noopener noreferrer' }
= s_('Environments|Learn more about stopping environments')
.modal-footer
= button_tag _('Cancel'), type: 'button', class: 'btn btn-cancel', data: { dismiss: 'modal' }
= button_to stop_project_environment_path(@project, @environment), class: 'btn btn-danger has-tooltip', method: :post do
= s_('Environments|Stop environment')
2017-06-06 18:38:39 -04:00
.row.top-area.adjust
.col-md-7
%h3.page-title= @environment.name
.col-md-5
2016-06-10 18:15:53 -04:00
.nav-controls
2016-12-14 19:59:04 -05:00
= render 'projects/environments/terminal_button', environment: @environment
2016-10-17 15:06:10 -04:00
= render 'projects/environments/external_url', environment: @environment
= render 'projects/environments/metrics_button', environment: @environment
2016-06-14 12:34:48 -04:00
- if can?(current_user, :update_environment, @environment)
= link_to 'Edit', edit_project_environment_path(@project, @environment), class: 'btn'
- if can?(current_user, :stop_environment, @environment)
= button_tag class: 'btn btn-danger', type: 'button', data: { toggle: 'modal',
target: '#stop-environment-modal' } do
= sprite_icon('stop')
= s_('Environments|Stop')
2016-04-29 09:14:38 -04:00
.environments-container
- if @deployments.blank?
2017-11-21 10:48:20 -05:00
.blank-state-row
.blank-state-center
%h2.blank-state-title
You don't have any deployments right now.
%p.blank-state-text
Define environments in the deploy stage(s) in
%code .gitlab-ci.yml
to track deployments here.
= link_to "Read more", help_page_path("ci/environments"), class: "btn btn-success"
- else
.table-holder
2017-06-07 21:15:40 -04:00
.ci-table.environments{ role: 'grid' }
2017-06-06 18:38:39 -04:00
.gl-responsive-table-row.table-row-header{ role: 'row' }
2017-06-07 21:15:40 -04:00
.table-section.section-10{ role: 'columnheader' } ID
.table-section.section-30{ role: 'columnheader' } Commit
.table-section.section-25{ role: 'columnheader' } Job
2017-06-07 21:15:40 -04:00
.table-section.section-15{ role: 'columnheader' } Created
2016-04-29 09:14:38 -04:00
= render @deployments
2016-04-29 09:14:38 -04:00
= paginate @deployments, theme: 'gitlab'