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
Boxiang Sun
gitlab-ce
Commits
7c698475
Commit
7c698475
authored
Dec 08, 2016
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add action_class/action_title
parent
f6240862
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
30 additions
and
3 deletions
+30
-3
lib/gitlab/ci/status/build/cancelable.rb
lib/gitlab/ci/status/build/cancelable.rb
+5
-1
lib/gitlab/ci/status/build/play.rb
lib/gitlab/ci/status/build/play.rb
+8
-0
lib/gitlab/ci/status/build/retryable.rb
lib/gitlab/ci/status/build/retryable.rb
+5
-1
lib/gitlab/ci/status/build/stop.rb
lib/gitlab/ci/status/build/stop.rb
+5
-1
lib/gitlab/ci/status/core.rb
lib/gitlab/ci/status/core.rb
+7
-0
No files found.
lib/gitlab/ci/status/build/cancelable.rb
View file @
7c698475
...
@@ -10,7 +10,7 @@ module Gitlab
...
@@ -10,7 +10,7 @@ module Gitlab
end
end
def
action_icon
def
action_icon
'
remove
'
'
ban
'
end
end
def
action_path
def
action_path
...
@@ -23,6 +23,10 @@ module Gitlab
...
@@ -23,6 +23,10 @@ module Gitlab
:post
:post
end
end
def
action_title
'Cancel'
end
def
self
.
matches?
(
build
,
user
)
def
self
.
matches?
(
build
,
user
)
build
.
cancelable?
build
.
cancelable?
end
end
...
...
lib/gitlab/ci/status/build/play.rb
View file @
7c698475
...
@@ -17,10 +17,18 @@ module Gitlab
...
@@ -17,10 +17,18 @@ module Gitlab
can?
(
user
,
:update_build
,
subject
)
can?
(
user
,
:update_build
,
subject
)
end
end
def
action_title
'Play'
end
def
action_icon
def
action_icon
'play'
'play'
end
end
def
action_class
'ci-play-icon'
end
def
action_path
def
action_path
play_namespace_project_build_path
(
subject
.
project
.
namespace
,
play_namespace_project_build_path
(
subject
.
project
.
namespace
,
subject
.
project
,
subject
.
project
,
...
...
lib/gitlab/ci/status/build/retryable.rb
View file @
7c698475
...
@@ -10,7 +10,11 @@ module Gitlab
...
@@ -10,7 +10,11 @@ module Gitlab
end
end
def
action_icon
def
action_icon
'repeat'
'refresh'
end
def
action_title
'Retry'
end
end
def
action_path
def
action_path
...
...
lib/gitlab/ci/status/build/stop.rb
View file @
7c698475
...
@@ -26,7 +26,11 @@ module Gitlab
...
@@ -26,7 +26,11 @@ module Gitlab
end
end
def
action_icon
def
action_icon
:play
'stop'
end
def
action_title
'Stop'
end
end
def
action_path
def
action_path
...
...
lib/gitlab/ci/status/core.rb
View file @
7c698475
...
@@ -49,6 +49,9 @@ module Gitlab
...
@@ -49,6 +49,9 @@ module Gitlab
raise
NotImplementedError
raise
NotImplementedError
end
end
def
action_class
end
def
action_path
def
action_path
raise
NotImplementedError
raise
NotImplementedError
end
end
...
@@ -56,6 +59,10 @@ module Gitlab
...
@@ -56,6 +59,10 @@ module Gitlab
def
action_method
def
action_method
raise
NotImplementedError
raise
NotImplementedError
end
end
def
action_title
raise
NotImplementedError
end
end
end
end
end
end
end
...
...
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