Class: Gitlab::Ci::Status::Core
- Inherits:
-
Object
- Object
- Gitlab::Ci::Status::Core
show all
- Includes:
- Allowable, Routing
- Defined in:
- lib/gitlab/ci/status/core.rb
Overview
Base abstract class for core status
Direct Known Subclasses
Canceled, Canceling, Created, Failed, Manual, Pending, Preparing, Running, Scheduled, Skipped, Success, WaitingForCallback, WaitingForResource
Instance Attribute Summary collapse
Instance Method Summary
collapse
Methods included from Allowable
#can?, #can_all?, #can_any?
Methods included from Routing
includes_helpers, redirect_legacy_paths, url_helpers
Constructor Details
#initialize(subject, user) ⇒ Core
Returns a new instance of Core.
16
17
18
19
|
# File 'lib/gitlab/ci/status/core.rb', line 16
def initialize(subject, user)
@subject = subject
@user = user
end
|
Instance Attribute Details
#subject ⇒ Object
Returns the value of attribute subject.
12
13
14
|
# File 'lib/gitlab/ci/status/core.rb', line 12
def subject
@subject
end
|
#user ⇒ Object
Returns the value of attribute user.
12
13
14
|
# File 'lib/gitlab/ci/status/core.rb', line 12
def user
@user
end
|
Instance Method Details
77
78
79
|
# File 'lib/gitlab/ci/status/core.rb', line 77
def action_button_title
raise NotImplementedError
end
|
#action_icon ⇒ Object
61
62
63
|
# File 'lib/gitlab/ci/status/core.rb', line 61
def action_icon
raise NotImplementedError
end
|
#action_method ⇒ Object
69
70
71
|
# File 'lib/gitlab/ci/status/core.rb', line 69
def action_method
raise NotImplementedError
end
|
#action_path ⇒ Object
65
66
67
|
# File 'lib/gitlab/ci/status/core.rb', line 65
def action_path
raise NotImplementedError
end
|
#action_title ⇒ Object
73
74
75
|
# File 'lib/gitlab/ci/status/core.rb', line 73
def action_title
raise NotImplementedError
end
|
Hint that appears on the build badges
87
88
89
|
# File 'lib/gitlab/ci/status/core.rb', line 87
def badge_tooltip
subject.status
end
|
#confirmation_message ⇒ Object
91
92
93
|
# File 'lib/gitlab/ci/status/core.rb', line 91
def confirmation_message
nil
end
|
#details_path ⇒ Object
53
54
55
|
# File 'lib/gitlab/ci/status/core.rb', line 53
def details_path
raise NotImplementedError
end
|
#favicon ⇒ Object
29
30
31
|
# File 'lib/gitlab/ci/status/core.rb', line 29
def favicon
raise NotImplementedError
end
|
#group ⇒ Object
45
46
47
|
# File 'lib/gitlab/ci/status/core.rb', line 45
def group
self.class.name.demodulize.underscore
end
|
#has_action? ⇒ Boolean
57
58
59
|
# File 'lib/gitlab/ci/status/core.rb', line 57
def has_action?
false
end
|
#has_details? ⇒ Boolean
49
50
51
|
# File 'lib/gitlab/ci/status/core.rb', line 49
def has_details?
false
end
|
#icon ⇒ Object
25
26
27
|
# File 'lib/gitlab/ci/status/core.rb', line 25
def icon
raise NotImplementedError
end
|
#id ⇒ Object
21
22
23
|
# File 'lib/gitlab/ci/status/core.rb', line 21
def id
"#{group}-#{subject.id}"
end
|
#illustration ⇒ Object
33
34
35
|
# File 'lib/gitlab/ci/status/core.rb', line 33
def illustration
raise NotImplementedError
end
|
#label ⇒ Object
37
38
39
|
# File 'lib/gitlab/ci/status/core.rb', line 37
def label
raise NotImplementedError
end
|
#name ⇒ Object
41
42
43
|
# File 'lib/gitlab/ci/status/core.rb', line 41
def name
self.class.name.demodulize.underscore.upcase
end
|
Hint that appears on all the pipeline graph tooltips and builds on the right sidebar in Job detail view
82
83
84
|
# File 'lib/gitlab/ci/status/core.rb', line 82
def status_tooltip
label
end
|