Skip to content

Commit

Permalink
Merge pull request #3733 from cisagov/feat/CSET-2571
Browse files Browse the repository at this point in the history
Executive Summary Internationalization - Feat/cset 2571
  • Loading branch information
randywoods authored Feb 8, 2024
2 parents 2f5f5ff + a6c401e commit 925321a
Show file tree
Hide file tree
Showing 13 changed files with 143 additions and 45 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,14 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-------------------------->
<div *transloco="let t">
<h1>
Analysis of Network Components
{{t('reports.core.executive summary.analysis of network components')}}
</h1>

<div class="d-flex flex-row align-items-center mb-5">
<div>
<h2>Combined Component Summary</h2>
<h2>{{t('reports.core.executive summary.combined component summary')}}</h2>
<div *ngIf="loading1">
<div class="spinner-container" style="margin: 2em auto">
<div style="max-width: 50px; max-height: 50px;"></div>
Expand All @@ -38,21 +39,20 @@ <h2>Combined Component Summary</h2>
</div>

<div class="pl-3">
<p>The number of identified warnings and recommendations in the basic analysis of the user-defined system
diagram is <span class="warnInput">{{ warningCount }}</span>.
<p>{{t('reports.core.executive summary.identified warnings', {count: warningCount})}}
</p>
<p> See the section "Findings and
Recommendations from Basic Network Analysis" for details.
<p> {{t('reports.core.executive summary.see network details')}}
</p>
</div>
</div>

<h2>Answer Distribution by Component Type</h2>
<h2>{{t('reports.core.executive summary.answer distribution')}}</h2>
<div *ngIf="loading2">
<div class="spinner-container" style="margin: 2em auto">
<div style="max-width: 50px; max-height: 50px;"></div>
</div>
</div>
<div *ngIf="!loading2">
<canvas id="canvasComponentTypes"></canvas>
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,13 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-------------------------->
<div *transloco="let t">
<h1>
Evaluation Against Selected Standards and Question Sets
{{t('reports.core.executive summary.evaluation')}}
</h1>

<div>
<h2>Standards Summary</h2>
<h2>{{t('reports.core.executive summary.standards summary')}}</h2>
<div *ngIf="loading1">
<div class="spinner-container" style="margin: 2em auto">
<div style="max-width: 50px; max-height: 50px;"></div>
Expand All @@ -38,7 +39,7 @@ <h2>Standards Summary</h2>


<h2>
Standard or Question Set
{{t('reports.core.executive summary.standard or question set')}}
</h2>

<div *ngIf="loading2">
Expand All @@ -48,4 +49,5 @@ <h2>
</div>
<div *ngIf="!loading2">
<canvas id="canvasStandardResultsByCategory"></canvas>
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@
<app-overall-compliance></app-overall-compliance>

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

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

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

<!-- SAL -->
Expand Down Expand Up @@ -135,18 +135,16 @@ <h1>Cybersecurity Maturity</h1>

<div class="page-break" *ngIf="response?.information.useStandard">
<h1>
Areas of Concern Top Subjects and Questions
{{t('reports.core.executive summary.areas of concern')}}
</h1>

<p>
The top subject areas and questions identify those areas where attention will either provide the most immediate
impact or
protect against the greatest vulnerabilities.
{{t('reports.core.executive summary.top subject areas')}}
</p>

<div>
<h3>
Top Categories of Concern
{{t('reports.core.executive summary.concern categories')}}
</h3>
<table class="concern-list">
<tr *ngFor="let topCat of response?.top5Categories; index as i">
Expand All @@ -157,7 +155,7 @@ <h3>


<h3>
Top Questions of Concern
{{t('reports.core.executive summary.concern questions')}}
</h3>
<table class="concern-list">
<tr *ngFor="let topQ of response?.top5Questions; index as i">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import { ACETService } from '../../services/acet.service';
import Chart from 'chart.js/auto';
import { ConfigService } from '../../services/config.service';
import { AssessmentService } from '../../services/assessment.service';
import { TranslocoService } from '@ngneat/transloco';


