1
0
mirror of https://git.yoctoproject.org/meta-arm synced 2026-01-11 15:00:39 +00:00
Files
meta-arm/scripts/report-details.html.jinja
Ross Burton c4b34740cf scripts/machine-summary: write per-machine reports with more details
Rename the updates.html format to just 'report'.

This report has the existing overview as the index.html, and then
per-machine files are written with the patch breakdown.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-01-19 17:09:58 -05:00

62 lines
1.8 KiB
Django/Jinja

{% extends "report-base.html.jinja" %}
{% block title %}Recipe Report for {{ machine }}{% endblock %}
{# Write a tag element using the Upstream-Status to determine the class. #}
{% macro make_patch_tag(status) -%}
{% set status = status.split()[0] %}
{% if status in ("Unknown", "Pending") %}
{% set class = "is-danger" %}
{% elif status in ("Backport", "Accepted", "Inappropriate") %}
{% set class = "is-success" %}
{% elif status in ("Submitted", "Denied") %}
{% set class = "is-info" %}
{% else %}
{% set class = "is-info" %}
{% endif %}
<span class="tag {{ class }}">{{ status }}</span>
{%- endmacro %}
{% block content %}
<!-- TODO table of contents -->
{% for name, data in data|dictsort if data.needs_update or data.patched %}
<h2 class="title is-4">
{{ data.recipe }} {{ data.fullversion }}
{% if name != data.recipe %}
(provides {{ name }})
{% endif %}
{% if data.needs_update %}<span class="tag is-danger">Upgrade Needed</span>{% endif %}
<a id="recipe-{{ data.recipe }}" class="has-text-grey-lighter">#</a>
</h2>
{% if data.needs_update %}
<p>
Recipe is version {{ data.fullversion }}, latest upstream release is <strong>{{ data.upstream }}</strong>.
</p>
{% endif%}
{% if data.patched %}
<table class="table is-striped is-bordered">
<thead>
<tr>
<th>Patch</th>
<th style="width: 20em">Layer</th>
<th style="width: 10em">Status</th>
</tr>
</thead>
<tbody>
{% for pinfo in data.patches %}
<tr>
<!-- TODO links to cgit -->
<td>{{ pinfo.name }}</td>
<td>{{ pinfo.layer }}</td>
<!-- TODO: tooltip with full status? -->
<td class="has-text-centered">{{ make_patch_tag(pinfo.status)}}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
{% endfor %}
{% endblock %}