2017-03-20 18:05:52 -04:00
|
|
|
module Ci
|
2017-03-28 13:47:11 -04:00
|
|
|
class PipelinePresenter < Gitlab::View::Presenter::Delegated
|
2017-03-20 18:05:52 -04:00
|
|
|
presents :pipeline
|
|
|
|
|
|
|
|
def auto_canceled?
|
|
|
|
canceled? && auto_canceled_by_id?
|
|
|
|
end
|
|
|
|
|
|
|
|
def status_title
|
2017-03-27 14:14:17 -04:00
|
|
|
"Pipeline is redundant and is auto-canceled by Pipeline ##{auto_canceled_by_id}" if auto_canceled?
|
2017-03-20 18:05:52 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|