<commit_before>.row-fluid
  .col-md-12
    %h4.page-title
      = @project.name
      .pull-right
        = link_to edit_project_path(@project), class: "btn btn-default btn-small" do
          %i.icon-edit.icon-white
          Edit Project

    %p
      = link_to project_path(@project) do
        &larr; Back to project builds
    %hr

.row-fluid
  .col-md-12
    .build-head.alert{class: build_status_alert_class(@build)}
      %h4
        Build for commit
        %code #{@build.short_sha}
        from

        = link_to project_path(@build.project, ref: @build.ref) do
          %span.label.label-primary= "#{@build.ref}"

        - if @build.duration
          .pull-right
            %span
              %i.icon-time
              #{distance_of_time_in_words @build.duration}

      .clearfix
        = @build.status
        .pull-right
          = @build.updated_at.localtime.stamp('19:00 Aug 27')


.row-fluid
  .col-md-9
    .clearfix
      - if @build.active?
        .build-button-container.pull-right
          %button.btn.btn-default.btn-sm#autoscroll-button{:type => "button", :data => {:state => 'disabled'}} enable autoscroll
          %button.btn.btn-default.btn-sm#autoupdate-button{:type => "button", :data => {:state => 'enabled'}} disable autoupdate
        .clearfix
    %ul.nav.nav-tabs{role: "tablist"}
      %li.active
        %a{href: "#trace_tab",  role:"tab", data: {toggle: "tab"}} Build Log
      %li
        %a{href: "#reports_tab",  role:"tab", data: {toggle: "tab"}} Build Report
      - if @build.complete?
        %li
          %a{href: "#coverage_tab",  role:"tab", data: {toggle: "tab"}} Build Coverage
    .tab-content
      .tab-pane.active#trace_tab
        %pre.trace#build-trace
          %code.bash
            = preserve do
              = raw @build.trace_html
      .tab-pane#reports_tab
        .clearfix
          .build-button-container.pull-right{style:"margin-top: 10px;"}
            %button.btn.btn-default.btn-sm#fails-button{:type => "button", :data => {:state => 'disabled'}} fails only
          .clearfix
        #build-report
          .results
            = raw @build.report_html
      - if @build.complete?
        .tab-pane.active#coverage_tab
          %iframe#coverage_frame{frameborder: 0, style:"height:800px;width:100%;", src: "#{ENV['REPORTS_URL']}project-#{@project.id}/#{@build.ref}/#{@build.sha}/coverage/#{@build.id}"}

  .col-md-3
    .build-widget
      %h4.title
        Build
        .pull-right
          - if @build.active?<commit_msg>do not show coverage tab for canceled builds<commit_after>.row-fluid
  .col-md-12
    %h4.page-title
      = @project.name
      .pull-right
        = link_to edit_project_path(@project), class: "btn btn-default btn-small" do
          %i.icon-edit.icon-white
          Edit Project

    %p
      = link_to project_path(@project) do
        &larr; Back to project builds
    %hr

.row-fluid
  .col-md-12
    .build-head.alert{class: build_status_alert_class(@build)}
      %h4
        Build for commit
        %code #{@build.short_sha}
        from

        = link_to project_path(@build.project, ref: @build.ref) do
          %span.label.label-primary= "#{@build.ref}"

        - if @build.duration
          .pull-right
            %span
              %i.icon-time
              #{distance_of_time_in_words @build.duration}

      .clearfix
        = @build.status
        .pull-right
          = @build.updated_at.localtime.stamp('19:00 Aug 27')


.row-fluid
  .col-md-9
    .clearfix
      - if @build.active?
        .build-button-container.pull-right
          %button.btn.btn-default.btn-sm#autoscroll-button{:type => "button", :data => {:state => 'disabled'}} enable autoscroll
          %button.btn.btn-default.btn-sm#autoupdate-button{:type => "button", :data => {:state => 'enabled'}} disable autoupdate
        .clearfix
    %ul.nav.nav-tabs{role: "tablist"}
      %li.active
        %a{href: "#trace_tab",  role:"tab", data: {toggle: "tab"}} Build Log
      - unless !build.canceled?
        %li
          %a{href: "#reports_tab",  role:"tab", data: {toggle: "tab"}} Build Report
      - if @build.complete? && !build.canceled?
        %li
          %a{href: "#coverage_tab",  role:"tab", data: {toggle: "tab"}} Build Coverage
    .tab-content
      .tab-pane.active#trace_tab
        %pre.trace#build-trace
          %code.bash
            = preserve do
              = raw @build.trace_html
      - unless !build.canceled?
        .tab-pane#reports_tab
          .clearfix
            .build-button-container.pull-right{style:"margin-top: 10px;"}
              %button.btn.btn-default.btn-sm#fails-button{:type => "button", :data => {:state => 'disabled'}} fails only
            .clearfix
          #build-report
            .results
              = raw @build.report_html
      - if @build.complete? && !build.canceled?
        .tab-pane.active#coverage_tab
          %iframe#coverage_frame{frameborder: 0, style:"height:800px;width:100%;", src: "#{ENV['REPORTS_URL']}project-#{@project.id}/#{@build.ref}/#{@build.sha}/coverage/#{@build.id}"}

  .col-md-3
    .build-widget
      %h4.title
        Build
        .pull-right
          - if @build.active?
{'fraction_non_alphanumeric': 0.15274831243973, 'fraction_numerical': 0.009257473481195757, 'mean_word_length': 2.068639053254438, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '497417', 'n_tokens_mistral': 1769, 'n_tokens_neox': 1723, 'n_words': 306}