blob: c803abfab6a1cf3a471ede5bec81f36511741492 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
# frozen_string_literal: true
module Ci
class LegacyStagePresenter < Gitlab::View::Presenter::Delegated
presents ::Ci::LegacyStage, as: :legacy_stage
def latest_ordered_statuses
preload_statuses(legacy_stage.statuses.latest_ordered)
end
def retried_ordered_statuses
preload_statuses(legacy_stage.statuses.retried_ordered)
end
private
def preload_statuses(statuses)
Preloaders::CommitStatusPreloader.new(statuses).execute(Ci::StagePresenter::PRELOADED_RELATIONS)
statuses
end
end
end
|