Skip to content

Commit

Permalink
Merge pull request #667 from intuitem/fix/add-observations-audit-report
Browse files Browse the repository at this point in the history
fix: add score and observation on audit report
  • Loading branch information
ab-smith authored Jul 19, 2024
2 parents 90f54ff + 07a21b8 commit 8405bbb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions backend/core/templates/core/audit_report.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
<hr class="dotted">
<div class="flex flex-row space-x-4 justify-center items-center mb-4">
<h1 class='text-3xl'>{{ compliance_assessment.name }}: {{ compliance_assessment.framework }}</h1>
{% if compliance_assessment.get_global_score > -1 %}
<p class='font-semibold'>{% trans "Score:" %}</p> <span class="font-semibold">{{ compliance_assessment.get_global_score|floatformat }}</span>
{% endif %}
{% bar_graph assessments ancestors %}
</div>
<div class="flex flex-row space-x-4 mb-4">
Expand Down
6 changes: 6 additions & 0 deletions backend/core/templates/snippets/req_node.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,17 @@
<div class='flex flex-row space-x-2'>
<div class='text-center rounded-lg whitespace-nowrap px-2 py-1 text-{{ node.status_color_class }}'>{{ node.status }}</div>
<div class='text-white text-center rounded-lg whitespace-nowrap px-2 py-1 bg-{{ node.result_color_class }}'>{{ node.result }}</div>
{% if node.assessments.is_scored %}
<div class='text-center whitespace-nowrap px-2 py-1'>{{ node.assessments.score }}</div>
{% endif %}
</div>
</div>
{% if node.assessments.requirement.description %}
<div class='text-left w-full'>{{ node.assessments.requirement.description }}</div>
{% endif %}
{% if node.assessments.observation %}
<div class='text-left w-full'><p class="font-semibold">{% trans "Observation:" %}<p> {{ node.assessments.observation }}</div>
{% endif %}
</div>
{% if node.bar_graph %}
{% bar_graph assessments ancestors node.requirement_node %}
Expand Down

0 comments on commit 8405bbb

Please sign in to comment.