{# -*- coding: utf-8 -*- This file is part of Invenio. Copyright (C) 2025 CERN. Invenio is free software; you can redistribute it and/or modify it under the terms of the MIT License; see LICENSE file for more details. #} {% import "invenio_checks/requests/severity_level_icons.html" as severity_level_icons_tpl %}
Checks
Rules
{% for check in checks %} {% for rule_result in check.result.rule_results %} {# Get the icon class for the rule result of one rule result. This code depends on 2 fields of each `rule_results` : `success` and `level`. If the boolean `success` field is true, it means that the check was successful. Otherwise, it means that the check failed, and we display the severity `level` of the check. #} {% if rule_result.success %} {% set rule_severity_level = "success" %} {% elif rule_result.level == "info" %} {% set rule_severity_level = "warning" %} {% elif rule_result.level == "error" %} {% set rule_severity_level = "error" %} {% else %} {% set rule_severity_level = "unknown" %} {% endif %}
{{ rule_result.rule_message }}
{# Rule descriptions can contain HTML to link to a page with more details about the rule. This field is sanitized in the backend with SanitizedHTML. #}
{{ rule_result.rule_description | safe }}
{% endfor %} {% endfor %}