2016-12-05 05:35:27 -05:00
|
|
|
module Gitlab
|
|
|
|
module Ci
|
|
|
|
module Status
|
2016-12-02 06:38:07 -05:00
|
|
|
# Base abstract class fore core status
|
|
|
|
#
|
2016-12-05 05:35:27 -05:00
|
|
|
class Core
|
2016-12-13 08:51:23 -05:00
|
|
|
include Gitlab::Routing
|
2016-12-13 08:44:43 -05:00
|
|
|
include Gitlab::Allowable
|
2016-12-02 08:21:04 -05:00
|
|
|
|
2016-12-08 08:28:49 -05:00
|
|
|
attr_reader :subject, :user
|
|
|
|
|
|
|
|
def initialize(subject, user)
|
2016-12-02 06:38:07 -05:00
|
|
|
@subject = subject
|
2016-12-08 08:28:49 -05:00
|
|
|
@user = user
|
2016-12-02 06:38:07 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
def icon
|
|
|
|
raise NotImplementedError
|
|
|
|
end
|
|
|
|
|
|
|
|
def label
|
|
|
|
raise NotImplementedError
|
|
|
|
end
|
|
|
|
|
2016-12-15 06:55:20 -05:00
|
|
|
def group
|
2016-12-16 09:32:54 -05:00
|
|
|
self.class.name.demodulize.underscore
|
2016-12-06 05:22:31 -05:00
|
|
|
end
|
|
|
|
|
2016-12-08 08:28:49 -05:00
|
|
|
def has_details?
|
2016-12-08 03:51:36 -05:00
|
|
|
false
|
2016-12-02 06:38:07 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
def details_path
|
|
|
|
raise NotImplementedError
|
|
|
|
end
|
|
|
|
|
2016-12-08 08:28:49 -05:00
|
|
|
def has_action?
|
2016-12-08 03:51:36 -05:00
|
|
|
false
|
2016-12-02 06:38:07 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
def action_icon
|
|
|
|
raise NotImplementedError
|
|
|
|
end
|
|
|
|
|
2016-12-08 12:18:30 -05:00
|
|
|
def action_class
|
|
|
|
end
|
|
|
|
|
2016-12-02 06:38:07 -05:00
|
|
|
def action_path
|
|
|
|
raise NotImplementedError
|
|
|
|
end
|
2016-12-08 03:51:36 -05:00
|
|
|
|
|
|
|
def action_method
|
|
|
|
raise NotImplementedError
|
|
|
|
end
|
2016-12-08 12:18:30 -05:00
|
|
|
|
|
|
|
def action_title
|
|
|
|
raise NotImplementedError
|
|
|
|
end
|
2016-12-02 06:38:07 -05:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|