{# 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. With ``interactive`` set (the page), every topic folds, has its own CSV and PDF export, and a topic with a ``host_action`` offers it on its hosts. #} {% 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 %} {% set section_id = 'cc-' ~ report.name ~ '-' ~ topic.key %} {% set discover = interactive and can_discover and topic.host_action == 'discovery' and section.findings %} {% if interactive %}
{% else %}
{% endif %} {{ topic.title }} {% if section.findings %} {{ section.findings | length }} {% else %} 0 {% endif %} {% if interactive %}
{% else %} {% endif %} {% if section.findings %}

{{ topic.description }}

What to do: {{ topic.action }}

{% if interactive %}
This topic only; the check runs again for the export.
{% endif %} {% if discover %}
Run a service discovery on the selected hosts
{% for key, label in discovery_options %} {% endfor %}
{% endif %}
{% if discover %} {% endif %} {% for column in topic.columns %}{% endfor %} {% for finding in section.findings %} {% if discover %} {% endif %} {% 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 %} {% if interactive %}
{% else %} {% endif %} {% endfor %}