2021-11-30 09:02:37 +00:00
|
|
|
{% macro applied_change_template(change_set) -%}
|
|
|
|
{{ caller() }}
|
|
|
|
{% for hist_rec_entry in change_set %}
|
|
|
|
<table id="tbl_records" class="table table-bordered">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th colspan="3">
|
|
|
|
{% if hist_rec_entry.change_type == "+" %}
|
|
|
|
<span
|
2022-05-18 22:53:35 +00:00
|
|
|
style="background-color: lightgreen">{{hist_rec_entry.add_rrset['name']}}
|
|
|
|
{{hist_rec_entry.add_rrset['type']}}</span>
|
2021-11-30 09:02:37 +00:00
|
|
|
{% elif hist_rec_entry.change_type == "-" %}
|
|
|
|
<s
|
|
|
|
style="text-decoration-color: rgba(194, 10,10, 0.6); text-decoration-thickness: 2px;">
|
2022-05-18 22:53:35 +00:00
|
|
|
{{hist_rec_entry.del_rrset['name']}}
|
|
|
|
{{hist_rec_entry.del_rrset['type']}}
|
2021-11-30 09:02:37 +00:00
|
|
|
</s>
|
|
|
|
{% else %}
|
2022-05-18 22:53:35 +00:00
|
|
|
{{hist_rec_entry.add_rrset['name']}}
|
|
|
|
{{hist_rec_entry.add_rrset['type']}}
|
2021-11-30 09:02:37 +00:00
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
, TTL:
|
|
|
|
{% if "ttl" in hist_rec_entry.changed_fields %}
|
|
|
|
<s
|
|
|
|
style="text-decoration-color: rgba(194, 10,10, 0.6); text-decoration-thickness: 2px;">
|
2022-05-18 22:53:35 +00:00
|
|
|
{{hist_rec_entry.del_rrset['ttl']}}</s>
|
2021-11-30 09:02:37 +00:00
|
|
|
<span
|
2022-05-18 22:53:35 +00:00
|
|
|
style="background-color: lightgreen">{{hist_rec_entry.add_rrset['ttl']}}</span>
|
2021-11-30 09:02:37 +00:00
|
|
|
{% else %}
|
2022-05-18 22:53:35 +00:00
|
|
|
{{hist_rec_entry.add_rrset['ttl']}}
|
2021-11-30 09:02:37 +00:00
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
</th>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
|
|
|
|
<th style="width: 150px;">Status</th>
|
|
|
|
<th style="width: 400px;">Data</th>
|
|
|
|
<th style="width: 400px;">Comment</th>
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<table>
|
|
|
|
<tbody>
|
|
|
|
{% for changes in hist_rec_entry.changeSet %}
|
|
|
|
<tr>
|
|
|
|
{% if changes[2] == "unchanged" %}
|
|
|
|
<td>{{ "Activated" if changes[0]['disabled'] ==
|
|
|
|
False else
|
|
|
|
"Disabled"}} </td>
|
|
|
|
{% elif changes[2] == "addition" %}
|
|
|
|
<td>
|
|
|
|
<span style="background-color: lightgreen">
|
|
|
|
{{ "Activated" if changes[1]['disabled'] ==
|
|
|
|
False else
|
|
|
|
"Disabled"}}
|
|
|
|
</span>
|
|
|
|
</td>
|
|
|
|
{% elif changes[2] == "status" %}
|
|
|
|
<td>
|
|
|
|
<s
|
|
|
|
style="text-decoration-color: rgba(194, 10,10, 0.6); text-decoration-thickness: 2px;">
|
|
|
|
{{ "Activated" if changes[0]['disabled'] ==
|
|
|
|
False else
|
|
|
|
"Disabled"}}</s>
|
|
|
|
<span style="background-color: lightgreen">{{
|
|
|
|
"Activated" if changes[1]['disabled'] ==
|
|
|
|
False else
|
|
|
|
"Disabled"}}</span>
|
|
|
|
</td>
|
|
|
|
{% elif changes[2] == "deletion" %}
|
|
|
|
<td>
|
|
|
|
<s
|
|
|
|
style="text-decoration-color: rgba(194, 10,10, 0.6); text-decoration-thickness: 2px;">
|
|
|
|
{{ "Activated" if changes[0]['disabled'] ==
|
|
|
|
False else
|
|
|
|
"Disabled"}}</s>
|
|
|
|
</td>
|
|
|
|
{% endif %}
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<table>
|
|
|
|
<tbody>
|
|
|
|
{% for changes in hist_rec_entry.changeSet %}
|
|
|
|
<tr>
|
|
|
|
{% if changes[2] == "unchanged" %}
|
|
|
|
<td>
|
|
|
|
{{changes[0]['content']}}
|
|
|
|
</td>
|
|
|
|
{% elif changes[2] == "addition" %}
|
|
|
|
<td>
|
|
|
|
<span style="background-color: lightgreen">
|
|
|
|
{{changes[1]['content']}}
|
|
|
|
</span>
|
|
|
|
</td>
|
|
|
|
{% elif changes[2] == "deletion" %}
|
|
|
|
<td>
|
|
|
|
<s
|
|
|
|
style="text-decoration-color: rgba(194, 10, 10, 0.6); text-decoration-thickness: 2px;">
|
|
|
|
{{changes[0]['content']}}
|
|
|
|
</s>
|
|
|
|
</td>
|
|
|
|
{% elif changes[2] == "status" %}
|
|
|
|
<td>
|
|
|
|
{{changes[0]['content']}}
|
|
|
|
</td>
|
|
|
|
{% endif %}
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</tbody>
|
|
|
|
|
|
|
|
</table>
|
|
|
|
</td>
|
|
|
|
<td>
|
2022-05-18 22:53:35 +00:00
|
|
|
{% for comments in hist_rec_entry.add_rrset['comments'] %}
|
2021-11-30 09:02:37 +00:00
|
|
|
{{comments['content'] }}
|
|
|
|
<br/>
|
|
|
|
{% endfor %}
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
{% endfor %}
|
2022-05-18 22:53:35 +00:00
|
|
|
{%- endmacro %}
|