2016-12-05 10:35:27 +00:00
|
|
|
module Gitlab
|
|
|
|
module Ci
|
|
|
|
module Status
|
2016-12-02 11:38:07 +00:00
|
|
|
# Base abstract class fore core status
|
|
|
|
#
|
2016-12-05 10:35:27 +00:00
|
|
|
class Core
|
2016-12-02 13:21:04 +00:00
|
|
|
include Gitlab::Routing.url_helpers
|
|
|
|
|
2016-12-02 11:38:07 +00:00
|
|
|
def initialize(subject)
|
|
|
|
@subject = subject
|
|
|
|
end
|
|
|
|
|
|
|
|
def icon
|
|
|
|
raise NotImplementedError
|
|
|
|
end
|
|
|
|
|
|
|
|
def label
|
|
|
|
raise NotImplementedError
|
|
|
|
end
|
|
|
|
|
2016-12-02 12:08:21 +00:00
|
|
|
def title
|
|
|
|
"#{@subject.class.name.demodulize}: #{label}"
|
|
|
|
end
|
|
|
|
|
2016-12-02 11:38:07 +00:00
|
|
|
def has_details?
|
|
|
|
raise NotImplementedError
|
|
|
|
end
|
|
|
|
|
|
|
|
def details_path
|
|
|
|
raise NotImplementedError
|
|
|
|
end
|
|
|
|
|
|
|
|
def has_action?
|
|
|
|
raise NotImplementedError
|
|
|
|
end
|
|
|
|
|
|
|
|
def action_icon
|
|
|
|
raise NotImplementedError
|
|
|
|
end
|
|
|
|
|
|
|
|
def action_path
|
|
|
|
raise NotImplementedError
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|