{{!
    This file is part of Moodle - https://moodle.org/

    Moodle is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    Moodle is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
}}
{{!
    @template local_kopere_dashboard/benchmark_execute

    Example context (json):
    {
        "tests": [
            {
                "class": "success",
                "id": 1,
                "name": "Teste de Carga",
                "info": "Executado em ambiente de produção",
                "during": "30 min",
                "limit": "1000 req/s",
                "over": "Passou"
            },
            {
                "class": "warning",
                "id": 2,
                "name": "Teste de Estresse",
                "info": "Simulação de tráfego extremo",
                "during": "1 hora",
                "limit": "5000 req/s",
                "over": "Limite atingido"
            }
        ]
    }
}}

<table class="table" id="benchmarkresult">
    <thead>
    <tr>
        <th class="text-center media-middle">#</th>
        <th>{{#str}}benchmark_decription, local_kopere_dashboard{{/str}}</th>
        <th class="media-middle">{{#str}}benchmark_timesec, local_kopere_dashboard{{/str}}</th>
        <th class="media-middle">{{#str}}benchmark_max, local_kopere_dashboard{{/str}}</th>
        <th class="media-middle">{{#str}}benchmark_critical, local_kopere_dashboard{{/str}}</th>
    </tr>
    </thead>
    <tbody>

    {{#tests}}
        <tr class="{{{class}}}">
            <td class="text-center media-middle">{{{id}}}</td>
            <td>{{{name}}}
                <div>
                    <small>{{{info}}}</small>
                </div>
            </td>
            <td class="text-center media-middle">{{{during}}}</td>
            <td class="text-center media-middle">{{{limit}}}</td>
            <td class="text-center media-middle">{{{over}}}</td>
        </tr>
    {{/tests}}
    </tbody>
</table>