Skip to content

Commit

Permalink
Merge pull request #3737 from cisagov/feature/cset-2572
Browse files Browse the repository at this point in the history
feature: cset 2572 Internationalize Site Summary Report
  • Loading branch information
randywoods authored Feb 13, 2024
2 parents 3fdd66d + b02b2c3 commit cab79f6
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1204,6 +1204,11 @@ public int StoreAnswer(int assessmentId, Answer answer)
public List<MaturityDomain> GetMaturityAnswers(int assessmentId, bool spanishFlag = false)
{
var data = _context.GetMaturityDetailsCalculations(assessmentId).ToList();
// If there are no data, we have no maturity answers so skip the rest
if (data.Count == 0)
{
return new List<MaturityDomain>();
}
return CalculateComponentValues(data, assessmentId, spanishFlag);
}

Expand Down
27 changes: 10 additions & 17 deletions CSETWebNg/src/app/reports/site-summary/site-summary.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-------------------------->
<div class="report-body mb-5">
<div class="report-body mb-5" *transloco="let t">

<div class="flex-container">
<div class="column mt-3">
<p class="report-title">
SITE SUMMARY REPORT
{{t('reports.core.site summary.site summary')}}
</p>
</div>
<div class="column">
Expand Down Expand Up @@ -53,7 +53,7 @@


<div class="page-break">
<h1>Site Information</h1>
<h1>{{t('reports.core.site summary.site information')}}</h1>
<app-site-information [response]="response"></app-site-information>
</div>

Expand All @@ -63,13 +63,13 @@ <h1>Site Information</h1>
<app-overall-compliance></app-overall-compliance>

<h1 *ngIf="response?.information.assessment_Description">
High-Level Assessment Description
{{t('reports.core.site summary.high-level assessment description')}}
</h1>
<p [innerHTML]="reportSvc.formatLinebreaks(response?.information.assessment_Description)">
</p>

<h1>
Executive Summary
{{t('reports.core.site summary.executive summary')}}
</h1>
<p [innerHTML]="reportSvc.formatLinebreaks(response?.information.executive_Summary)">
</p>
Expand All @@ -88,7 +88,7 @@ <h1>

<!--Network Diagram-->
<div class="page-break" *ngIf="response?.information.useDiagram">
<h1>Network Diagram</h1>
<h1>{{t('reports.core.site summary.network diagram')}}</h1>
<div style="display: table; height: 8in">
<div style="padding: 50% 0; height: 0">
<div style="width: 8in; display: block; transform-origin: top left; transform: rotate(90deg) translate(0, -100%); margin-top: -50%"
Expand Down Expand Up @@ -135,7 +135,7 @@ <h1>Findings and Recommendations From Basic Network Analysis</h1>

<div *ngIf="!usesRAC()" class="page-break">
<h1>
Security Assurance Level (SAL)
{{t('reports.core.site summary.security assurance level')}}
</h1>

<app-sal-section *ngIf="response" [response]="response"></app-sal-section>
Expand Down Expand Up @@ -303,7 +303,7 @@ <h1>

<div class="page-break">
<h1>
Document Library
{{t('reports.core.site summary.document library')}}
</h1>

<table class="cset-table-3">
Expand All @@ -330,18 +330,11 @@ <h1>

<div class="page-break" *ngIf="response?.information.useStandard">
<h1>
Summary Of Ranked Questions
{{t('reports.core.site summary.summary of ranked questions')}}
</h1>

<p>
Each question that did not meet the required Security Assurance Level (SAL) is shown in ranking order below.
The displayed
levels are the SALs applicable to that question. They are: Low (L), Moderate (M), High (H), and Very High
(VH).
CNSSI levels are for Confidentiality (C), Integrity (I), and Availability (A). DoD Instruction 8500.2 levels
are for Confidentiality (Conf) and Mission Assurance Category (MAC). They are: Classified (C), Sensitive
(S),
and Public (P) for Confidentiality; MAC I, II, and III for Mission Assurance Category.
{{t('reports.core.site summary.summary of ranked questions desc')}}
</p>

<table *ngFor="let rq of response?.rankedQuestionsTable" class="cset-table-3">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import { MaturityService } from '../../services/maturity.service';
import { QuestionsService } from '../../services/questions.service';
import Chart from 'chart.js/auto';
import { AssessmentService } from '../../services/assessment.service';
import { TranslocoService } from '@ngneat/transloco';

