<commit_before>section.query
  .page-header
    h1
      = query.name
      small= "Updated at #{l(query.updated_at, format: :short)}"
      = link_to [:edit, query], class: 'btn btn-default' do
        i.fa.fa-pencil.fa-pad-r
        | Edit
  p.description= query.description

  pre.query= query.query

  section.new-execution
    h2 Create report
    = form_for [query, query.executions.build], html: {class: 'form-inline', role: 'form'} do |f|
      .form-group.report_format
        = f.label  :report_format
        = f.select :report_format, f.object.supported_formats, {}, class: 'form-control'
      .form-group
        = f.submit 'Create report', class: 'btn btn-default'

  section.past-executions
    h2 Reports
    .col-md-10
      table.executions.table.table-striped.table-hover
        thead
          tr
            th.wip &nbsp;
            th.created_at= human(Adhoq::Execution, :created_at)
            th.status=     human(Adhoq::Execution, :status)
            th.report
        tbody
          - query.executions.recent_first.each do |exec|
            tr[exec]
              td.wip
              td.created_at= exec.created_at.localtime.iso8601
              td.status
                span.label[class=(exec.success? ? 'label-success' : 'label-danger')]= exec.status_label
              td.report
                - if exec.success?
                  = link_to(adhoq.query_execution_path(query, exec, format: exec.report_format), class: 'btn btn-sm btn-default') do<commit_msg>Fix incorrect route lookup<commit_after>section.query
  .page-header
    h1
      = query.name
      small= "Updated at #{l(query.updated_at, format: :short)}"
      = link_to [:edit, query], class: 'btn btn-default' do
        i.fa.fa-pencil.fa-pad-r
        | Edit
  p.description= query.description

  pre.query= query.query

  section.new-execution
    h2 Create report
    = form_for [query, query.executions.build], html: {class: 'form-inline', role: 'form'} do |f|
      .form-group.report_format
        = f.label  :report_format
        = f.select :report_format, f.object.supported_formats, {}, class: 'form-control'
      .form-group
        = f.submit 'Create report', class: 'btn btn-default'

  section.past-executions
    h2 Reports
    .col-md-10
      table.executions.table.table-striped.table-hover
        thead
          tr
            th.wip &nbsp;
            th.created_at= human(Adhoq::Execution, :created_at)
            th.status=     human(Adhoq::Execution, :status)
            th.report
        tbody
          - query.executions.recent_first.each do |exec|
            tr[exec]
              td.wip
              td.created_at= exec.created_at.localtime.iso8601
              td.status
                span.label[class=(exec.success? ? 'label-success' : 'label-danger')]= exec.status_label
              td.report
                - if exec.success?
                  = link_to(query_execution_path(query, exec, format: exec.report_format), class: 'btn btn-sm btn-default') do
{'fraction_non_alphanumeric': 0.1194675540765391, 'fraction_numerical': 0.005990016638935108, 'mean_word_length': 2.051776649746193, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '7378123', 'n_tokens_mistral': 968, 'n_tokens_neox': 933, 'n_words': 188}