summaryrefslogtreecommitdiff
path: root/app/views/projects/environments/show.html.haml
blob: add394a63566a879cdbf7940d27c4beec28c18d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
- @no_container = true
- add_to_breadcrumbs "Environments", project_environments_path(@project)
- breadcrumb_title @environment.name
- page_title "Environments"

%div{ class: container_class }
  .row.top-area.adjust
    .col-md-7
      %h3.page-title= @environment.name
    .col-md-5
      .nav-controls
        = render 'projects/environments/terminal_button', environment: @environment
        = render 'projects/environments/external_url', environment: @environment
        = render 'projects/environments/metrics_button', environment: @environment
        - 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)
          = link_to 'Stop', stop_project_environment_path(@project, @environment), data: { confirm: 'Are you sure you want to stop this environment?' }, class: 'btn btn-danger', method: :post

  .environments-container
    - if @deployments.blank?
      .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
        .ci-table.environments{ role: 'grid' }
          .gl-responsive-table-row.table-row-header{ role: 'row' }
            .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

          = render @deployments

      = paginate @deployments, theme: 'gitlab'