@Component({
selector: 'site-summary',
Expand Down Expand Up @@ -80,7 +81,8 @@ export class SiteSummaryComponent implements OnInit, AfterViewInit {
public acetSvc: ACETService,
private sanitizer: DomSanitizer,
private maturitySvc: MaturityService,
private assessmentSvc: AssessmentService
private assessmentSvc: AssessmentService,
public tSvc: TranslocoService
) { }

ngOnInit() {
Expand Down
12 changes: 11 additions & 1 deletion CSETWebNg/src/assets/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,17 @@
},
"site summary": {
"site summary": "Site Summary",
"report title": "Site Summary"
"report title": "Site Summary",
"site information": "Site Information",
"high-level assessment description": "High-Level Assessment Description",
"executive summary": "Executive Summary",
"network diagram": "Network Diagram",
"standards compliance": "Standards Compliance",
"security assurance level": "Security Assurance Level (SAL)",
"document library": "Document Library",
"ranked categories": "Ranked Categories",
"summary of ranked questions": "Summary of Ranked Questions",
"summary of ranked questions desc": "Each question that did not meet the required Security Assurance Level (SAL) is shown in ranking order below. The displayed levels are the SALs applicable to that question. They are: Low (L), Moderate (M), High (H), and Very High (VH). CNSSI levels are for Confidentiality (C), Integrity (I), and Availability (A). DoD Instruction 8500.2 levels are for Confidentiality (Conf) and Mission Assurance Category (MAC). They are: Classified (C), Sensitive (S), and Public (P) for Confidentiality; MAC I, II, and III for Mission Assurance Category."
},
"components summary": {
"components summary": "Components Summary",
Expand Down
13 changes: 11 additions & 2 deletions CSETWebNg/src/assets/i18n/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"my assessments": "Mis evaluaciones",
"import": "Importar",
"export all": "Exportar todo",

"new assessment": "Nueva evaluación",
"status": "Estado",
"completion-questions": "{{complete}}/{{total}} preguntas respondidas",
Expand Down Expand Up @@ -576,7 +575,17 @@
},
"site summary": {
"site summary": "[ES]Site Summary",
"report title": "[ES]Site Summary"
"report title": "[ES]Site Summary",
"site information": "Información del sitio",
"high-level assessment description": "[ES]High-Level Assessment Description",
"executive summary": "Sumario ejecutivo",
"network diagram": "[ES]Network Diagram",
"standards compliance": "[ES]Standards Compliance",
"security assurance level": "[ES]Security Assurance Level (SAL)",
"document library": "[ES]Document Library",
"ranked categories": "[ES]Ranked Categories",
"summary of ranked questions": "[ES]Summary of Ranked Questions",
"summary of ranked questions desc": "[ES]Each question that did not meet the required Security Assurance Level (SAL) is shown in ranking order below. The displayed levels are the SALs applicable to that question. They are: Low (L), Moderate (M), High (H), and Very High (VH). CNSSI levels are for Confidentiality (C), Integrity (I), and Availability (A). DoD Instruction 8500.2 levels are for Confidentiality (Conf) and Mission Assurance Category (MAC). They are: Classified (C), Sensitive (S), and Public (P) for Confidentiality; MAC I, II, and III for Mission Assurance Category."
},
"components summary": {
"components summary": "Resumen de componentes",
Expand Down
12 changes: 11 additions & 1 deletion CSETWebNg/src/assets/i18n/uk.json
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,17 @@
},
"site summary": {
"site summary": "Підсумковий звіт сайту",
"report title": "[UK]Site Summary"
"report title": "[UK]Site Summary",
"site information": "[UK]Site Information",
"high-level assessment description": "[UK]High-Level Assessment Description",
"executive summary": "[UK]Executive Summary",
"network diagram": "[UK]Network Diagram",
"standards compliance": "[UK]Standards Compliance",
"security assurance level": "[UK]Security Assurance Level (SAL)",
"document library": "[UK]Document Library",
"ranked categories": "[UK]Ranked Categories",
"summary of ranked questions": "[UK]Summary of Ranked Questions",
"summary of ranked questions desc": "[UK]Each question that did not meet the required Security Assurance Level (SAL) is shown in ranking order below. The displayed levels are the SALs applicable to that question. They are: Low (L), Moderate (M), High (H), and Very High (VH). CNSSI levels are for Confidentiality (C), Integrity (I), and Availability (A). DoD Instruction 8500.2 levels are for Confidentiality (Conf) and Mission Assurance Category (MAC). They are: Classified (C), Sensitive (S), and Public (P) for Confidentiality; MAC I, II, and III for Mission Assurance Category."
},
"components summary": {
"components summary": "Резюме компонентів",
Expand Down

0 comments on commit cab79f6

Please sign in to comment.