Skip to content

Commit

Permalink
Put translation on the summary page in analytics
Browse files Browse the repository at this point in the history
  • Loading branch information
melinoix committed Oct 21, 2024
1 parent d01f14d commit d990ad9
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 32 deletions.
22 changes: 21 additions & 1 deletion frontend/messages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -781,5 +781,25 @@
"questionSingular": "Question",
"questionPlural": "Questions",
"fillMetadataURL": "Option 1: Fill the metadata url",
"fillSSOSLOURLx509cert": "Option 2: Fill the SSO URL, SLO URL and x509cert"
"fillSSOSLOURLx509cert": "Option 2: Fill the SSO URL, SLO URL and x509cert",
"sumpageTotal": "total",
"sumpageActive": "active",
"sumpageDeprecated": "deprecated",
"sumpageToDo": "to do",
"sumpageInProgress": "in progress",
"sumpageOnHold": "on hold",
"sumpageActiveAudits": "active audits",
"sumpageCompliantItems": "compliant items",
"sumpageNonCompliantItems": "non compliant items",
"sumpageEvidences": "evidences",
"sumpageAssessments": "assessments",
"sumpageScenarios": "scenarios",
"sumpageMappedThreats": "mapped threats",
"sumpageRiskAccepted": "risks accepted",
"sumpageSectionControls": "controls",
"sumpageTitleComplianceOverview": "Compliance overview",
"sumpageTitleCurrentRisks": "Current risks",
"sumpageTitleResidualRisks": "Current risks",
"sumpageSectionCompliance": "compliance",
"sumpageSectionRisk": "risk"
}
66 changes: 35 additions & 31 deletions frontend/src/routes/(app)/(internal)/analytics/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -142,146 +142,150 @@
<section id="summary" class=" grid grid-cols-6 gap-4">
<Card
count={metrics.controls.total}
label="total"
label={m.sumpageTotal()}
href="#"
help="this is interesting"
icon="fa-solid fa-shield-halved"
section="controls"
section={m.sumpageSectionControls()}
emphasis={true}
/>
<Card
count={metrics.controls.active}
label="active"
label={m.sumpageActive()}
href="#"
help="this is interesting"
icon="fa-solid fa-shield-halved"
section="controls"
section={m.sumpageSectionControls()}
/>
<Card
count={metrics.controls.deprecated}
label="deprecated"
label={m.sumpageDeprecated()}
href="#"
help="this is interesting"
icon="fa-solid fa-shield-halved"
section="controls"
section={m.sumpageSectionControls()}
/>
<div class="h-64 col-span-3 row-span-2 bg-white">
<NightingaleChart name="nightingale" values={metrics.csf_functions} />
</div>
<Card
count={metrics.controls.to_do}
label="to do"
label={m.sumpageToDo()}
href="#"
help="this is interesting"
icon="fa-solid fa-shield-halved"
section="controls"
section={m.sumpageSectionControls()}
/>
<Card
count={metrics.controls.in_progress}
label="in progress"
label={m.sumpageInProgress()}
href="#"
help="this is interesting"
icon="fa-solid fa-shield-halved"
section="controls"
section={m.sumpageSectionControls()}
/>
<Card
count={metrics.controls.on_hold}
label="on hold"
label={m.sumpageOnHold()}
href="#"
help="this is interesting"
icon="fa-solid fa-shield-halved"
section="controls"
section={m.sumpageSectionControls()}
/>
<div class="col-span-4 row-span-4 bg-white">
<TreemapChart title="Compliance overview" tree={metrics.audits_tree} name="sunburst" />
<TreemapChart
title={m.sumpageTitleComplianceOverview()}
tree={metrics.audits_tree}
name="sunburst"
/>
</div>
<!---->
<Card
count="{metrics.compliance.active_audits}/{metrics.compliance.audits}"
label="active audits"
label={m.sumpageActiveAudits()}
href="#"
help="this is interesting"
icon="fa-solid fa-list-check"
section="compliance"
section={m.sumpageSectionCompliance()}
emphasis={true}
/>
<div></div>
<Card
count={metrics.compliance.compliant_items}
label="compliant items"
label={m.sumpageCompliantItems()}
href="#"
help="this is interesting"
icon="fa-solid fa-list-check"
section="compliance"
section={m.sumpageSectionCompliance()}
/>
<Card
count={metrics.compliance.non_compliant_items}
label="non compliant items"
label={m.sumpageNonCompliantItems()}
href="#"
help="this is interesting"
icon="fa-solid fa-list-check"
section="compliance"
section={m.sumpageSectionCompliance()}
/>
<Card
count={metrics.compliance.evidences}
label="evidences"
label={m.sumpageEvidences()}
href="#"
help="this is interesting"
icon="fa-solid fa-list-check"
section="compliance"
section={m.sumpageSectionCompliance()}
/>
<div class=""></div>
<div class=""></div>
<!---->
<div class=" col-span-2 row-span-2 h-80 bg-white">
<HalfDonutChart
name="current_h"
title="Current risks"
title={m.sumpageTitleCurrentRisks()}
values={data.risks_count_per_level.current}
colors={data.risks_count_per_level.current.map((object) => object.color)}
/>
</div>
<Card
count={metrics.risk.assessments}
label="assessments"
label={m.sumpageAssessments()}
href="#"
help="this is interesting"
emphasis={true}
icon="fa-solid fa-biohazard"
section="risk"
section={m.sumpageSectionRisk()}
/>
<Card
count={metrics.risk.scenarios}
label="scenarios"
label={m.sumpageScenarios()}
href="#"
help="this is interesting"
icon="fa-solid fa-biohazard"
section="risk"
section={m.sumpageSectionRisk()}
/>
<div class=" col-span-2 row-span-2 bg-white">
<HalfDonutChart
name="residual_h"
title="Residual risks"
title={m.sumpageTitleResidualRisks()}
values={data.risks_count_per_level.residual}
colors={data.risks_count_per_level.residual.map((object) => object.color)}
/>
</div>
<Card
count={metrics.risk.threats}
label="mapped threats"
label={m.sumpageMappedThreats()}
href="#"
help="this is interesting"
icon="fa-solid fa-biohazard"
section="risk"
section={m.sumpageSectionRisk()}
/>
<!---->
<Card
count={metrics.risk.acceptances}
label="risks accepted"
label={m.sumpageRiskAccepted()}
href="#"
help="this is interesting"
icon="fa-solid fa-biohazard"
section="risk"
section={m.sumpageSectionRisk()}
/>
<div class=""></div>
</section>
Expand Down

0 comments on commit d990ad9

Please sign in to comment.