<!DOCTYPE html>
<html>
<head>
    <title>{{title}}</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
    <link rel="stylesheet" href="https://cdn.datatables.net/1.10.16/css/dataTables.bootstrap.min.css">
    <script type="text/javascript" src="https://code.jquery.com/jquery-3.3.1.js"></script>
    <script type="text/javascript" src="https://cdn.datatables.net/1.10.16/js/jquery.dataTables.min.js"></script>
    <script type="text/javascript" src="https://cdn.datatables.net/1.10.16/js/dataTables.bootstrap.min.js"></script>
</head>
<body>    
        <div class="row">
            <div class="col-xs-14 col-sm-10 col-md-10">
                <table id="result" class='table table-hover table-responsive'>
                    <thead>
                        <tr>
                            <th>Path</th>
                            <th>Success</th>
                            <th>Errors</th>
                            <th>Failures</th>
                            <th>Skips</th>
                            <th>Total</th>
                        </tr>
                    </thead>
                    <tbody>
                        {% for file_path, test_name, tests_count, headers in tests_list %}
                            <tr class="{% if headers.errors==0 and headers.failures==0 and headers.success != 0  %}success{% else %}danger{% endif %}">
                                <td class="col-xs-9"><a href="{{file_path}}">{{test_name}}</a></td>
                                <td class="col-xs-1">{{headers.success}}</td>
                                <td class="col-xs-1">{{headers.errors}}</td>
                                <td class="col-xs-1">{{headers.failures}}</td>
                                <td class="col-xs-1">{{headers.skips}}</td>
                                <td class="col-xs-1">{{tests_count}}</td>
                            </tr>
                        {% endfor %}
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</body>
<script>$(document).ready(function() {
    $('#result').DataTable( {
        "lengthMenu": [[-1, 10, 50, 100], ["All", 10, 50, 100]]
    } );
} );</script>
</html>
