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 -
- - - - - - - - - {% for item in compliance %} - - - - - {% endfor %} - -
FeatureCompliance
{{ item.rule__feature__name }} - {% if item.compliance == False %} - Non-Compliant - {% elif item.compliance == True %} - Compliant - {% else %} - N/A - {% endif %} -
-
- {% elif template_type == 'location' %} -
- - - - - - - - - - {% for item in compliance %} - - - - - - {% endfor %} - -
FeatureNon-compliantCompliant
{{ item.rule__feature__name }}{{ item.non_compliant }}{{ item.compliant }}
-
- {% 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 -
-
- +
- - + + - {% if config_features.compliance and golden_config.compliance_config %} - - - - - {% endif %} {% if config_features.intended and golden_config.intended_config %} - - - - - {% endif %} {% if config_features.postprocessing and golden_config.intended_config %} - - - - - {% endif %} {% if config_features.backup and golden_config.backup_config %} + {% for item in compliance %} - + - {% endif %} {% if config_features.sotagg %} + {% endfor %} + +
TypeConfigFeatureCompliance
Compliance - - - -
Intended - - - -
Configuration Postprocessing - - - -
Actual{{ item.rule__feature__name }} - - - + {% if item.compliance == False %} + Non-Compliant + {% elif item.compliance == True %} + Compliant + {% else %} + N/A + {% endif %}
+ {% elif template_type == 'location' %} + + + + + + + + + + {% for item in compliance %} - - + + + - {% endif %} + {% endfor %}
FeatureNon-compliantCompliant
SoT Aggregation Data - - - - {{ item.rule__feature__name }}{{ item.non_compliant }}{{ item.compliant }}
+ {% 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
+ + + + + + + + + {% if config_features.compliance and golden_config.compliance_config %} + + + + + {% endif %} {% if config_features.intended and golden_config.intended_config %} + + + + + {% endif %} {% if config_features.postprocessing and golden_config.intended_config %} + + + + + {% endif %} {% if config_features.backup and golden_config.backup_config %} + + + + + {% endif %} {% if config_features.sotagg %} + + + + + {% endif %} + +
TypeConfig
Compliance + + + +
Intended + + + +
Configuration Postprocessing + + + +
Actual + + + +
SoT Aggregation Data + + + +
-{% endif %} \ No newline at end of file +{% endif %}