show.html.haml 1.33 KB
Newer Older
1
- @no_container = true
Kamil Trzcinski's avatar
Kamil Trzcinski committed
2
- page_title "Environments"
3
= render "projects/pipelines/head"
Kamil Trzcinski's avatar
Kamil Trzcinski committed
4

Valery Sizov's avatar
Valery Sizov committed
5
%div{ class: container_class }
Kamil Trzcinski's avatar
Kamil Trzcinski committed
6 7
  .top-area
    .col-md-9
8
      %h3.page-title= @environment.name.capitalize
Kamil Trzcinski's avatar
Kamil Trzcinski committed
9 10
    .col-md-3
      .nav-controls
11
        - if can?(current_user, :update_environment, @environment)
12
          = link_to 'Edit', edit_namespace_project_environment_path(@project.namespace, @project, @environment), class: 'btn'
Kamil Trzcinski's avatar
Kamil Trzcinski committed
13
          = 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
Kamil Trzcinski's avatar
Kamil Trzcinski committed
14

15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
  .deployments-container
    - if @deployments.blank?
      .blank-state.blank-state-no-icon
        %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
        %table.table.builds.environments
          %thead
            %tr
              %th ID
              %th Commit
              %th Build
              %th
              %th.hidden-xs
Kamil Trzcinski's avatar
Kamil Trzcinski committed
35

36
          = render @deployments
Kamil Trzcinski's avatar
Kamil Trzcinski committed
37

38
      = paginate @deployments, theme: 'gitlab'