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
...
@@ -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
...
...
app/models/ci/pipeline.rb
View file @
3248c9fb
...
@@ -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?
...
...
app/models/deployment.rb
View file @
3248c9fb
...
@@ -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
app/views/projects/ci/pipelines/_pipeline.html.haml
View file @
3248c9fb
...
@@ -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'
}
...
...
app/views/projects/deployments/_playable.html.haml
View file @
3248c9fb
-
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
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