{% extends 'admin/master.html' %} {% block body %}

Debug Host

Enter the Hostname for which you want to see the rule analysis
{% if output is mapping%}

Rules

{% set condition_types = { 'equal': "exact match", 'in': "contains", 'not_in': "not contains", 'in_list': "value in your list", 'string_in_list': "string in Python list", 'ewith': "ends with", 'swith': "starts with", 'regex': "regex match", 'bool': "boolean match", 'ignore': "always match" } %} {% set negate = { true: 'not ', false: ' ', } %}

{% for rule_name in rules.keys() %} {% endfor %}

{% for rule_name, rule_raw in rules.items() %}
Rule: {{ rule_name.capitalize() }}
{% for rule in rule_raw %} {% if rule['no_match_reason'] %} {% else %} {%endif%} {% endfor %}
Rule Name Hit First reason the rule wont match Condition Type Last Match
{{rule['name']}} {{rule['hit']}} {% set no_match = rule['no_match_reason'] %} {% if no_match['match_type'] == 'host' %}
Hostname

{{negate[no_match['hostname_match_negate']]}} {{condition_types[no_match['hostname_match']]}} {{no_match['hostname']}}

{% else %}
Key

{{ negate[no_match['tag_match_negate']] }} {{condition_types[no_match['tag_match']]}} {{ no_match['tag']}}

Value

{{negate[no_match['value_match_negate']]}} {{condition_types[no_match['value_match']]}} {{no_match['value']}}

{% endif %}
{{rule['condition_type']}} {{rule['last_match']}}
{% endfor %}

Attributes

{% for header in output.keys() %} {{header.capitalize()}} {% endfor %}

{% for header, content in output.items() %}
{{ header }}
{%if content is mapping %} {% for attr, attr_name in content.items() %} {% endfor %}
Attribute Name Attribute Content
{{attr}} {{attr_name}}
{% else %} {{ content }} {% endif %}
{% endfor %}
{% else %} {{output}} {% endif %}
{% endblock %}