{% macro findings_badges(a) %} {%- if a.critical_count %}{{ a.critical_count }}C{% endif -%} {%- if a.high_count %}{{ a.high_count }}H{% endif -%} {%- if a.medium_count %}{{ a.medium_count }}M{% endif -%} {%- if a.low_count %}{{ a.low_count }}L{% endif -%} {%- if a.info_count %}{{ a.info_count }}I{% endif -%} {%- if not (a.critical_count or a.high_count or a.medium_count or a.low_count or a.info_count) %}No findings{% endif -%} {% endmacro %} {% macro responsible_ai_badges(a) %} {%- if a.responsible_ai_risk %} {{ a.responsible_ai_risk }} {{ a.responsible_ai_status }} {%- else %}—{% endif -%} {% endmacro %} {#- Shared "nothing here yet" box: says what's missing and how to start. Use for a page or list that has no data at all (not for "your filters matched nothing" -- that should offer to clear the filters instead). -#} {% macro empty_state(title, action_href=None, action_label=None, extra_class="") %}
{{ title }}
{{ caller() }}
{%- if action_href %} {{ action_label }} {%- endif %}
{% endmacro %} {#- Severity filter dropdown for the findings lists; submits on change via data-autosubmit (static/js/interactive.js). `options` is finding_filters.SEVERITY_OPTIONS. -#} {% macro severity_select(options, selected) %} {% endmacro %} {#- Small (i) button for a widget's top-right corner; clicking it explains what the widget shows. A native
, so it works with no inline script under the portal's CSP; static/js/interactive.js closes it on an outside click or Escape and keeps one open at a time. The widget needs the `has-info` class (position: relative). Pass inline=True to sit after a section heading instead of in a corner. Usage: {% call info_tip("Coverage") %}

...

{% endcall %} -#} {% macro info_tip(title, inline=False) %}

{{ title }}

{{ caller() }}
{% endmacro %}