Welcome to mirror list, hosted at ThFree Co, Russian Federation.

build_metadata_presenter.rb « ci « presenters « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: e80eb19ea19bc7c1d71c100574b965f8967b9369 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
module Ci
  class BuildMetadataPresenter < Gitlab::View::Presenter::Delegated

    TIMEOUT_SOURCES = {
        unknown_timeout_source: nil,
        project_timeout_source: 'project',
        runner_timeout_source: 'runner'
    }.freeze

    presents :metadata

    def timeout_source
      return unless metadata.timeout_source?

      TIMEOUT_SOURCES[metadata.timeout_source.to_sym] ||
          metadata.timeout_source
    end

  end
end