Skip to content

Commit

Permalink
Merge pull request #89 from intuitem/add_links_to_xrays
Browse files Browse the repository at this point in the history
Add links to x-rays
  • Loading branch information
nas-tabchiche authored Mar 1, 2024
2 parents 8a793e1 + 318f9ca commit 4a6664d
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 @@ -973,7 +973,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 @@ -1399,7 +1399,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 @@ -11,7 +11,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 @@ -84,7 +84,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 @@ -156,7 +156,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 4a6664d

Please sign in to comment.