Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
Commits
3248c9fb
Commit
3248c9fb
authored
Jul 16, 2016
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename playable_actions to manual_actions
parent
7d0fe1f0
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
14 deletions
+10
-14
app/models/ci/build.rb
app/models/ci/build.rb
+0
-4
app/models/ci/pipeline.rb
app/models/ci/pipeline.rb
+2
-2
app/models/deployment.rb
app/models/deployment.rb
+2
-2
app/views/projects/ci/pipelines/_pipeline.html.haml
app/views/projects/ci/pipelines/_pipeline.html.haml
+3
-3
app/views/projects/deployments/_playable.html.haml
app/views/projects/deployments/_playable.html.haml
+3
-3
No files found.
app/models/ci/build.rb
View file @
3248c9fb
...
...
@@ -96,10 +96,6 @@ module Ci
self
.
when
==
'manual'
end
def
playable_actions
pipeline
.
playable_actions
end
def
playable?
project
.
builds_enabled?
&&
commands
.
present?
&&
manual?
end
...
...
app/models/ci/pipeline.rb
View file @
3248c9fb
...
...
@@ -65,8 +65,8 @@ module Ci
!
tag?
end
def
playable
_actions
builds
.
manual_actions
.
latest
def
manual
_actions
builds
.
latest
.
manual_actions
end
def
retryable?
...
...
app/models/deployment.rb
View file @
3248c9fb
...
...
@@ -33,7 +33,7 @@ class Deployment < ActiveRecord::Base
project
.
repository
.
keep_around
(
self
.
sha
)
end
def
playable
_actions
deployable
.
try
(
:
playable
_actions
)
def
manual
_actions
deployable
.
try
(
:
manual
_actions
)
end
end
app/views/projects/ci/pipelines/_pipeline.html.haml
View file @
3248c9fb
...
...
@@ -57,8 +57,8 @@
%td
.pipeline-actions
.controls.hidden-xs.pull-right
-
artifacts
=
pipeline
.
builds
.
latest
.
select
{
|
b
|
b
.
artifacts?
}
-
playable
=
pipeline
.
playable
_actions
-
if
artifacts
.
present?
||
playable
.
any?
-
actions
=
pipeline
.
manual
_actions
-
if
artifacts
.
present?
||
actions
.
any?
.btn-group.inline
-
if
playable
.
any?
.btn-group
...
...
@@ -69,7 +69,7 @@
%li
=
link_to
play_namespace_project_build_path
(
@project
.
namespace
,
@project
,
build
),
rel:
'nofollow'
do
=
icon
(
"play"
)
%span
=
playable
.
name
.
titleize
%span
=
actions
.
name
.
titleize
-
if
artifacts
.
present?
.btn-group
%a
.dropdown-toggle.btn.btn-default.build-artifacts
{
type:
'button'
,
'data-toggle'
=>
'dropdown'
}
...
...
app/views/projects/deployments/_playable.html.haml
View file @
3248c9fb
-
playable
=
deployment
.
playable
_actions
-
if
playable
.
any?
-
actions
=
deployment
.
manual
_actions
-
if
actions
.
any?
.btn-group.inline
.btn-group
%a
.dropdown-toggle.btn.btn-default
{
type:
'button'
,
'data-toggle'
=>
'dropdown'
}
...
...
@@ -9,4 +9,4 @@
%li
=
link_to
play_namespace_project_build_path
(
@project
.
namespace
,
@project
,
build
),
rel:
'nofollow'
do
=
icon
(
"play"
)
%span
=
playable
.
name
.
titleize
%span
=
actions
.
name
.
titleize
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment