Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add links to x-rays #89

Merged
merged 2 commits into from
Mar 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading