Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-10-16 21:08:01 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-10-16 21:08:01 +0300
commit8e45d25f7dde6508839ffee719c0ddc2cf6b12d3 (patch)
tree9839e7fe63b36904d40995ebf519124c9a8f7681 /app/views/projects/deployments
parent00c78fb814d7ce00989ac04edd6cdaa3239da284 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/views/projects/deployments')
-rw-r--r--app/views/projects/deployments/_deployment.html.haml38
-rw-r--r--app/views/projects/deployments/_rollback.haml2
2 files changed, 29 insertions, 11 deletions
diff --git a/app/views/projects/deployments/_deployment.html.haml b/app/views/projects/deployments/_deployment.html.haml
index ef2ab4c698e..8270477ed3f 100644
--- a/app/views/projects/deployments/_deployment.html.haml
+++ b/app/views/projects/deployments/_deployment.html.haml
@@ -1,31 +1,49 @@
.gl-responsive-table-row.deployment{ role: 'row' }
+ .table-section.section-15{ role: 'gridcell' }
+ .table-mobile-header{ role: 'rowheader' }= _("Status")
+ .table-mobile-content
+ = render_deployment_status(deployment)
+
.table-section.section-10{ role: 'gridcell' }
.table-mobile-header{ role: 'rowheader' }= _("ID")
%strong.table-mobile-content ##{deployment.iid}
- .table-section.section-30{ role: 'gridcell' }
+ .table-section.section-10{ role: 'gridcell' }
+ .table-mobile-header{ role: 'rowheader' }= _("Triggerer")
+ .table-mobile-content
+ - if deployment.deployed_by
+ = user_avatar(user: deployment.deployed_by, size: 26, css_class: "mr-0 float-none")
+
+ .table-section.section-25{ role: 'gridcell' }
.table-mobile-header{ role: 'rowheader' }= _("Commit")
= render 'projects/deployments/commit', deployment: deployment
- .table-section.section-25.build-column{ role: 'gridcell' }
+ .table-section.section-10.build-column{ role: 'gridcell' }
.table-mobile-header{ role: 'rowheader' }= _("Job")
- if deployment.deployable
.table-mobile-content
.flex-truncate-parent
.flex-truncate-child
- = link_to [@project.namespace.becomes(Namespace), @project, deployment.deployable], class: 'build-link' do
+ = link_to deployment_path(deployment), class: 'build-link' do
#{deployment.deployable.name} (##{deployment.deployable.id})
- - if deployment.deployed_by
- %div
- by
- = user_avatar(user: deployment.deployed_by, size: 20, css_class: "mr-0 float-none")
+ - else
+ .badge.badge-info.suggestion-help-hover{ title: s_('Deployment|This deployment was created using the API') }
+ = s_('Deployment|API')
- .table-section.section-15{ role: 'gridcell' }
+ .table-section.section-10{ role: 'gridcell' }
.table-mobile-header{ role: 'rowheader' }= _("Created")
+ %span.table-mobile-content.flex-truncate-parent
+ %span.flex-truncate-child
+ = time_ago_with_tooltip(deployment.created_at)
+
+ .table-section.section-10{ role: 'gridcell' }
+ .table-mobile-header{ role: 'rowheader' }= _("Deployed")
- if deployment.deployed_at
- %span.table-mobile-content= time_ago_with_tooltip(deployment.deployed_at)
+ %span.table-mobile-content.flex-truncate-parent
+ %span.flex-truncate-child
+ = time_ago_with_tooltip(deployment.deployed_at)
- .table-section.section-20.table-button-footer{ role: 'gridcell' }
+ .table-section.section-10.table-button-footer{ role: 'gridcell' }
.btn-group.table-action-buttons
= render 'projects/deployments/actions', deployment: deployment
= render 'projects/deployments/rollback', deployment: deployment
diff --git a/app/views/projects/deployments/_rollback.haml b/app/views/projects/deployments/_rollback.haml
index d6bf8d564de..dffa5e4ba40 100644
--- a/app/views/projects/deployments/_rollback.haml
+++ b/app/views/projects/deployments/_rollback.haml
@@ -1,4 +1,4 @@
-- if can?(current_user, :create_deployment, deployment)
+- if deployment.deployable && can?(current_user, :create_deployment, deployment)
- tooltip = deployment.last? ? s_('Environments|Re-deploy to environment') : s_('Environments|Rollback environment')
= button_tag class: 'btn btn-default btn-build has-tooltip', type: 'button', data: { toggle: 'modal', target: "#confirm-rollback-modal-#{deployment.id}" }, title: tooltip do
- if deployment.last?