Move part of pipeline presenter to main CE file

This commit is contained in:
Grzegorz Bizon 2017-09-29 11:14:00 +02:00
parent 29f59bdf6f
commit 90fa4e7e54
1 changed files with 8 additions and 1 deletions

View File

@ -1,6 +1,13 @@
module Ci
class PipelinePresenter < Gitlab::View::Presenter::Delegated
presents :pipeline
FAILURE_REASONS = {}
def failure_reason
return unless pipeline.failure_reason?
FAILURE_REASONS[pipeline.failure_reason.to_sym] ||
pipeline.failure_reason
end
def status_title
if auto_canceled?