diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-07-17 02:48:51 +0300 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-07-18 15:46:20 +0300 |
commit | e00da96c88314df79600e7848ae6fe7e4a29af2e (patch) | |
tree | 48d3da01b161442812fb83939f4cbeafdf9be7e3 /app/views/projects/ci | |
parent | 3248c9fb56e5d5cb8980cb37effec1ee2f4f664a (diff) |
Improve manual actions code and add model, service and feature tests
Manual actions are accessible from:
- Pipelines
- Builds
- Environments
- Deployments
Diffstat (limited to 'app/views/projects/ci')
-rw-r--r-- | app/views/projects/ci/builds/_build.html.haml | 2 | ||||
-rw-r--r-- | app/views/projects/ci/pipelines/_pipeline.html.haml | 11 |
2 files changed, 7 insertions, 6 deletions
diff --git a/app/views/projects/ci/builds/_build.html.haml b/app/views/projects/ci/builds/_build.html.haml index efedafefc38..9264289987d 100644 --- a/app/views/projects/ci/builds/_build.html.haml +++ b/app/views/projects/ci/builds/_build.html.haml @@ -86,6 +86,6 @@ = link_to retry_namespace_project_build_path(build.project.namespace, build.project, build, return_to: request.original_url), method: :post, title: 'Retry', class: 'btn btn-build' do = icon('repeat') - elsif build.playable? - = link_to play_namespace_project_build_path(build.project.namespace, build.project, build, return_to: request.original_url), method: :post, title: 'Retry', class: 'btn btn-build' do + = link_to play_namespace_project_build_path(build.project.namespace, build.project, build, return_to: request.original_url), method: :post, title: 'Play', class: 'btn btn-build' do = icon('play') diff --git a/app/views/projects/ci/pipelines/_pipeline.html.haml b/app/views/projects/ci/pipelines/_pipeline.html.haml index b9adc920ea6..397f26012d4 100644 --- a/app/views/projects/ci/pipelines/_pipeline.html.haml +++ b/app/views/projects/ci/pipelines/_pipeline.html.haml @@ -60,16 +60,17 @@ - actions = pipeline.manual_actions - if artifacts.present? || actions.any? .btn-group.inline - - if playable.any? + - if actions.any? .btn-group %a.dropdown-toggle.btn.btn-default{type: 'button', 'data-toggle' => 'dropdown'} = icon("play") %b.caret %ul.dropdown-menu.dropdown-menu-align-right - %li - = link_to play_namespace_project_build_path(@project.namespace, @project, build), rel: 'nofollow' do - = icon("play") - %span= actions.name.titleize + - actions.each do |build| + %li + = link_to play_namespace_project_build_path(@project.namespace, @project, build), method: :post, rel: 'nofollow' do + = icon("play") + %span= build.name.titleize - if artifacts.present? .btn-group %a.dropdown-toggle.btn.btn-default.build-artifacts{type: 'button', 'data-toggle' => 'dropdown'} |