Skip to content

Commit

Permalink
Add links to x-rays
Browse files Browse the repository at this point in the history
  • Loading branch information
monsieurswag committed Feb 27, 2024
1 parent 6796dfa commit ef4fd62
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions backend/core/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,7 @@ def quality_check(self) -> dict:
"errors": errors_lst,
"warnings": warnings_lst,
"info": info_lst,
"count": len(errors_lst + warnings_lst + info_lst),
"count": sum(len(errors_lst), len(warnings_lst), len(info_lst)),
}
return findings

Expand Down Expand Up @@ -1389,7 +1389,7 @@ def quality_check(self) -> dict:
"errors": errors_lst,
"warnings": warnings_lst,
"info": info_lst,
"count": len(errors_lst + warnings_lst + info_lst),
"count": sum(len(errors_lst), len(warnings_lst), len(info_lst)),
}
return findings

Expand Down
6 changes: 3 additions & 3 deletions frontend/src/routes/(app)/x-rays/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
types.forEach((type) => {
result[type] = Object.entries(item.objects).reduce((acc, [key, value]) => {
if (key !== 'object') {
if (key !== 'object') { // if key === 'quality_check'
acc = [...acc, ...value.quality_check[type]];
}
return acc;
Expand Down Expand Up @@ -83,7 +83,7 @@
<ul class="list-none pl-4 text-sm space-y-2">
{#each compliance_assessments as compliance_assessment, index}
<li class="h4 font-semibold mb-1">
{compliance_assessment.object.name}
<a href="/compliance-assessments/{compliance_assessment.object.id}" class="hover:underline text-blue-600">{compliance_assessment.object.name}</a>
</li>
{@const quality_check = compliance_assessment.quality_check}
<div class="flex flex-col space-y-3">
Expand Down Expand Up @@ -137,7 +137,7 @@
<ul class="list-none pl-4 text-sm space-y-2">
{#each risk_assessments as risk_assessment, index}
<li class="h4 font-semibold mb-1">
{risk_assessment.object.name}
<a href="/risk-assessments/{risk_assessment.object.id}" class="hover:underline text-blue-600">{risk_assessment.object.name}</a>
</li>
{@const quality_check = risk_assessment.quality_check}
<div class="flex flex-col space-y-3">
Expand Down

0 comments on commit ef4fd62

Please sign in to comment.