<commit_before>{% extends "_base.html" %}
{% block title %}{{ project.name }}{% endblock %}
{# URI.js is loading differently through require; has to be loaded before
   require is so that it loads into the root #}
{% block prescript %}<script src="/static/lib/js/URI.js"></script>{% endblock %}
{% block header %}
  <span data-bind="text:project().name"></span>
  {% if current_user.is_authenticated() %}
    <span class="btn-group pull-right">
      <!-- ko component: {
        name: 'header-button',
        params: {
          icon: 'trash',
          click: deleteHandler,
          buttonType: 'danger'
        }
      } --><!-- /ko -->
      <!-- ko component: {
        name: 'header-button',
        params: {
          icon: 'edit',
          click: editHandler
        }
      } --><!-- /ko -->
      <!-- ko component: {
        name: 'header-button',
        params: {
          icon: 'play-circle',
          click: runHandler
        }
      } --><!-- /ko -->
    </span>
  {% endif %}
{% endblock %}
{% block content %}
<style type="text/css">
  .jobs-list-git-branch {
    overflow: hidden;
  }
</style>
<span class="pull-right">{{ project_shield(project) }}</span>
<form class="form-inline" style="margin-top: 0px; margin-bottom: 16px">
  <label class="checkbox">
    <input id="filterStable" type="checkbox" {{ 'checked' if versioned else '' }}> Only stable releases
  </label>
  <div class="btn-group" style="margin-left: 16px">
    <button class="btn dropdown-toggle" data-toggle="dropdown" href="#">
      {{ 'Showing only %s' % branch if branch is not none else 'Branch filter' }}
      <span class="caret"></span>
    </button>
    <ul class="dropdown-menu">
      {% if branch is not none %}
        <li><a href="" data-bind="click: clearBranchFilter"><i class="glyphicon glyphicon-remove-circle">&nbsp;</i>Clear</a></li>
      {% endif %}
      <!-- ko foreach: project().branches -->
        <li><a href="" data-bind="click: $parent.setBranchFilter, text: name"></a></li>
      <!-- /ko -->
    </ul>
  </div>
</form>
<table id="jobs-list" class="table table-striped">
  <tr>
    <th>Created</th>
    <th>Branch</th>
    <th>Tag</th>
    <th>Commit ref</th>
    <th>Author</th>
    <th>State</th>
  </tr>
  {% for job in jobs.items -%}
    <tr class="job-detail">
      <td><a href="/projects/{{ project.slug }}/jobs/{{ job.slug }}">{{ job.create_ts }}</a></td>
      <td>{{ job.git_branch if job.git_branch else '' }}</td>
      <td>{{ job.tag if job.tag else '' }}</td>
      <td>{{ job.commit }}</td>
      <td>{{ git_user(job.git_author_name, job.git_author_email) if job.git_author_name or job.git_author_email else ''}}</td>
      <td>{{ job_state_glyph(job.state) }}</td>
    </tr>
  {%- endfor %}
</table>
{% set versioned_str = '&versioned' if versioned else '' %}
{% set branch_str = '&branch=%s' % branch if branch else '' %}
{% if jobs.has_prev -%}
    <a href="{{ '/projects/%s?page=%d&page_size=%d%s%s' % (project.slug, jobs.prev_num, jobs.per_page, versioned_str, branch_str) }}" class="btn btn-default btn-lg">Previous</a>
{% endif -%}
{% if jobs.has_next -%}
    <a href="{{ '/projects/%s?page=%d&page_size=%d%s%s' % (project.slug, jobs.next_num, jobs.per_page, versioned_str, branch_str) }}" class="btn btn-default btn-lg pull-right">Next</a>
{% endif -%}
<project-edit-dialog params="
    visible: editVisible,
    title: editTitle,
    github: true,
    project: project,
    isNew: false,
    saveLabel: 'Update'
"></project-edit-dialog>
<job-run-dialog params="
      visible: runVisible
    , title: runTitle
    , project: project
"></job-run-dialog>
<project-delete-dialog params="
      visible: deleteVisible
    , title: deleteTitle
    , project: project
"></project-delete-dialog>
<script>
  // URI.js is being dumb :(
  require([
      'jquery'<commit_msg>Formatting of JS lists<commit_after>{% extends "_base.html" %}
{% block title %}{{ project.name }}{% endblock %}
{# URI.js is loading differently through require; has to be loaded before
   require is so that it loads into the root #}
{% block prescript %}<script src="/static/lib/js/URI.js"></script>{% endblock %}
{% block header %}
  <span data-bind="text:project().name"></span>
  {% if current_user.is_authenticated() %}
    <span class="btn-group pull-right">
      <!-- ko component: {
        name: 'header-button',
        params: {
            icon: 'trash'
          , click: deleteHandler
          , buttonType: 'danger'
        }
      } --><!-- /ko -->
      <!-- ko component: {
          name: 'header-button'
        , params: {
            icon: 'edit'
          , click: editHandler
        }
      } --><!-- /ko -->
      <!-- ko component: {
          name: 'header-button'
        , params: {
            icon: 'play-circle'
          , click: runHandler
        }
      } --><!-- /ko -->
    </span>
  {% endif %}
{% endblock %}
{% block content %}
<style type="text/css">
  .jobs-list-git-branch {
    overflow: hidden;
  }
</style>
<span class="pull-right">{{ project_shield(project) }}</span>
<form class="form-inline" style="margin-top: 0px; margin-bottom: 16px">
  <label class="checkbox">
    <input id="filterStable" type="checkbox" {{ 'checked' if versioned else '' }}> Only stable releases
  </label>
  <div class="btn-group" style="margin-left: 16px">
    <button class="btn dropdown-toggle" data-toggle="dropdown" href="#">
      {{ 'Showing only %s' % branch if branch is not none else 'Branch filter' }}
      <span class="caret"></span>
    </button>
    <ul class="dropdown-menu">
      {% if branch is not none %}
        <li><a href="" data-bind="click: clearBranchFilter"><i class="glyphicon glyphicon-remove-circle">&nbsp;</i>Clear</a></li>
      {% endif %}
      <!-- ko foreach: project().branches -->
        <li><a href="" data-bind="click: $parent.setBranchFilter, text: name"></a></li>
      <!-- /ko -->
    </ul>
  </div>
</form>
<table id="jobs-list" class="table table-striped">
  <tr>
    <th>Created</th>
    <th>Branch</th>
    <th>Tag</th>
    <th>Commit ref</th>
    <th>Author</th>
    <th>State</th>
  </tr>
  {% for job in jobs.items -%}
    <tr class="job-detail">
      <td><a href="/projects/{{ project.slug }}/jobs/{{ job.slug }}">{{ job.create_ts }}</a></td>
      <td>{{ job.git_branch if job.git_branch else '' }}</td>
      <td>{{ job.tag if job.tag else '' }}</td>
      <td>{{ job.commit }}</td>
      <td>{{ git_user(job.git_author_name, job.git_author_email) if job.git_author_name or job.git_author_email else ''}}</td>
      <td>{{ job_state_glyph(job.state) }}</td>
    </tr>
  {%- endfor %}
</table>
{% set versioned_str = '&versioned' if versioned else '' %}
{% set branch_str = '&branch=%s' % branch if branch else '' %}
{% if jobs.has_prev -%}
    <a href="{{ '/projects/%s?page=%d&page_size=%d%s%s' % (project.slug, jobs.prev_num, jobs.per_page, versioned_str, branch_str) }}" class="btn btn-default btn-lg">Previous</a>
{% endif -%}
{% if jobs.has_next -%}
    <a href="{{ '/projects/%s?page=%d&page_size=%d%s%s' % (project.slug, jobs.next_num, jobs.per_page, versioned_str, branch_str) }}" class="btn btn-default btn-lg pull-right">Next</a>
{% endif -%}
<project-edit-dialog params="
      visible: editVisible
    , title: editTitle
    , github: true
    , project: project
    , isNew: false
    , saveLabel: 'Update'
"></project-edit-dialog>
<job-run-dialog params="
      visible: runVisible
    , title: runTitle
    , project: project
"></job-run-dialog>
<project-delete-dialog params="
      visible: deleteVisible
    , title: deleteTitle
    , project: project
"></project-delete-dialog>
<script>
  // URI.js is being dumb :(
  require([
      'jquery'
{'fraction_non_alphanumeric': 0.2, 'fraction_numerical': 0.0013054830287206266, 'mean_word_length': 2.843953838434521, 'pattern_counts': {'":': 0, '<': 171, '<?xml version=': 0, '>': 171, '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': '4912343', 'n_tokens_mistral': 2656, 'n_tokens_neox': 2555, 'n_words': 594}