2021-10-27 15:23:28 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Ci
|
|
|
|
class RunnerPresenter < Gitlab::View::Presenter::Delegated
|
2021-11-18 22:05:49 +05:30
|
|
|
presents ::Ci::Runner, as: :runner
|
2021-10-27 15:23:28 +05:30
|
|
|
|
2021-11-18 22:05:49 +05:30
|
|
|
delegator_override :locked?
|
2021-10-27 15:23:28 +05:30
|
|
|
def locked?
|
|
|
|
read_attribute(:locked) && project_type?
|
|
|
|
end
|
2021-11-18 22:05:49 +05:30
|
|
|
|
|
|
|
delegator_override :locked
|
2021-10-27 15:23:28 +05:30
|
|
|
alias_method :locked, :locked?
|
2022-03-02 08:16:31 +05:30
|
|
|
|
|
|
|
def executor_name
|
|
|
|
Ci::Runner::EXECUTOR_TYPE_TO_NAMES[executor_type&.to_sym]
|
|
|
|
end
|
2022-04-04 11:22:00 +05:30
|
|
|
|
|
|
|
def paused
|
|
|
|
!active
|
|
|
|
end
|
2021-10-27 15:23:28 +05:30
|
|
|
end
|
|
|
|
end
|