summaryrefslogtreecommitdiff
path: root/app/views/builds/show.html.haml
blob: 1e8fda6d692bb66b908079528ea0fdb15302a9f9 (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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
%h3
  Project: #{@project.name}
  .right
    %a.btn.btn-small{href: run_project_path(@project, ref: @build.ref)}  Run
    %a.btn.btn-small{href: edit_project_path(@project)}
      %i.icon-edit.icon-white
      Edit Project

%p
  = link_to project_path(@project) do
    ← Back to project builds
%hr
.row-fluid
  .span9
    .alert{class: build_status_alert_class(@build)}
      %h4
        Build ##{@build.short_sha}
        %small= "(#{@build.ref})"
      .right
        %span= @build.updated_at.stamp('19:00 Aug 27')
      = @build.status


    .row-fluid
      .span6
        %fieldset
          %legend
            Build
            - if @build.active?
              .right
                = link_to "Cancel", cancel_project_build_path(@project, @build.id), class: 'btn btn-small btn-danger'
          %p
            %b Status:
            #{@build.status}
          - if @build.started_at
            %p
              %b Duration:
              #{build_duration @build}
          - if @build.finished_at
            %p
              %b Finished:
              #{time_ago_in_words(@build.finished_at)} ago
      .span6
        %fieldset
          %legend Commit
          %p
            %b ID:
            #{build_commit_link @build}
          - if @build.compare?
            %p
              %b Compare:
              #{build_compare_link @build}
          %p
            %b Branch:
            #{build_ref_link @build}
          %p
            %b Author:
            #{@build.git_author_name}
          %p
            %b Message:
            #{@build.git_commit_message}

    .clearfix
    %pre.trace#build-trace
      = preserve do
        = raw @build.trace_html
  .span3
    .builds
      %h5 Builds for #{@build.short_sha}:
      %table.builds
        %thead
          %tr
            %th Build ID
            %th Status
        - @builds.each_with_index do |build, i|
          %tr.build.alert{class: build_status_alert_class(build)}
            %td
              = link_to project_build_path(@project, build, bid: build.id ) do
                %span #{i+=1} – #{build.short_sha}
            %td.status= build.status


      = will_paginate @builds
%br
.right
  %a.btn.btn-small{href: run_project_path(@project, ref: @build.ref)}  Run
  %a.btn.btn-small{href: edit_project_path(@project)}
    %i.icon-edit.icon-white
    Edit Project


- if @build.active?
  :javascript
    $(function(){
      getBuild('#{project_build_path(@project, @build)}', '#{@build.id}');
    })