Commit 8d1c7c5d authored by Jacob Schatz's avatar Jacob Schatz

Merge branch '20059-environment-list' into 'master'

Resolve "Format branch, tag, and commit in environment list"

## What does this MR do?
Updates Environments page rows to match the new pipeline updates

## Are there points in the code the reviewer needs to double check?
I removed `private` from `avatars_helper.rb` so I could use `user_avatar`.

## What are the relevant issue numbers?
Closes #20059 

## Screenshots (if relevant)
![Screen_Shot_2016-08-08_at_11.44.36_AM](/uploads/62fbb475a7d9cc613fe5ba1715229553/Screen_Shot_2016-08-08_at_11.44.36_AM.png)
![Screen_Shot_2016-08-08_at_11.44.41_AM](/uploads/ce1bd3ab62c0bc8091e9b6f85012ed36/Screen_Shot_2016-08-08_at_11.44.41_AM.png)



See merge request !5687
parents ec73abcd f6c0c96b
.environments { .environments {
.commit-title { .commit-title {
margin: 0; margin: 0;
} }
.fa-play {
font-size: 14px;
}
.dropdown-new {
color: $table-text-gray;
}
.dropdown-menu {
.fa {
margin-right: 6px;
color: $table-text-gray;
}
}
.branch-name {
color: $gl-dark-link-color;
}
}
.table.builds.environments {
min-width: 500px;
.icon-container {
width: 20px;
text-align: center;
}
} }
...@@ -7,8 +7,6 @@ module AvatarsHelper ...@@ -7,8 +7,6 @@ module AvatarsHelper
})) }))
end end
private
def user_avatar(options = {}) def user_avatar(options = {})
avatar_size = options[:size] || 16 avatar_size = options[:size] || 16
user_name = options[:user].try(:name) || options[:user_name] user_name = options[:user].try(:name) || options[:user_name]
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
.pull-right .pull-right
- actions = deployment.manual_actions - actions = deployment.manual_actions
- if actions.present? - if actions.present?
.btn-group.inline .inline
.btn-group .dropdown
%a.dropdown-toggle.btn.btn-default{type: 'button', 'data-toggle' => 'dropdown'} %a.dropdown-new.btn.btn-default{type: 'button', 'data-toggle' => 'dropdown'}
= icon("play") = icon("play")
%b.caret %b.caret
%ul.dropdown-menu.dropdown-menu-align-right %ul.dropdown-menu.dropdown-menu-align-right
......
%div.branch-commit %div.branch-commit
- if deployment.ref - if deployment.ref
= link_to deployment.ref, namespace_project_commits_path(@project.namespace, @project, deployment.ref), class: "monospace" .icon-container
· = deployment.tag? ? icon('tag') : icon('code-fork')
= link_to deployment.ref, namespace_project_commits_path(@project.namespace, @project, deployment.ref), class: "monospace branch-name"
.icon-container
= custom_icon("icon_commit")
= link_to deployment.short_sha, namespace_project_commit_path(@project.namespace, @project, deployment.sha), class: "commit-id monospace" = link_to deployment.short_sha, namespace_project_commit_path(@project.namespace, @project, deployment.sha), class: "commit-id monospace"
%p.commit-title %p.commit-title
%span %span
- if commit_title = deployment.commit_title - if commit_title = deployment.commit_title
= author_avatar(deployment.commit, size: 20)
= link_to_gfm commit_title, namespace_project_commit_path(@project.namespace, @project, deployment.sha), class: "commit-row-message" = link_to_gfm commit_title, namespace_project_commit_path(@project.namespace, @project, deployment.sha), class: "commit-row-message"
- else - else
Cant find HEAD commit for this branch Cant find HEAD commit for this branch
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
%td %td
- if deployment.deployable - if deployment.deployable
= link_to [@project.namespace.becomes(Namespace), @project, deployment.deployable] do = link_to [@project.namespace.becomes(Namespace), @project, deployment.deployable] do
= user_avatar(user: deployment.user, size: 20)
= "#{deployment.deployable.name} (##{deployment.deployable.id})" = "#{deployment.deployable.name} (##{deployment.deployable.id})"
%td %td
......
...@@ -2,9 +2,13 @@ ...@@ -2,9 +2,13 @@
%tr.environment %tr.environment
%td %td
%strong
= link_to environment.name, namespace_project_environment_path(@project.namespace, @project, environment) = link_to environment.name, namespace_project_environment_path(@project.namespace, @project, environment)
%td
- if last_deployment
= user_avatar(user: last_deployment.user, size: 20)
%strong ##{last_deployment.id}
%td %td
- if last_deployment - if last_deployment
= render 'projects/deployments/commit', deployment: last_deployment = render 'projects/deployments/commit', deployment: last_deployment
......
...@@ -23,10 +23,11 @@ ...@@ -23,10 +23,11 @@
New environment New environment
- else - else
.table-holder .table-holder
%table.table.environments %table.table.builds.environments
%tbody %tbody
%th Environment %th Environment
%th Last deployment %th Last Deployment
%th Date %th Commit
%th
%th %th
= render @environments = render @environments
...@@ -23,13 +23,13 @@ ...@@ -23,13 +23,13 @@
= link_to "Read more", help_page_path("ci/environments"), class: "btn btn-success" = link_to "Read more", help_page_path("ci/environments"), class: "btn btn-success"
- else - else
.table-holder .table-holder
%table.table.environments %table.table.builds.environments
%thead %thead
%tr %tr
%th ID %th ID
%th Commit %th Commit
%th Build %th Build
%th Date %th
%th %th
= render @deployments = render @deployments
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment