From 41f653c9ae5652641a98464ea0c6c801dc3ec541 Mon Sep 17 00:00:00 2001
From: Gary Snider <75227981+gsnider2195@users.noreply.github.com>
Date: Wed, 11 Sep 2024 13:58:53 -0700
Subject: [PATCH] Fixed improperly rendered panels in device, location, and
tenant views (#808)
---
changes/743.fixed | 1 +
.../content_template.html | 196 +++++++++---------
2 files changed, 96 insertions(+), 101 deletions(-)
create mode 100644 changes/743.fixed
diff --git a/changes/743.fixed b/changes/743.fixed
new file mode 100644
index 00000000..263d7e8a
--- /dev/null
+++ b/changes/743.fixed
@@ -0,0 +1 @@
+Fixed improperly rendered panels in device and location views.
diff --git a/nautobot_golden_config/templates/nautobot_golden_config/content_template.html b/nautobot_golden_config/templates/nautobot_golden_config/content_template.html
index 813f31aa..7ebd6fbe 100644
--- a/nautobot_golden_config/templates/nautobot_golden_config/content_template.html
+++ b/nautobot_golden_config/templates/nautobot_golden_config/content_template.html
@@ -6,119 +6,113 @@
Config Compliance Validation
-
-
-
-
- Feature |
- Compliance |
-
-
-
- {% for item in compliance %}
-
- {{ item.rule__feature__name }} |
-
- {% if item.compliance == False %}
- Non-Compliant
- {% elif item.compliance == True %}
- Compliant
- {% else %}
- N/A
- {% endif %}
- |
-
- {% endfor %}
-
-
-
- {% elif template_type == 'location' %}
-
-
-
-
- Feature |
- Non-compliant |
- Compliant |
-
-
-
- {% for item in compliance %}
-
- {{ item.rule__feature__name }} |
- {{ item.non_compliant }} |
- {{ item.compliant }} |
-
- {% endfor %}
-
-
-
- {% endif %}
-
-{% endif %}
-{# The panel will not show up, since it is returned early in template_content.py based on an actual GoldenConfig object existing #}
-{% if template_type == "device-configs" %}
-
-
- Configuration Types
-
-
-
+
- Type |
- Config |
+ Feature |
+ Compliance |
- {% if config_features.compliance and golden_config.compliance_config %}
-
- Compliance |
-
-
-
-
- |
-
- {% endif %} {% if config_features.intended and golden_config.intended_config %}
-
- Intended |
-
-
-
-
- |
-
- {% endif %} {% if config_features.postprocessing and golden_config.intended_config %}
-
- Configuration Postprocessing |
-
-
-
-
- |
-
- {% endif %} {% if config_features.backup and golden_config.backup_config %}
+ {% for item in compliance %}
- Actual |
+ {{ item.rule__feature__name }} |
-
-
-
+ {% if item.compliance == False %}
+ Non-Compliant
+ {% elif item.compliance == True %}
+ Compliant
+ {% else %}
+ N/A
+ {% endif %}
|
- {% endif %} {% if config_features.sotagg %}
+ {% endfor %}
+
+
+ {% elif template_type == 'location' %}
+
+
+
+ Feature |
+ Non-compliant |
+ Compliant |
+
+
+
+ {% for item in compliance %}
- SoT Aggregation Data |
-
-
-
-
- |
+ {{ item.rule__feature__name }} |
+ {{ item.non_compliant }} |
+ {{ item.compliant }} |
- {% endif %}
+ {% endfor %}
+ {% endif %}
+
+{% endif %}
+{# The panel will not show up, since it is returned early in template_content.py based on an actual GoldenConfig object existing #}
+{% if template_type == "device-configs" %}
+
+
+ Configuration Types
+
+
+
+ Type |
+ Config |
+
+
+
+ {% if config_features.compliance and golden_config.compliance_config %}
+
+ Compliance |
+
+
+
+
+ |
+
+ {% endif %} {% if config_features.intended and golden_config.intended_config %}
+
+ Intended |
+
+
+
+
+ |
+
+ {% endif %} {% if config_features.postprocessing and golden_config.intended_config %}
+
+ Configuration Postprocessing |
+
+
+
+
+ |
+
+ {% endif %} {% if config_features.backup and golden_config.backup_config %}
+
+ Actual |
+
+
+
+
+ |
+
+ {% endif %} {% if config_features.sotagg %}
+
+ SoT Aggregation Data |
+
+
+
+
+ |
+
+ {% endif %}
+
+
-{% endif %}
\ No newline at end of file
+{% endif %}