{#- The compare page: two run pickers, cautions about the pair, count tiles, then the new and the fixed-or-gone findings worst first and the image changes. Every link is built in the route. -#} {% extends "base.html" %} {% block title %}Compare · kubedelos{% endblock %} {% block run_line %}

{% if result %}Run {{ old.number }} → Run {{ new.number }}{% else %}Compare runs{% endif %}

{% endblock %} {% macro picker(name, label, chosen) -%} {%- endmacro %} {% block content %} {% if not new %}

No scans of {{ context }} yet. Start one on the Scans page.

{% else %}
{%- if context_param %}{% endif %} {{ picker("from", "From", old) }} {{ picker("to", "To", new) }}
{% if not old %}

Run {{ new.number }} has no earlier comparable run (the same scope and package types). Pick two runs above to compare them anyway.

{% elif not result %}

Pick two different runs.

{% else %} {%- for note in cautions %}

{{ note }}

{%- endfor %}

{{ result.still_open }} still open in both runs · {{ result.images_unchanged }} {{ result.images_unchanged | plural("image") }} unchanged

{% for key, title, rows, total in [("new", "New findings", new_rows, result.new_total), ("gone", "Fixed or gone", gone_rows, result.gone_total)] %}

{{ title }}

{% if not rows %}

None.

{% else %}
{%- for f, href in rows %} {%- endfor %}
SeverityCVEPackageFixed inImageTags
{{ f.severity | title }} {{ f.vuln_id }} {{ f.pkg_name or "" }} {{ f.fixed_version }} {{ f.repo }}{% if f.image_gone %} image gone{% endif %} {{ f.images }}
{% if total > rows | length %}

showing {{ rows | length }} of {{ total }}

{% endif %} {% endif %}
{% endfor %}

Images

{% for label, changes, total in [("Added", result.images_added, result.images_added_total), ("Gone", result.images_gone, result.images_gone_total), ("Changed", result.images_changed, result.images_changed_total)] %}

{{ label }} ({{ total }})

{% if changes %} {% if total > changes | length %}

showing {{ changes | length }} of {{ total }}

{% endif %} {% else %}

none

{% endif %} {% endfor %}
{% endif %} {% endif %} {% endblock %}