@Component({
Expand Down Expand Up @@ -67,7 +68,8 @@ export class ExecutiveSummaryComponent implements OnInit {
private titleService: Title,
public acetSvc: ACETService,
private assessmentSvc: AssessmentService,
public configSvc: ConfigService
public configSvc: ConfigService,
public tSvc: TranslocoService
) { }

ngOnInit() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div style="line-height: 150%; padding-right: 2em" class="flex-column mr-4 text-left">
<div>{{response?.information?.assessment_Name}}</div>
<div>
{{response?.information?.assessment_Date | date:'dd-MMM-yyyy'}}
{{reportSvc.translatedDate(response?.information?.assessment_Date)}}
</div>
<div>
{{response?.information?.facility_Name}}
Expand Down
5 changes: 5 additions & 0 deletions CSETWebNg/src/app/reports/info-block/info-block.component.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Component, Input } from '@angular/core';
import { ReportService } from '../../services/report.service';

@Component({
selector: 'app-info-block',
Expand All @@ -9,5 +10,9 @@ export class InfoBlockComponent {
@Input()
public response: any;

constructor(
public reportSvc: ReportService
){}


}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-------------------------->
<h1>Summary Percent Compliance</h1>
<h1 *transloco="let t">{{t('reports.core.executive summary.summary percent compliance')}}</h1>
<div>
<div *ngIf="loading">
<div class="spinner-container" style="margin: 2em auto">
Expand Down
38 changes: 20 additions & 18 deletions CSETWebNg/src/app/reports/sal-section/sal-section.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,66 +20,67 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-------------------------->
<div *transloco="let t">
<div class="sal-display {{analysisSvc.salColor(response?.salTable.osv)}}" style="margin: 0 1em 1em 1em;">
<div class="sal-label">CALCULATED LEVEL</div>
<div class="sal-label">{{t('reports.core.executive summary.calculated level')}}</div>
<div class="sal-value">
{{response?.salTable.osv}}
{{t('titles.sal.' + response?.salTable.osv.toLowerCase())}}
</div>
</div>

<table class="cset-table" *ngIf="response?.salTable.lastSalDeterminationType !== 'GENERAL'">
<tr>
<th style="width: 25%"></th>
<th style="width: 25%">Confidentiality</th>
<th style="width: 25%">Integrity</th>
<th style="width: 25%">Availability</th>
<th style="width: 25%">{{t('titles.sal.confidentiality')}}</th>
<th style="width: 25%">{{t('titles.sal.integrity')}}</th>
<th style="width: 25%">{{t('titles.sal.availability')}}</th>
</tr>
<tr>
<td>Overall Values</td>
<td>{{response?.salTable.q_CV}}</td>
<td>{{response?.salTable.q_IV}}</td>
<td>{{response?.salTable.q_AV}}</td>
<td>{{t('reports.core.executive summary.overall values')}}</td>
<td>{{t('titles.sal.' + response?.salTable.q_CV.toLowerCase())}}</td>
<td>{{t('titles.sal.' + response?.salTable.q_IV.toLowerCase())}}</td>
<td>{{t('titles.sal.' + response?.salTable.q_AV.toLowerCase())}}</td>
</tr>
</table>


<div *ngIf="response?.salTable.lastSalDeterminationType === 'GENERAL'">
<p>
<b>Calculated General Security Assurance Levels (SAL)</b>
<b>{{t('reports.core.executive summary.calculated general security')}}</b>
</p>
<table class="cset-table" style="table-layout: fixed">
<tr>
<th style="width: 33%"></th>
<th style="width: 33%">Onsite</th>
<th style="width: 33%">Offsite</th>
<th style="width: 33%">{{t('reports.core.executive summary.onsite')}}</th>
<th style="width: 33%">{{t('reports.core.executive summary.offsite')}}</th>
</tr>
<tr>
<td>Physical Injury</td>
<td>{{t('reports.core.executive summary.physical injury')}}</td>
<td>{{response?.genSalTable.on_Site_Physical_Injury}}</td>
<td>{{response?.genSalTable.off_Site_Physical_Injury}}</td>
</tr>
<tr>
<td>Hospital Injury</td>
<td>{{t('reports.core.executive summary.hospital injury')}}</td>
<td>{{response?.genSalTable.on_Site_Hospital_Injury}}</td>
<td>{{response?.genSalTable.off_Site_Hospital_Injury}}</td>
</tr>
<tr>
<td>Death</td>
<td>{{t('reports.core.executive summary.death')}}</td>
<td>{{response?.genSalTable.on_Site_Death}}</td>
<td>{{response?.genSalTable.off_Site_Death}}</td>
</tr>
<tr>
<td>Capital Assets</td>
<td>{{t('reports.core.executive summary.capital assets')}}</td>
<td>{{response?.genSalTable.on_Site_Capital_Assets}}</td>
<td>{{response?.genSalTable.off_Site_Capital_Assets}}</td>
</tr>
<tr>
<td>Economic Impact</td>
<td>{{t('reports.core.executive summary.economic impact')}}</td>
<td>{{response?.genSalTable.on_Site_Economic_Impact}}</td>
<td>{{response?.genSalTable.off_Site_Economic_Impact}}</td>
</tr>
<tr>
<td>Environmental Impact</td>
<td>{{t('reports.core.executive summary.environmental impact')}}</td>
<td>{{response?.genSalTable.on_Site_Environmental_Cleanup}}</td>
<td>{{response?.genSalTable.off_Site_Environmental_Cleanup}}</td>
</tr>
Expand Down Expand Up @@ -136,4 +137,5 @@ <h2>
<td>{{nistSalA}}</td>
</tr>
</table>
</div>
</div>
18 changes: 17 additions & 1 deletion CSETWebNg/src/app/reports/sal-section/sal-section.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
////////////////////////////////
import { Component, Input, OnInit } from '@angular/core';
import { ReportAnalysisService } from '../../services/report-analysis.service';
import { TranslocoService } from '@ngneat/transloco';


@Component({
selector: 'app-sal-section',
Expand All @@ -44,7 +46,8 @@ export class SalSectionComponent implements OnInit {
* @param analysisSvc
*/
constructor(
public analysisSvc: ReportAnalysisService
public analysisSvc: ReportAnalysisService,
public tSvc: TranslocoService
) { }

/**
Expand All @@ -64,5 +67,18 @@ export class SalSectionComponent implements OnInit {
if (!!v) {
this.nistSalA = v.justification;
}
if (this.response.genSalTable){
this.translateSALValues()
}
}

// Translate Gen Sal values
translateSALValues(){
for (let salValue in this.response.genSalTable){
if (this.response.genSalTable[salValue] === 'None'){
this.response.genSalTable[salValue] = this.tSvc.translate('titles.sal.gen sal.none')
}
}
}

}
2 changes: 1 addition & 1 deletion CSETWebNg/src/app/services/report.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ export class ReportService {

translatedDate(date: string) {
moment.locale(this.tSvc.getActiveLang());
return moment(date).format('DD-MMM-yyyy');
return moment(date).format('l');
}

translatedDateGMT(date: string) {
Expand Down
27 changes: 26 additions & 1 deletion CSETWebNg/src/assets/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,32 @@
"executive summary": "Executive Summary",
"tab title": "Executive Summary",
"title page title": "EXECUTIVE SUMMARY",
"site information": "Site Information"
"site information": "Site Information",
"calculated level": "CALCULATED LEVEL",
"overall values": "Overall Values",
"summary percent compliance": "Summary Percent Compliance",
"evaluation": "Evaluation Against Selected Standards and Question Sets",
"standards summary": "Standards Summary",
"standard or question set": "Standard or Question Set",
"areas of concern": "Areas of Concern Top Subjects and Questions",
"top subject areas": "The top subject areas and questions identify those areas where attention will either provide the most immediate impact or protect against the greatest vulnerabilities.",
"concern categories": "Top Categories of Concern",
"concern questions": "Top Questions of Concern",
"analysis of network components": "Analysis of Network Components",
"combined component summary": "Combined Component Summary",
"identified warnings": "The number of identified warnings and recommendations in the basic analysis of the user-defined system diagram is {{count}}",
"see network details": "See the section 'Findings and Recommendations from Basic Network Analysis' for details.",
"answer distribution": "[UK] Answer Distribution by Component Type",
"calculated general security": "Calculated General Security Assurance Levels (SAL)",
"onsite": "Onsite",
"offsite": "Offsite",
"physical injury": "Physical Injury",
"hospital injury": "Hospital Injury",
"death": "Death",
"capital assets": "Capital Assets",
"economic impact": "Economic Impact",
"environmental impact": "Environmental Impact"

},
"site summary": {
"site summary": "Site Summary",
Expand Down
26 changes: 25 additions & 1 deletion CSETWebNg/src/assets/i18n/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,31 @@
"executive summary": "Resumen ejecutivo",
"tab title": "Resumen ejecutivo",
"title page title": "RESUMEN EJECUTIVO",
"site information": "Información del sitio"
"site information": "Información del sitio",
"calculated level": "[ES] CALCULATED LEVEL",
"overall values": "[ES] Overall Values",
"summary percent compliance": "[ES] Summary Percent Compliance",
"evaluation": "[ES] Evaluation Against Selected Standards and Question Sets",
"standards summary": "[ES] Standards Summary",
"standard or question set": "[ES] Standard or Question Set",
"areas of concern": "[ES] Areas of Concern Top Subjects and Questions",
"top subject areas": "[ES] The top subject areas and questions identify those areas where attention will either provide the most immediate impact or protect against the greatest vulnerabilities.",
"concern categories": "[ES] Top Categories of Concern",
"concern questions": "[ES] Top Questions of Concern",
"analysis of network components": "[ES] Analysis of Network Components",
"combined component summary": "[ES] Combined Component Summary",
"identified warnings": "[ES] The number of identified warnings and recommendations in the basic analysis of the user-defined system diagram is {{count}}",
"see network details": "[ES] See the section 'Findings and Recommendations from Basic Network Analysis' for details.",
"answer distribution": "[ES] Answer Distribution by Component Type",
"calculated general security": "[ES] Calculated General Security Assurance Levels (SAL)",
"onsite": "[ES] onsite",
"offsite": "[ES] offsite",
"physical injury": "[ES] Physical Injury",
"hospital injury": "[ES] Hospital Injury",
"death": "[ES] Death",
"capital assets": "[ES] Capital Assets",
"economic impact": "[ES] Economic Impact",
"environmental impact": "[ES] Environmental Impact"
},
"site summary": {
"site summary": "[ES]Site Summary",
Expand Down
Loading

0 comments on commit 925321a

Please sign in to comment.