{% extends "layout.html" %}
{% block nav %}
    <nav class="navbar navbar-expand-lg navbar-light bg-light sticky-top">
        <div class="container-fluid">
          <a class="navbar-brand" href="#">Index HTML Test Report</a>
            <div class="collapse navbar-collapse">
              <ul class="navbar-nav mr-auto mt-2 mt-lg-0">
                <li class="nav-item active">
                  <a class="nav-link" href="flat.html" title="go to all report">Flat</a>
                </li>
              </ul>
            </div>
        </div>
    </nav>
{% endblock %}
{% block content %}
    <table class="table table-hover datatable">
        <thead>
            <tr class="align-text-top">
                <th class="text-center">Start at</th>
                <th>Features<br/>{{ grand_totals['features'] | int }}</th>
                <th class="text-center">Scenarios<br/>{{ grand_totals['scenarios'] | int }}</th>
                <th class="text-center">Passed<br/>{{ grand_totals['passed'] | int}}</th>
                <th class="text-center">Failed<br/>{{ grand_totals['failed'] | int }}</th>
                <th class="text-center">Skipped<br/>{{ grand_totals['skipped'] | int }}</th>
                <th class="text-center">Error<br/>{{ grand_totals['error'] | int }}</th>
                <th class="text-center">Status<br/>&nbsp;</th>
                <th class="text-center">Duration<br/>{{ '{:.1f}'.format(grand_totals['duration'] | float) }}s</th>
            </tr>
        </thead>
        {% for feature_stat in feature_stats %}
        <tr>
            <td class="text-center">{{ feature_stat['start_at'] }}</td>
            <td><a href="{{ urlencode(escape(feature_stat['feature_name'])) }}.html">{{ escape(feature_stat['feature_name']) }}</a></td>
            <td class="text-center">{{ feature_stat['scenarios'] }}</td>
            <td class="text-center">{{ feature_stat['passed'] }}</td>
            <td class="text-center">{{ feature_stat['failed'] }}</td>
            <td class="text-center">{{ feature_stat['skipped'] }}</td>
            <td class="text-center">{{ feature_stat['error'] }}</td>
            <td class="text-center"><span class="status-{{ feature_stat['status'] }}">{{ feature_stat['status'] }}</span></td>
            <td class="text-center">{{ '{:.1f}'.format(feature_stat['duration'] | float ) }}</td>
        </tr>
        {% endfor %}
    </table>

    <script>
    setupReportTables([[6, 'asc']], [{type: 'timestamp', searchable: false}, {type: 'string'}, {type: 'num', searchable: false}, {type: 'num', searchable: false}, {type: 'num', searchable: false}, {type: 'num', searchable: false}, {type: 'num', searchable: false}, {type: 'html'} , {type: 'timestamp', searchable: false} ])
    </script>
{% endblock %}
