{# One configuration check report, separated by topic: a summary with the count per topic, then one section per topic with what it means, what to do and a table with the columns the topic declares. Shared by the page (checkmk_config_checks.html) and its print layout (checkmk_config_checks_report.html), so both show the same thing. #} {% macro cell(column, value, scope_folder) %} {%- if column.kind == 'items' -%} {%- elif column.kind == 'code' -%} {{ value }} {%- elif column.kind == 'state' -%} {{ value }} {%- else -%} {{ value }} {%- endif -%} {% endmacro %}

{% for label, value in report.stats %} {{ label }}: {{ value }} {% endfor %}

{% for section in report.sections %} {% endfor %}
TopicFindings
{{ section.topic.title }} {% if section.findings %} {{ section.findings | length }} {% else %} 0 {% endif %}
Total {{ report.total }}
{% for section in report.sections %} {% set topic = section.topic %}
{{ topic.title }} {% if section.findings %} {{ section.findings | length }} {% else %} 0 {% endif %}
{% if section.findings %}

{{ topic.description }}

What to do: {{ topic.action }}

{% for column in topic.columns %}{% endfor %} {% for finding in section.findings %} {% for column in topic.columns %} {% endfor %} {% endfor %}
#{{ column.label }}
{{ loop.index }}{{ cell(column, finding['values'][column.key], finding['values'].get('folder')) }}
{% else %}

No findings.

{% endif %}
{% endfor %}