<commit_before>{% extends "layouts/content-bootstrap.html" %}
{% load i18n %}
{% load utils %}
{% load django_tables2 %}

{% block content %}
    <h2>LAVA Results for {{ job_link }}
    {% if not failed_definitions %}
      <span
          class="label {% if job.status == job.COMPLETE %}label-success{% else %}label-warning{% endif %}"
          {% if job.status == job.COMPLETE %}title="All submitted definitions have started execution."{% endif %}>{{ job.get_status_display }}
      </span>
    {% endif %}
    </h2>

    {% if failed_definitions %}
        <div class="alert alert-warning alert-dismissable">
        <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
        <p><b>Warning</b>: some submitted test definitions did not start execution.</p>
        <ul>
            {% for item in failed_definitions %}
            <li><dl class="dl-horizontal">
                {% for key, value in item.items %}
                    <dt>{{ key }}</dt>
                    <dd>{{ value }}</dd>
                {% endfor %}
            </dl></li>
            {% endfor %}
        </ul>
        </div>
    {% endif %}

<div class="row">
  <div class="col-md-6">
    <h4 class="modal-header">Exports
        </h4>
    <dl class="dl-horizontal">
      <dt>Test results :</dt>
      <dd><a class="btn btn-xs btn-info" href="{% url 'lava.results.testjob_csv' job.id %}"
         title="Download results as CSV"><span class="glyphicon glyphicon-download"></span> CSV</a> or <a
              class="btn btn-xs btn-info" href="{% url 'lava.results.testjob_yaml' job.id %}"
         title="Download results as YAML"><span class="glyphicon glyphicon-download"></span> YAML</a></dd>
      <dt>Job metadata :</dt>
      <dd><a class="btn btn-xs btn-info" href="{% url 'lava.results.job.metadata' job.id %}"
         title="Download metadata as YAML"><span class="glyphicon glyphicon-download"></span> YAML</a></dd>
    </dl>
  </div>
  <div class="col-md-6">
    <h4 class="modal-header">Actions</h4>
    <a href="#" data-toggle="modal" data-target="#similar_jobs_modal" class="btn btn-primary">Similar jobs</a>
  </div>
</div>
    {% render_table suite_table %}
<div class="panel-group" id="results_accordion">
  <div class="panel panel-default">
    <div class="panel-heading">
      <h4><a data-toggle="collapse" data-parent="#results_accordion" href="#metadata_collapse">
        Metadata<commit_msg>LAVA-788 - link to sub_jobs_list from results<commit_after>{% extends "layouts/content-bootstrap.html" %}
{% load i18n %}
{% load utils %}
{% load django_tables2 %}

{% block content %}
    <h2>LAVA Results for {{ job_link }}
    {% if not failed_definitions %}
      <span
          class="label {% if job.status == job.COMPLETE %}label-success{% else %}label-warning{% endif %}"
          {% if job.status == job.COMPLETE %}title="All submitted definitions have started execution."{% endif %}>{{ job.get_status_display }}
      </span>
    {% endif %}
    </h2>

    {% if failed_definitions %}
        <div class="alert alert-warning alert-dismissable">
        <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
        <p><b>Warning</b>: some submitted test definitions did not start execution.</p>
        <ul>
            {% for item in failed_definitions %}
            <li><dl class="dl-horizontal">
                {% for key, value in item.items %}
                    <dt>{{ key }}</dt>
                    <dd>{{ value }}</dd>
                {% endfor %}
            </dl></li>
            {% endfor %}
        </ul>
        </div>
    {% endif %}

<div class="row">
  <div class="col-md-4">
    <h4 class="modal-header">Exports
        </h4>
    <dl class="dl-horizontal">
      <dt>Test results :</dt>
      <dd><a class="btn btn-xs btn-info" href="{% url 'lava.results.testjob_csv' job.id %}"
         title="Download results as CSV"><span class="glyphicon glyphicon-download"></span> CSV</a> or <a
              class="btn btn-xs btn-info" href="{% url 'lava.results.testjob_yaml' job.id %}"
         title="Download results as YAML"><span class="glyphicon glyphicon-download"></span> YAML</a></dd>
      <dt>Job metadata :</dt>
      <dd><a class="btn btn-xs btn-info" href="{% url 'lava.results.job.metadata' job.id %}"
         title="Download metadata as YAML"><span class="glyphicon glyphicon-download"></span> YAML</a></dd>
    </dl>
  </div>
  <div class="col-md-4">
    <h4 class="modal-header">Actions</h4>
    <a href="#" data-toggle="modal" data-target="#similar_jobs_modal" class="btn btn-primary">Similar jobs</a>
  </div>
{% if job.is_multinode %}
   <div class="col-md-4">
     <h4 class="modal-header">Multinode group</h4>
     <dl class="dl-horizontal">
{% for role in job.sub_jobs_list %}
  {% if role.id != job.id %}
     <dt>{{ role.device_role }} :</dt>
     <dd><a href="{{ role.results_link }}">{{ role.sub_id }}</a> ({{ role.id }})</dd>
  {% else %}
     <dt>{{ role.device_role }} :</dt>
     <dd>{{ role.sub_id }} ({{ role.id }})</dd>
  {% endif %}
{% endfor %}
   </div>
{% endif %}
</div>
    {% render_table suite_table %}
<div class="panel-group" id="results_accordion">
  <div class="panel panel-default">
    <div class="panel-heading">
      <h4><a data-toggle="collapse" data-parent="#results_accordion" href="#metadata_collapse">
        Metadata
{'fraction_non_alphanumeric': 0.18861607142857142, 'fraction_numerical': 0.005580357142857143, 'mean_word_length': 2.7759831460674156, 'pattern_counts': {'":': 0, '<': 140, '<?xml version=': 0, '>': 140, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3744382', 'n_tokens_mistral': 1850, 'n_tokens_neox': 1693, 'n_words': 394}