Commit 900ff3c0 authored by Luis Araujo's avatar Luis Araujo

Add the Notes column to the report page

This commit adds the new Notes column to the report page which will show
all the available notes entered for a specific test case.

The commit also changes the layout of the table, it makes the main
report table responsive so it can scroll horizontally, this way columns
can have a specific size and look better in the page.

The test case ID and notes column now have a specific width size, giving
more space to their cells.
Signed-off-by: Luis Araujo's avatarLuis Araujo <luis.araujo@collabora.co.uk>
parent 7a37a98f
Pipeline #4168 passed with stage
in 1 minute and 23 seconds
......@@ -94,13 +94,14 @@ def generate_report(image_release, image_version,
# Generate a `test_cases` structure of the form:
# test_cases = {
# 'boot-test' : {
# 'target-amd64-public' : 'pass',
# 'target-armhf-internal' : 'pass'
# 'target-amd64-public' : ('pass', lava_url),
# 'target-armhf-internal' : ('pass', lava_url)
# ....
# '__notes': "boot-test notes",
# },
# 'gui-test' : {
# 'target-amd64-public' : 'pass',
# 'target-armhf-internal' : 'failed'
# 'target-amd64-public' : ('pass', lava_url),
# 'target-armhf-internal' : ('failed', lava_url)
# ....
# }
# .....
......@@ -124,6 +125,14 @@ def generate_report(image_release, image_version,
test_cases.setdefault(test_case.suite, {}) \
.update({ image_type_id: (test_case.result, lava_url) })
if test_case.notes and len(test_case.notes.strip()) > 0:
# Append new notes if there are already notes available for this
# test case.
if '__notes' in test_cases[test_case.suite]:
test_cases[test_case.suite]['__notes'] += (", "+test_case.notes)
else:
test_cases[test_case.suite]['__notes'] = test_case.notes
# Skip reporting private/internal images urls.
if job.visibility == 'public':
image_urls[image_type_id] = job.image_url
......
......@@ -59,7 +59,7 @@
</div>
</div>
<table id="test_report" class="table table-bordered" style="width:100%">
<table id="test_report" class="table table-responsive table-bordered">
<thead class="thead-light">
<tr>
<th scope="col">ID</th>
......@@ -77,12 +77,13 @@
<th scope="col">Nfsroot ARM</th>
<th scope="col">Nfsroot ARM64</th>
<th scope="col">Nfsroot AMD64</th>
<th scope="col">Notes</th>
</tr>
</thead>
<tbody>
{% for suite, exec_type, priority, deployments, platforms in tc_table %}
<tr>
<th scope="row" class="table-{{ priority_color_table[priority] }}"><a href="{{test_cases_url}}/{{ suite|e }}.html">{{ suite|e }}</a></th>
<th scope="row" class="table-{{ priority_color_table[priority] }}" style="min-width: 300px;"><a href="{{test_cases_url}}/{{ suite|e }}.html">{{ suite|e }}</a></th>
{{ set_cell('minimal-armhf-internal', deployments, platforms, suite) }}
{{ set_cell('minimal-armhf-public', deployments, platforms, suite) }}
{{ set_cell('minimal-arm64-public', deployments, platforms, suite) }}
......@@ -97,6 +98,7 @@
{{ set_cell('nfsroot-armhf-public', deployments, platforms, suite) }}
{{ set_cell('nfsroot-arm64-public', deployments, platforms, suite) }}
{{ set_cell('nfsroot-amd64-public', deployments, platforms, suite) }}
<td style="min-width: 300px;">{% if test_cases[suite] %}{{ test_cases[suite]["__notes"] }}{% endif %}</td>
</tr>
{% endfor %}
</tbody>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment