From d8872ccac12e217089c6d76ab1f58cefe36a628b Mon Sep 17 00:00:00 2001 From: Mostafa Abdo Date: Thu, 8 Feb 2024 14:32:10 -0800 Subject: [PATCH 1/3] add translate loco to site-summary report --- .../src/app/reports/site-summary/site-summary.component.html | 4 ++-- .../src/app/reports/site-summary/site-summary.component.ts | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CSETWebNg/src/app/reports/site-summary/site-summary.component.html b/CSETWebNg/src/app/reports/site-summary/site-summary.component.html index a0115961fa..3ab29491e2 100644 --- a/CSETWebNg/src/app/reports/site-summary/site-summary.component.html +++ b/CSETWebNg/src/app/reports/site-summary/site-summary.component.html @@ -20,12 +20,12 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --------------------------> -
+

- SITE SUMMARY REPORT + {{t('reports.core.site summary.site summary')}}

diff --git a/CSETWebNg/src/app/reports/site-summary/site-summary.component.ts b/CSETWebNg/src/app/reports/site-summary/site-summary.component.ts index 362f855577..ba3e5e01c8 100644 --- a/CSETWebNg/src/app/reports/site-summary/site-summary.component.ts +++ b/CSETWebNg/src/app/reports/site-summary/site-summary.component.ts @@ -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', @@ -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() { From 320490985e7e7c7e201488d4ec4eb0cd5d75a73e Mon Sep 17 00:00:00 2001 From: Mostafa Abdo Date: Tue, 13 Feb 2024 09:33:34 -0800 Subject: [PATCH 2/3] fix: maturity answers call if list is empty --- .../CSETWebCore.Business/Maturity/MaturityBusiness.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CSETWebApi/CSETWeb_Api/CSETWebCore.Business/Maturity/MaturityBusiness.cs b/CSETWebApi/CSETWeb_Api/CSETWebCore.Business/Maturity/MaturityBusiness.cs index dbea5357fa..e320609424 100644 --- a/CSETWebApi/CSETWeb_Api/CSETWebCore.Business/Maturity/MaturityBusiness.cs +++ b/CSETWebApi/CSETWeb_Api/CSETWebCore.Business/Maturity/MaturityBusiness.cs @@ -1204,6 +1204,11 @@ public int StoreAnswer(int assessmentId, Answer answer) public List 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(); + } return CalculateComponentValues(data, assessmentId, spanishFlag); } From 29ae45f5758e04800c8106104c6c33a73c77c1f7 Mon Sep 17 00:00:00 2001 From: Mostafa Abdo Date: Tue, 13 Feb 2024 12:33:25 -0800 Subject: [PATCH 3/3] internationalize remianing site summary content --- .../site-summary/site-summary.component.html | 23 +++++++------------ CSETWebNg/src/assets/i18n/en.json | 12 +++++++++- CSETWebNg/src/assets/i18n/es.json | 13 +++++++++-- CSETWebNg/src/assets/i18n/uk.json | 12 +++++++++- 4 files changed, 41 insertions(+), 19 deletions(-) diff --git a/CSETWebNg/src/app/reports/site-summary/site-summary.component.html b/CSETWebNg/src/app/reports/site-summary/site-summary.component.html index 3ab29491e2..0ebb81cd62 100644 --- a/CSETWebNg/src/app/reports/site-summary/site-summary.component.html +++ b/CSETWebNg/src/app/reports/site-summary/site-summary.component.html @@ -53,7 +53,7 @@
-

Site Information

+

{{t('reports.core.site summary.site information')}}

@@ -63,13 +63,13 @@

Site Information

- High-Level Assessment Description + {{t('reports.core.site summary.high-level assessment description')}}

- Executive Summary + {{t('reports.core.site summary.executive summary')}}

@@ -88,7 +88,7 @@

-

Network Diagram

+

{{t('reports.core.site summary.network diagram')}}

Findings and Recommendations From Basic Network Analysis

- Security Assurance Level (SAL) + {{t('reports.core.site summary.security assurance level')}}

@@ -303,7 +303,7 @@

- Document Library + {{t('reports.core.site summary.document library')}}

@@ -330,18 +330,11 @@

- Summary Of Ranked Questions + {{t('reports.core.site summary.summary of ranked questions')}}

- 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')}}

diff --git a/CSETWebNg/src/assets/i18n/en.json b/CSETWebNg/src/assets/i18n/en.json index 90da7ad8b5..82eafe6119 100644 --- a/CSETWebNg/src/assets/i18n/en.json +++ b/CSETWebNg/src/assets/i18n/en.json @@ -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", diff --git a/CSETWebNg/src/assets/i18n/es.json b/CSETWebNg/src/assets/i18n/es.json index 7586e11b57..efeaedc18d 100644 --- a/CSETWebNg/src/assets/i18n/es.json +++ b/CSETWebNg/src/assets/i18n/es.json @@ -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", @@ -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", diff --git a/CSETWebNg/src/assets/i18n/uk.json b/CSETWebNg/src/assets/i18n/uk.json index 69baaebe8d..f291c37b25 100644 --- a/CSETWebNg/src/assets/i18n/uk.json +++ b/CSETWebNg/src/assets/i18n/uk.json @@ -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": "Резюме компонентів",