{%- extends "base.html" %}
{%- block meta -%}
    <meta name="csrf-token" content="{{ csrf_token_r() }}">
{%- endblock %}
{%- block title %}{{ page_title|safe }}{%- endblock %}
{%- block head %}
{{ super() }}
<link rel="stylesheet" type="text/css" href="/static/css/dataTables.bootstrap-1.10.11.css">
{%- endblock %}
{%- block content %}
<div class="row">
    <div class="page-header">
      <h3 id="body-title">
        Results for <span id="plan-title">&hellip;</span>:
        «<span id="kernel-title">&hellip;</span>» on
        «<span id="device-type-title">&hellip;</span>»
        <small>
          (<span id="tree-title">&hellip;</span> /
          <span id="branch-title">&hellip;</span>)
        </small>
      </h3>
    </div>
    <div class="col-xs-12 col-sm-12 col-md-6 col-lg-6">
    <dl class="dl-horizontal" id="dl-right">
        <dt>Tree</dt>
        <dd id="tree" class="loading-content">
            <small>
                <i class="fa fa-circle-o-notch fa-spin fa-fw"></i>&nbsp;loading&hellip;
            </small>
        </dd>
        <dt>Git branch<dt>
        <dd id="git-branch" class="loading-content">
            <small>
                <i class="fa fa-circle-o-notch fa-spin fa-fw"></i>&nbsp;loading&hellip;
            </small>
        </dd>
        <dt>Git describe</dt>
        <dd id="git-describe" class="loading-content">
            <small>
                <i class="fa fa-circle-o-notch fa-spin fa-fw"></i>&nbsp;loading&hellip;
            </small>
        </dd>
        <dt>Plan</dt>
        <dd id="plan" class="loading-content">
          <small>
            <i class="fa fa-circle-o-notch fa-spin fa-fw"></i>&nbsp;loading&hellip;
          </small>
        </dd>
        <dt>Git URL</dt>
        <dd id="git-url" class="loading-content">
          <small>
            <i class="fa fa-circle-o-notch fa-spin fa-fw"></i>&nbsp;loading&hellip;
          </small>
        </dd>
        <dt>Git commit</dt>
        <dd class="loading-content" id="git-commit">
          <small>
            <i class="fa fa-circle-o-notch fa-spin fa-fw"></i>&nbsp;loading&hellip;
          </small>
        </dd>
        <dt>Architecture</dt>
        <dd id="arch" class="loading-content">
            <small>
                <i class="fa fa-circle-o-notch fa-spin fa-fw"></i>&nbsp;loading&hellip;
            </small>
        </dd>
        <dt>Compiler</dt>
        <dd id="compiler" class="loading-content">
            <small>
                <i class="fa fa-circle-o-notch fa-spin fa-fw"></i>&nbsp;loading&hellip;
            </small>
        </dd>
        <dt>Defconfig</dt>
        <dd id="defconfig" class="loading-content">
            <small>
                <i class="fa fa-circle-o-notch fa-spin fa-fw"></i>&nbsp;loading&hellip;
            </small>
        </dd>
        <dt>Date</dt>
        <dd id="job-date" class="loading-content">
            <small>
                <i class="fa fa-circle-o-notch fa-spin fa-fw"></i>&nbsp;loading&hellip;
            </small>
        </dd>
        <dt>Job log</dt>
        <dd id="job-log" class="loading-content">
            <small>
                <i class="fa fa-circle-o-notch fa-spin fa-fw"></i>&nbsp;loading&hellip;
            </small>
        </dd>
    </dl>
    </div>
    <div class="col-xs-12 col-sm-12 col-md-5 col-lg-5">
        <div id="pie-chart" class="chart-div pull-center">
          <div id="pie-chart-heading">
              <table id="pie-chart-legend" class="pie-chart">
                  <tbody>
                      <tr>
                          <td id="show-pass" class="click-btn">0</td>
                          <td>&nbsp;/&nbsp;</td>
                          <td id="show-warning" class="click-btn">0</td>
                          <td>&nbsp;/&nbsp;</td>
                          <td id="show-fail" class="click-btn">0</td>
                          <td>&nbsp;/&nbsp;</td>
                          <td id="show-unknown" class="click-btn">0</td>
                      </tr>
                  </tbody>
              </table>
            </div>
            <div id="test-chart"></div>
        </div>
    </div>
</div>
<div class="row">
    <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
        <div class="page-header">
            <h4>Test Results</h4>
        </div>
        <div class="row">
            <div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
                <div class="btn-group btn-group-sm">
                    <button id="btn-total" type="button" class="btn btn-default" disabled>All</button>
                    <button id="btn-pass" type="button" class="btn btn-default" disabled>Successful</button>
                    <button id="btn-regressions" type="button" class="btn btn-default" disabled>Regressions</button>
                    <button id="btn-failures" type="button" class="btn btn-default" disabled>Failures</button>
                    <button id="btn-unknown" type="button" class="btn btn-default" disabled>Unknown</button>
                </div>
            </div>
        </div>
        <div id="table-loading" class="pull-center">
            <small>
                <i class="fa fa-circle-o-notch fa-spin fa-fw"></i>
                &nbsp;retrieving test data&hellip;
            </small>
        </div>
    {%- if is_mobile %}
        <div class="table-responsive" id="table-div">
    {%- else %}
        <div class="table" id="table-div">
    {%- endif %}
            <table class="table table-hover table-striped table-condensed clickable-table big-table" id="tests-table">
            </table>
        </div>
    </div>
</div>
<input type="hidden" id="file-server" value='{{ config["FILE_SERVER_URL"] }}'>
<input type="hidden" id="plan-id" value="{{ plan_id }}">
{%- endblock %}
{%- block scripts %}
<script data-main="/static/js/kci-tests-plan-id" src="/static/js/lib/require.js"></script>
{%- endblock %}
