_environment.html.haml 1.19 KB
Newer Older
1
- last_deployment = environment.last_deployment
Kamil Trzcinski's avatar
Kamil Trzcinski committed
2

3
%tr.environment
Kamil Trzcinski's avatar
Kamil Trzcinski committed
4
  %td
5
    = link_to environment.name, namespace_project_environment_path(@project.namespace, @project, environment)
Kamil Trzcinski's avatar
Kamil Trzcinski committed
6

7
  %td.deployment-column
8
    - if last_deployment
9 10 11 12
      %span ##{last_deployment.iid} 
      - if last_deployment.user
        by
        = user_avatar(user: last_deployment.user, size: 20)
13

14 15 16 17
  %td
    - if last_deployment && last_deployment.deployable
      = link_to [@project.namespace.becomes(Namespace), @project, last_deployment.deployable], class: 'build-link' do
        = "#{last_deployment.deployable.name} (##{last_deployment.deployable.id})"
18

Kamil Trzcinski's avatar
Kamil Trzcinski committed
19
  %td
20
    - if last_deployment
21
      = render 'projects/deployments/commit', deployment: last_deployment
22
    - else
23
      %p.commit-title
24
        No deployments yet
Kamil Trzcinski's avatar
Kamil Trzcinski committed
25 26

  %td
Kamil Trzcinski's avatar
Kamil Trzcinski committed
27
    - if last_deployment
28
      #{time_ago_with_tooltip(last_deployment.created_at)}
29

30
  %td.hidden-xs
31 32 33 34 35
    .pull-right
      = render 'projects/environments/external_url', environment: environment
      = render 'projects/deployments/actions', deployment: last_deployment
      = render 'projects/environments/stop', environment: environment
      = render 'projects/deployments/rollback', deployment: last_deployment