From 6707a875f66fd91b294b830b9dfc45321173cb67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20=C4=8Cern=C3=BD?= Date: Fri, 2 Aug 2024 10:38:56 +0200 Subject: [PATCH] Do not show OVAL details for notapplicable rules With this patch, we won't show OVAL details for notapplicable rules. The reason is that if a rule is notapplicable the OVAL isn't evaluated at all. Also, the users are interested only in the CPE OVAL. Fixes: #241 --- .../html_templates/rule_detail.html | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/openscap_report/report_generators/html_templates/rule_detail.html b/openscap_report/report_generators/html_templates/rule_detail.html index d62d48ca..674a08d6 100644 --- a/openscap_report/report_generators/html_templates/rule_detail.html +++ b/openscap_report/report_generators/html_templates/rule_detail.html @@ -234,12 +234,14 @@ {% endif %} {% include "remedations.html" %} - {% include "oval_definition_detail.html" %} - - - {%- include "oval_graph.html" %} - - + {% if rule.result != "notapplicable" %} + {% include "oval_definition_detail.html" %} + + + {%- include "oval_graph.html" %} + + + {% endif %} {% if rule.cpe_tree -%} CPE check: