BigW Consortium Gitlab

builds_helper.rb 717 Bytes
Newer Older
1 2 3
module BuildsHelper
  def sidebar_build_class(build, current_build)
    build_class = ''
4
    build_class += ' active' if build.id === current_build.id
5
    build_class += ' retried' if build.retried?
6
    build_class
7
  end
8 9 10 11 12 13 14

  def javascript_build_options
    {
      page_url: namespace_project_build_url(@project.namespace, @project, @build),
      build_url: namespace_project_build_url(@project.namespace, @project, @build, :json),
      build_status: @build.status,
      build_stage: @build.stage,
15
      log_state: ''
16 17
    }
  end
Alex Sanford committed
18 19 20 21 22 23 24

  def build_failed_issue_options
    {
      title: "Build Failed ##{@build.id}",
      description: namespace_project_build_url(@project.namespace, @project, @build)
    }
  end
25
end