scripts/generate-testresult-index.py: Use bulma css to improve the look of the index

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie 2020-10-21 21:42:32 +01:00
parent ab485e89bd
commit 4b8eab92ee

View File

@ -13,18 +13,29 @@ import subprocess
from jinja2 import Template from jinja2 import Template
index_templpate = """ index_templpate = """
<h1>Index of autobuilder test results</h1> <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Index of autobuilder test results</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@0.9.1/css/bulma.min.css">
</head>
<body>
<table> <table class="table is-narrow is-striped">
<thead>
<tr> <tr>
<td>Build</td> <th>Build</th>
<td>Type</td> <th>Type</th>
<td>Branch</td> <th>Branch</th>
<td>Test Results Report</td> <th>Test Results Report</th>
<td>Performance Reports</td> <th>Performance Reports</th>
<td>ptest Logs</td> <th>ptest Logs</th>
<td>Buildhistory</td> <th>Buildhistory</th>
</tr> </tr>
</thead>
<tdata>
{% for entry in entries %} {% for entry in entries %}
<tr> <tr>
<td><a href="{{entry[1]}}">{{entry[0]}}</a></td> <td><a href="{{entry[1]}}">{{entry[0]}}</a></td>
@ -48,7 +59,10 @@ index_templpate = """
</td> </td>
</tr> </tr>
{% endfor %} {% endfor %}
</tdata>
</table> </table>
</body>
</html>
""" """
def parse_args(argv=None): def parse_args(argv=None):