diff --git a/report.html.j2 b/report.html.j2
index ceea832..ee54608 100644
--- a/report.html.j2
+++ b/report.html.j2
@@ -24,10 +24,10 @@
padding-left: 1em;
border-left: 1px solid #ccc;
}
- .deleted {
+ .deleted, del {
color: red;
}
- .created {
+ .created, ins {
color: #00aa00;
}
/* nice table style with borders, bold th*/
@@ -99,6 +99,51 @@
{% if stats.modified %}Δ{{stats["modified"]}}{% endif %}
)
{% endmacro %}
+
+
+{% macro display_basic_changes(key, objects, color) %}
+ {% if key in objects %}
+
{{key | upper}} ({{ objects[key] | length }})
+
+
+ {% for obj in objects[key] %}
+ - {{obj["display_name"]}}
+ {% endfor %}
+
+
+ {% endif %}
+{% endmacro %}
+
+
+{% macro spell_changes_out(changes) %}
+
+ {{ display_basic_changes("created", changes, "#009900") }}
+ {% if "modified" in changes %}
+
MODIFIED ({{ changes["modified"] | length }})
+
+ {% for obj in changes["modified"] %}
+
{{ obj["display_name"] }}
+
+
+ {% for change in obj["attributes"] %}
+ - {{ change }}:
+ {% if "diff" in obj["attributes"][change] %}
+ {{ obj["attributes"][change]["diff"] }}
+ {% else %}
+ {{ obj["attributes"][change]["previous"] }} -> {{ obj["attributes"][change]["current"] }}
+ {% endif %}
+
+ {% endfor %}
+
+ {{ display_basic_changes("introduced", obj, "#009900") }}
+ {{ display_basic_changes("removed", obj, "red") }}
+
+ {% endfor %}
+
+ {% endif %}
+ {{ display_basic_changes("deleted", changes, "red") }}
+
+{% endmacro %}
Object Changes {{ pretty_stats(data["objects"].stats) }}
Disclaimer: current version of model comparison engine uses a selected list of objects of interest and will not report object changes for object types that were considered as "out of scope". For the objects of interest however we can assure completness and correctness of comparison.
@@ -115,49 +160,7 @@
{% set obj_type_items = data["objects"][layer][obj_type] %}
{% if obj_type_items.stats %}
{{obj_type}} {{pretty_stats(obj_type_items.stats)}}
-
- {% if "created" in obj_type_items %}
-
Created
-
-
- {% for obj in obj_type_items["created"] %}
- - {{obj["display_name"]}}
- {% endfor %}
-
-
- {% endif %}
-
- {% if "modified" in obj_type_items %}
-
Modified
-
- {% for obj in obj_type_items["modified"] %}
-
{{ obj["display_name"] }}
-
- {% for change in obj["attributes"] %}
- - {{ change }}:
- {% if "diff" in obj["attributes"][change] %}
- {{ obj["attributes"][change]["diff"] }}
- {% else %}
- {{ obj["attributes"][change]["previous"] }} -> {{ obj["attributes"][change]["current"] }}
- {% endif %}
-
- {% endfor %}
-
- {% endfor %}
-
- {% endif %}
-
- {% if "deleted" in obj_type_items %}
-
Deleted
-
-
- {% for obj in obj_type_items["deleted"] %}
- - {{obj["display_name"]}}
- {% endfor %}
-
-
- {% endif %}
-
+ {{ spell_changes_out(obj_type_items) }}
{% endif %}
{% endfor %}
@@ -174,7 +177,12 @@
{% if layer_data and layer_data.stats %}
{{LAYER[layer]}} {{ pretty_stats(layer_data.stats) }}
- layer diagrams go here
+ {% for diag_type, diags in data.diagrams[layer].items() %}
+ {% if diags.stats %}
+
{{diag_type}} {{pretty_stats(diags.stats)}}
+ {{ spell_changes_out(diags) }}
+ {% endif %}
+ {% endfor %}
{% endif %}
{% endfor %}