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

builds_helper.rb « ci « helpers « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 8a00c0f3eb01a924d1c378e3586c0e7a8a5f558d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# frozen_string_literal: true

module Ci
  module BuildsHelper
    def sidebar_build_class(build, current_build)
      build_class = []
      build_class << 'active' if build.id === current_build.id
      build_class << 'retried' if build.retried?
      build_class.join(' ')
    end

    def javascript_build_options
      {
        page_path: project_job_path(@project, @build),
        build_status: @build.status,
        build_stage: @build.stage_name,
        log_state: ''
      }
    end

    def build_failed_issue_options
      {
        title: _("Job Failed #%{build_id}") % { build_id: @build.id },
        description: project_job_url(@project, @build)
      }
    end
  end
end