{% macro applied_change_template(change_set) -%} {{ caller() }} {% for hist_rec_entry in change_set %}
{% if hist_rec_entry.change_type == '-' %} {{ hist_rec_entry.del_rrset['name'] }} {{ hist_rec_entry.del_rrset['type'] }} {% elif hist_rec_entry.change_type == '+' %} {{ hist_rec_entry.add_rrset['name'] }} {{ hist_rec_entry.add_rrset['type'] }} {% else %} {{ hist_rec_entry.add_rrset['name'] }} {{ hist_rec_entry.add_rrset['type'] }} {% endif %} , TTL {% if not 'ttl' in hist_rec_entry.changed_fields %} {{ hist_rec_entry.add_rrset['ttl'] }} {% else %} {% if hist_rec_entry.change_type in ['-', '*'] %} {{ hist_rec_entry.del_rrset['ttl'] }} {% endif %} {% if hist_rec_entry.change_type in ['+', '*'] %} {{ hist_rec_entry.add_rrset['ttl'] }} {% endif %} {% endif %} | ||
---|---|---|
Status | Data | Comment |
{% if changes[2] == "unchanged" or
(changes[2] == "edit" and changes[0]['disabled'] == changes[1]['disabled']) %}
{{
"Disabled" if changes[1]['disabled'] else "Activated"
}}
{% else %}
{% if changes[2] in ["deletion", "edit"] %}
{{
"Disabled" if changes[0]['disabled'] else "Activated"
}}
{% endif %}
{% if changes[2] in ["addition", "edit"] %}
{{
"Disabled" if changes[1]['disabled'] else "Activated"
}}
{% endif %}
{% endif %}
|
{% if changes[2] == "unchanged" or
(changes[2] == "edit" and changes[0]['content'] == changes[1]['content']) %}
{{
changes[1]['content']
}}
{% else %}
{% if changes[2] in ["deletion", "edit"] %}
{{
changes[0]['content']
}}
{% endif %}
{% if changes[2] in ["addition", "edit"] %}
{{
changes[1]['content']
}}
{% endif %}
{% endif %}
|
{% if changes[2] == "unchanged" or
(changes[2] == "edit" and changes[0]['comment'] == changes[1]['comment']) %}
{{
changes[1]['comment']
}}
{% else %}
{% if changes[2] in ["deletion", "edit"] and changes[0]['comment'] %}
{{
changes[0]['comment']
}}
{% endif %}
{% if changes[2] in ["addition", "edit"] and changes[1]['comment'] %}
{{
changes[1]['comment']
}}
{% endif %}
{% endif %}
|