Commit 3248c9fb authored by Kamil Trzcinski's avatar Kamil Trzcinski

Rename playable_actions to manual_actions

parent 7d0fe1f0
...@@ -96,10 +96,6 @@ module Ci ...@@ -96,10 +96,6 @@ module Ci
self.when == 'manual' self.when == 'manual'
end end
def playable_actions
pipeline.playable_actions
end
def playable? def playable?
project.builds_enabled? && commands.present? && manual? project.builds_enabled? && commands.present? && manual?
end end
......
...@@ -65,8 +65,8 @@ module Ci ...@@ -65,8 +65,8 @@ module Ci
!tag? !tag?
end end
def playable_actions def manual_actions
builds.manual_actions.latest builds.latest.manual_actions
end end
def retryable? def retryable?
......
...@@ -33,7 +33,7 @@ class Deployment < ActiveRecord::Base ...@@ -33,7 +33,7 @@ class Deployment < ActiveRecord::Base
project.repository.keep_around(self.sha) project.repository.keep_around(self.sha)
end end
def playable_actions def manual_actions
deployable.try(:playable_actions) deployable.try(:manual_actions)
end end
end end
...@@ -57,8 +57,8 @@ ...@@ -57,8 +57,8 @@
%td.pipeline-actions %td.pipeline-actions
.controls.hidden-xs.pull-right .controls.hidden-xs.pull-right
- artifacts = pipeline.builds.latest.select { |b| b.artifacts? } - artifacts = pipeline.builds.latest.select { |b| b.artifacts? }
- playable = pipeline.playable_actions - actions = pipeline.manual_actions
- if artifacts.present? || playable.any? - if artifacts.present? || actions.any?
.btn-group.inline .btn-group.inline
- if playable.any? - if playable.any?
.btn-group .btn-group
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
%li %li
= link_to play_namespace_project_build_path(@project.namespace, @project, build), rel: 'nofollow' do = link_to play_namespace_project_build_path(@project.namespace, @project, build), rel: 'nofollow' do
= icon("play") = icon("play")
%span= playable.name.titleize %span= actions.name.titleize
- if artifacts.present? - if artifacts.present?
.btn-group .btn-group
%a.dropdown-toggle.btn.btn-default.build-artifacts{type: 'button', 'data-toggle' => 'dropdown'} %a.dropdown-toggle.btn.btn-default.build-artifacts{type: 'button', 'data-toggle' => 'dropdown'}
......
- playable = deployment.playable_actions - actions = deployment.manual_actions
- if playable.any? - if actions.any?
.btn-group.inline .btn-group.inline
.btn-group .btn-group
%a.dropdown-toggle.btn.btn-default{type: 'button', 'data-toggle' => 'dropdown'} %a.dropdown-toggle.btn.btn-default{type: 'button', 'data-toggle' => 'dropdown'}
...@@ -9,4 +9,4 @@ ...@@ -9,4 +9,4 @@
%li %li
= link_to play_namespace_project_build_path(@project.namespace, @project, build), rel: 'nofollow' do = link_to play_namespace_project_build_path(@project.namespace, @project, build), rel: 'nofollow' do
= icon("play") = icon("play")
%span= playable.name.titleize %span= actions.name.titleize
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