summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2017-05-06 21:36:03 +0100
committerFilipa Lacerda <filipa@gitlab.com>2017-05-06 21:36:03 +0100
commitcc27180ecd7236e78b3b495d05e87fefc17220cb (patch)
tree9b747b02feee39e94c26c9738e9e4313ad2b9cbe /app/views
parent13b31d25ec9c5f8d17f95ca8ad756a88b5e3dbd9 (diff)
parent6ad3814e1b31bfacfae7a2aabb4e4607b12ca66f (diff)
downloadgitlab-ce-cc27180ecd7236e78b3b495d05e87fefc17220cb.tar.gz
Merge branch 'master' into 25226-realtime-pipelines-fe
* master: (40 commits) Use GitLab Pages v0.4.2 Do not reprocess actions when user retries pipeline Add specs for extended status for manual actions Refine inheritance model of extended CI/CD statuses Introduce generic manual action extended status class Check ability to update build on the API resource Require build to be present in the controller Authorize build update on per object basis Use update build policy instead of new play policy Improve environment policy class Rephrase documentation for protected actions feature Improve code style related to protected actions Add changelog entry for external env URL btn fix Hide environment external URL button if not defined Fix builds controller spec related to protected actions Fix environment policy class name in specs Add Changelog entry for protected manual actions Document protected manual actions feature Improve specs for jobs API regarding manual actions Fix Rubocop offense in environments policy class ...
Diffstat (limited to 'app/views')
-rw-r--r--app/views/projects/ci/builds/_build.html.haml2
-rw-r--r--app/views/projects/environments/terminal.html.haml5
2 files changed, 4 insertions, 3 deletions
diff --git a/app/views/projects/ci/builds/_build.html.haml b/app/views/projects/ci/builds/_build.html.haml
index 2c3fd1fcd4d..c0019996176 100644
--- a/app/views/projects/ci/builds/_build.html.haml
+++ b/app/views/projects/ci/builds/_build.html.haml
@@ -102,7 +102,7 @@
= link_to cancel_namespace_project_build_path(job.project.namespace, job.project, job, return_to: request.original_url), method: :post, title: 'Cancel', class: 'btn btn-build' do
= icon('remove', class: 'cred')
- elsif allow_retry
- - if job.playable? && !admin
+ - if job.playable? && !admin && can?(current_user, :update_build, job)
= link_to play_namespace_project_build_path(job.project.namespace, job.project, job, return_to: request.original_url), method: :post, title: 'Play', class: 'btn btn-build' do
= custom_icon('icon_play')
- elsif job.retryable?
diff --git a/app/views/projects/environments/terminal.html.haml b/app/views/projects/environments/terminal.html.haml
index c8363087d6a..4c4aa0baff3 100644
--- a/app/views/projects/environments/terminal.html.haml
+++ b/app/views/projects/environments/terminal.html.haml
@@ -16,8 +16,9 @@
.col-sm-6
.nav-controls
- = link_to @environment.external_url, class: 'btn btn-default', target: '_blank', rel: 'noopener noreferrer nofollow' do
- = icon('external-link')
+ - if @environment.external_url.present?
+ = link_to @environment.external_url, class: 'btn btn-default', target: '_blank', rel: 'noopener noreferrer nofollow' do
+ = icon('external-link')
= render 'projects/deployments/actions', deployment: @environment.last_deployment
.terminal-container{ class: container_class }