debian-mirror-gitlab/app/views/projects/environments/show.html.haml

72 lines
3.7 KiB
Text
Raw Normal View History

- @no_container = true
2019-02-15 15:39:39 +05:30
- add_to_breadcrumbs _("Environments"), project_environments_path(@project)
2018-03-17 18:26:18 +05:30
- breadcrumb_title @environment.name
2019-02-15 15:39:39 +05:30
- page_title _("Environments")
2016-08-24 12:49:21 +05:30
%div{ class: container_class }
2018-11-18 11:00:15 +05:30
- 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
2019-02-15 15:39:39 +05:30
= s_("Environments|Stopping")
2018-11-18 11:00:15 +05:30
%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_available?
.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-09-10 17:25:29 +05:30
.row.top-area.adjust
2017-08-17 22:00:37 +05:30
.col-md-7
%h3.page-title= @environment.name
.col-md-5
.nav-controls
2017-08-17 22:00:37 +05:30
= render 'projects/environments/terminal_button', environment: @environment
2016-11-03 12:29:30 +05:30
= render 'projects/environments/external_url', environment: @environment
2017-08-17 22:00:37 +05:30
= render 'projects/environments/metrics_button', environment: @environment
- if can?(current_user, :update_environment, @environment)
2019-02-15 15:39:39 +05:30
= link_to _('Edit'), edit_project_environment_path(@project, @environment), class: 'btn'
2017-08-17 22:00:37 +05:30
- if can?(current_user, :stop_environment, @environment)
2018-11-18 11:00:15 +05:30
= button_tag class: 'btn btn-danger', type: 'button', data: { toggle: 'modal',
target: '#stop-environment-modal' } do
= sprite_icon('stop')
= s_('Environments|Stop')
2017-08-17 22:00:37 +05:30
.environments-container
2016-11-03 12:29:30 +05:30
- if @deployments.blank?
2018-12-05 23:21:45 +05:30
.empty-state
.text-content
%h4.state-title
2019-02-15 15:39:39 +05:30
= _("You don't have any deployments right now.")
2018-03-17 18:26:18 +05:30
%p.blank-state-text
2019-02-15 15:39:39 +05:30
= _("Define environments in the deploy stage(s) in <code>.gitlab-ci.yml</code> to track deployments here.").html_safe
2018-12-05 23:21:45 +05:30
.text-center
= link_to _("Read more"), help_page_path("ci/environments"), class: "btn btn-success"
2016-11-03 12:29:30 +05:30
- else
.table-holder
2017-09-10 17:25:29 +05:30
.ci-table.environments{ role: 'grid' }
.gl-responsive-table-row.table-row-header{ role: 'row' }
2019-02-15 15:39:39 +05:30
.table-section.section-10{ role: 'columnheader' }= _('ID')
.table-section.section-30{ role: 'columnheader' }= _('Commit')
.table-section.section-25{ role: 'columnheader' }= _('Job')
.table-section.section-15{ role: 'columnheader' }= _('Created')
2016-11-03 12:29:30 +05:30
= render @deployments
2016-11-03 12:29:30 +05:30
= paginate @deployments, theme: 'gitlab'