Better styling for detailed runs in test suites

This commit is contained in:
southerntofu 2020-09-24 15:22:02 -04:00
parent 272e89dabe
commit 3fe34a79ad
2 changed files with 23 additions and 19 deletions

View File

@ -15,3 +15,7 @@ header {
td, th {
text-align: center;
}
.testrun > ul {
list-style-type: none;
}

View File

@ -41,25 +41,25 @@
</table>
{% for suite in suites %}
{% set suite_index = loop.index0 %}
{% set suite_index = loop.index0 %}
<h2>{{ suite }}</h2>
{# This is a hack because we can't reverse a map (only arrays) #}
{% set_global runs = [] %}
{% for key, val in data[suite_index] %}{% set_global runs = runs | concat(with=key) %}{% endfor %}
<ul>
{% for run in runs | reverse %}
{# TODO: configure in config.extra how many commits to display #}
{% if loop.index > 2 %}{% break %}{% endif %}
{% set date_commit = run | split(pat="-") %}
<li><a href="{{ get_url(path=directory~"/"~suite~"/" ~ date_commit.0) }}">{{ date_commit[0] | int | date(format=trans(key="dateFormat", lang=lang)) }} ({{ date_commit[1] }})</a>
<ul>
{% for testname, result in data[suite_index][run] %}
<li>{{ result }} {{ testname }}</li>
{% endfor %}
</ul>
</li>
{% endfor %}
</ul>
<h2>{{ suite }}</h2>
{# This is a hack because we can't reverse a map (only arrays) #}
{% set_global runs = [] %}
{% for key, val in data[suite_index] %}{% set_global runs = runs | concat(with=key) %}{% endfor %}
{% for run in runs | reverse %}
{# TODO: configure in config.extra how many commits to display #}
{% if loop.index > 2 %}{% break %}{% endif %}
{% set date_commit = run | split(pat="-") %}
<details class="testrun">
<summary><a href="{{ get_url(path=directory~"/"~suite~"/" ~ date_commit.0) }}">{{ date_commit[0] | int | date(format=trans(key="dateFormat", lang=lang)) }} ({{ date_commit[1] }})</a></summary>
<ul>
{% for testname, result in data[suite_index][run] %}
<li>{{ result }} {{ testname }}</li>
{% endfor %}
</ul>
</details>
{% endfor %}
{% endfor %}
{% endblock main %}