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 {
.commit-title {
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
}))
end
private
def user_avatar(options = {})
avatar_size = options[:size] || 16
user_name = options[:user].try(:name) || options[:user_name]
......
......@@ -2,9 +2,9 @@
.pull-right
- actions = deployment.manual_actions
- if actions.present?
.btn-group.inline
.btn-group
%a.dropdown-toggle.btn.btn-default{type: 'button', 'data-toggle' => 'dropdown'}
.inline
.dropdown
%a.dropdown-new.btn.btn-default{type: 'button', 'data-toggle' => 'dropdown'}
= icon("play")
%b.caret
%ul.dropdown-menu.dropdown-menu-align-right
......
%div.branch-commit
- 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"
%p.commit-title
%span
- 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"
- else
Cant find HEAD commit for this branch
......@@ -8,6 +8,7 @@
%td
- if deployment.deployable
= link_to [@project.namespace.becomes(Namespace), @project, deployment.deployable] do
= user_avatar(user: deployment.user, size: 20)
= "#{deployment.deployable.name} (##{deployment.deployable.id})"
%td
......
......@@ -2,8 +2,12 @@
%tr.environment
%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
- if last_deployment
......
......@@ -23,10 +23,11 @@
New environment
- else
.table-holder
%table.table.environments
%table.table.builds.environments
%tbody
%th Environment
%th Last deployment
%th Date
%th Last Deployment
%th Commit
%th
%th
= render @environments
......@@ -23,13 +23,13 @@
= link_to "Read more", help_page_path("ci/environments"), class: "btn btn-success"
- else
.table-holder
%table.table.environments
%table.table.builds.environments
%thead
%tr
%th ID
%th Commit
%th Build
%th Date
%th
%th
= 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