blob: a656c26175fab1b3441ce4ae57331ef567f707eb [file] [log] [blame]
Brad Bishopbec4ebc2022-08-03 09:55:16 -04001{% extends "report-base.html.jinja" %}
2{% block title %}Recipe Report for {{ machine }}{% endblock %}
3
4{# Write a tag element using the Upstream-Status to determine the class. #}
5{% macro make_patch_tag(status) -%}
6 {% set status = status.split()[0] %}
7 {% if status in ("Unknown", "Pending") %}
8 {% set class = "is-danger" %}
9 {% elif status in ("Backport", "Accepted", "Inappropriate", "Denied") %}
10 {% set class = "is-success" %}
11 {% elif status in ("Submitted",) %}
12 {% set class = "is-info" %}
13 {% else %}
14 {% set class = "is-info" %}
15 {% endif %}
16 <span class="tag {{ class }}">{{ status }}</span>
17{%- endmacro %}
18
19{% block content %}
20 <!-- TODO table of contents -->
21
22 {% for name, data in data|dictsort if data.needs_update or data.patched %}
23 <h2 class="title is-4">
24 {{ data.recipe }} {{ data.fullversion }}
25 {% if name != data.recipe %}
26 (provides {{ name }})
27 {% endif %}
28 {% if data.needs_update %}<span class="tag is-danger">Upgrade Needed</span>{% endif %}
29 <a id="recipe-{{ data.recipe }}" class="has-text-grey-lighter">#</a>
30 </h2>
31
32 {% if data.needs_update %}
33 <p>
34 Recipe is version {{ data.fullversion }}, latest upstream release is <strong>{{ data.upstream }}</strong>.
35 </p>
36 {% endif%}
37
38 {% if data.patched %}
39 <table class="table is-striped is-bordered">
40 <thead>
41 <tr>
42 <th>Patch</th>
43 <th style="width: 20em">Layer</th>
44 <th style="width: 10em">Status</th>
45 </tr>
46 </thead>
47 <tbody>
48 {% for pinfo in data.patches %}
49 <tr>
50 <td>
51 {% if pinfo.url %}<a href="{{pinfo.url}}">{% endif %}
52 {{ pinfo.name }}
53 {% if pinfo.url %}</a>{% endif %}
54 </td>
55 <td>{{ pinfo.layer }}</td>
56 <!-- TODO: tooltip with full status? -->
57 <td class="has-text-centered">{{ make_patch_tag(pinfo.status)}}</td>
58 </tr>
59 {% endfor %}
60 </tbody>
61 </table>
62 {% endif %}
63 {% endfor %}
64{% endblock %}