BigW Consortium Gitlab

show.html.haml 2.65 KB
Newer Older
1
- page_title "#{@build.name} (##{@build.id})", "Builds"
2
- trace_with_state = @build.trace_with_state
Phil Hughes committed
3
- header_title project_title(@project, "Builds", project_builds_path(@project))
Kamil Trzcinski committed
4

5
.build-page
Phil Hughes committed
6
  = render "header"
7

8
  - builds = @build.pipeline.builds.latest.to_a
9
  - if builds.size > 1
10
    %ul.nav-links.no-top.no-bottom
11
      - builds.each do |build|
12 13 14 15 16 17 18 19 20
        %li{class: ('active' if build == @build) }
          = link_to namespace_project_build_path(@project.namespace, @project, build) do
            = ci_icon_for_status(build.status)
            %span
              - if build.name
                = build.name
              - else
                = build.id

Kamil Trzcinski committed
21
      - if @build.retried?
22 23 24 25
        %li.active
          %a
            Build ##{@build.id}
            ·
Kamil Trzcinski committed
26
            %i.fa.fa-warning
27
            This build was retried.
28
  - if @build.stuck?
29 30 31 32
    - unless @build.any_runners_online?
      .bs-callout.bs-callout-warning
        %p
          - if no_runners_for_project?(@build.project)
33
            This build is stuck, because the project doesn't have any runners online assigned to it.
34
          - elsif @build.tags.any?
35
            This build is stuck, because you don't have any active runners online with any of these tags assigned to them:
36 37 38 39
            - @build.tags.each do |tag|
              %span.label.label-primary
                = tag
          - else
40
            This build is stuck, because you don't have any active runners that can run this build.
41 42 43

          %br
          Go to
44
          = link_to namespace_project_runners_path(@build.project.namespace, @build.project) do
45 46
            Runners page

Phil Hughes committed
47 48 49 50 51 52 53 54 55
  .prepend-top-default
    - if @build.active?
      .autoscroll-container
        %button.btn.btn-success.btn-sm#autoscroll-button{:type => "button", :data => {:state => 'disabled'}} enable autoscroll
    - if @build.erased?
      .erased.alert.alert-warning
        - erased_by = "by #{link_to @build.erased_by.name, user_path(@build.erased_by)}" if @build.erased_by
        Build has been erased #{erased_by.html_safe} #{time_ago_with_tooltip(@build.erased_at)}
    - else
56 57 58 59 60
      #js-build-scroll.scroll-controls
        = link_to '#build-trace', class: 'btn' do
          %i.fa.fa-angle-up
        = link_to '#down-build-trace', class: 'btn' do
          %i.fa.fa-angle-down
Phil Hughes committed
61 62 63
      %pre.build-trace#build-trace
        %code.bash.js-build-output
        = icon("refresh spin", class: "js-build-refresh")
64

Phil Hughes committed
65
    #down-build-trace
66

Phil Hughes committed
67
= render "sidebar"
68

Phil Hughes committed
69
:javascript
70
  new Build("#{namespace_project_build_url(@project.namespace, @project, @build)}", "#{namespace_project_build_url(@project.namespace, @project, @build, :json)}", "#{@build.status}", "#{trace_with_state[:state]}")