diff --git a/CSETWebNg/src/app/assessment/prepare/assessment-info/assessment-demographics/assessment-demographics.component.ts b/CSETWebNg/src/app/assessment/prepare/assessment-info/assessment-demographics/assessment-demographics.component.ts index 33e9c58912..1c62b6c008 100644 --- a/CSETWebNg/src/app/assessment/prepare/assessment-info/assessment-demographics/assessment-demographics.component.ts +++ b/CSETWebNg/src/app/assessment/prepare/assessment-info/assessment-demographics/assessment-demographics.component.ts @@ -232,7 +232,7 @@ export class AssessmentDemographicsComponent implements OnInit { } showCriticalService() { - const moduleBehavior = this.configSvc.config.moduleBehaviors.find(m => m.moduleName == this.assessSvc.assessment?.maturityModel?.modelName); + const moduleBehavior = this.configSvc.getModuleBehavior(this.assessSvc.assessment?.maturityModel?.modelName); return (this.configSvc.behaviors.showCriticalService ?? true) && (moduleBehavior?.showCriticalServiceDemog ?? true); } diff --git a/CSETWebNg/src/app/assessment/questions/grouping-block/grouping-block.component.html b/CSETWebNg/src/app/assessment/questions/grouping-block/grouping-block.component.html index dfbe61d70f..c10446500e 100644 --- a/CSETWebNg/src/app/assessment/questions/grouping-block/grouping-block.component.html +++ b/CSETWebNg/src/app/assessment/questions/grouping-block/grouping-block.component.html @@ -102,4 +102,4 @@
Remarks - {{grouping.title}}
-
\ No newline at end of file +
\ No newline at end of file diff --git a/CSETWebNg/src/app/assessment/questions/grouping-block/grouping-block.component.ts b/CSETWebNg/src/app/assessment/questions/grouping-block/grouping-block.component.ts index d22f7501c0..1b8015fccd 100644 --- a/CSETWebNg/src/app/assessment/questions/grouping-block/grouping-block.component.ts +++ b/CSETWebNg/src/app/assessment/questions/grouping-block/grouping-block.component.ts @@ -30,6 +30,7 @@ import { MaturityFilteringService } from '../../../services/filtering/maturity-f import { MaturityService } from '../../../services/maturity.service'; import { NCUAService } from '../../../services/ncua.service'; import { QuestionsService } from '../../../services/questions.service'; +import { ModuleBehavior } from '../../../models/module-config.model'; @Component({ @@ -40,6 +41,7 @@ export class GroupingBlockComponent implements OnInit { @Input('grouping') grouping: QuestionGrouping; modelId: number; + moduleBehavior: ModuleBehavior; /** * @@ -59,6 +61,7 @@ export class GroupingBlockComponent implements OnInit { */ ngOnInit(): void { this.modelId = this.maturityFilteringService.assesmentSvc.assessment.maturityModel.modelId; + this.moduleBehavior = this.configSvc.getModuleBehavior(this.modelId); } /** @@ -83,28 +86,21 @@ export class GroupingBlockComponent implements OnInit { } /** - * Indicates if the domain label should be shown + * Indicates if the domain label headers should be shown. + * Invisible domains stay invisible. + * If the moduleBehavior.showDomainHeaders is not defined, it defaults to true. */ isDomainVisible(): boolean { if (!this.isDomain()) { return false; } - // ACET domains are always visible - if (this.maturityFilteringService.assesmentSvc.assessment.maturityModel.modelName == 'ACET') { - return true; - } - - if (this.maturityFilteringService.assesmentSvc.assessment.maturityModel.modelName == 'ISE') { - return false; - } - // hide invisible domains if (!this.grouping.visible) { return false; } - return true; + return this.moduleBehavior.showDomainHeaders ?? true; } /** diff --git a/CSETWebNg/src/app/assessment/questions/maturity-questions/maturity-questions.component.html b/CSETWebNg/src/app/assessment/questions/maturity-questions/maturity-questions.component.html index 88afb8195d..9cb07dd12c 100644 --- a/CSETWebNg/src/app/assessment/questions/maturity-questions/maturity-questions.component.html +++ b/CSETWebNg/src/app/assessment/questions/maturity-questions/maturity-questions.component.html @@ -89,7 +89,6 @@

{{ groupingTitle }}

- diff --git a/CSETWebNg/src/app/assessment/questions/maturity-questions/maturity-questions.component.ts b/CSETWebNg/src/app/assessment/questions/maturity-questions/maturity-questions.component.ts index 01995b00c4..5ac0e360eb 100644 --- a/CSETWebNg/src/app/assessment/questions/maturity-questions/maturity-questions.component.ts +++ b/CSETWebNg/src/app/assessment/questions/maturity-questions/maturity-questions.component.ts @@ -42,6 +42,7 @@ import { TranslocoService } from '@jsverse/transloco'; import { DemographicService } from '../../../services/demographic.service'; import { DemographicIodService } from '../../../services/demographic-iod.service'; import { SsgService } from '../../../services/ssg.service'; +import { ModuleBehavior } from '../../../models/module-config.model'; @Component({ selector: 'app-maturity-questions', @@ -51,6 +52,7 @@ export class MaturityQuestionsComponent implements OnInit, AfterViewInit { groupings: QuestionGrouping[] = []; pageTitle: string = ''; + moduleBehavior: ModuleBehavior; modelId: number; modelName: string = ''; groupingTitle: string = ''; @@ -185,21 +187,21 @@ export class MaturityQuestionsComponent implements OnInit, AfterViewInit { obsGetQ.subscribe( (response: MaturityQuestionResponse) => { this.modelId = response.modelId; + + this.moduleBehavior = this.configSvc.getModuleBehavior(this.modelId); + + this.modelName = response.modelName; this.questionsAlias = response.questionsAlias; this.groupings = response.groupings; this.assessSvc.assessment.maturityModel.maturityTargetLevel = response.maturityTargetLevel; - + this.assessSvc.assessment.maturityModel.answerOptions = response.answerOptions; this.filterSvc.answerOptions = response.answerOptions; this.filterSvc.maturityModelId = response.modelId; this.filterSvc.maturityModelName = response.modelName; - if (this.groupingId?.toLowerCase() == 'bonus') { - this.pageTitle = this.tSvc.translate(`titles.ssg.${this.ssgSvc.ssgSimpleSectorLabel()}`); - } else { - this.pageTitle = this.tSvc.translate('titles.' + this.questionsAlias.toLowerCase().trim()) + ' - ' + this.modelName; - } + this.displayTitle(); this.glossarySvc.glossaryEntries = response.glossary; @@ -249,7 +251,7 @@ export class MaturityQuestionsComponent implements OnInit, AfterViewInit { this.filterSvc.maturityModelId = response.modelId; this.pageTitle = this.questionsAlias + ' - ' + this.modelName; - this.groupingTitle = response.title; + this.glossarySvc.glossaryEntries = response.glossary; this.loaded = true; @@ -268,6 +270,25 @@ export class MaturityQuestionsComponent implements OnInit, AfterViewInit { }); } + /** + * + */ + displayTitle() { + // Bonus questions are for SSGs. + if (this.groupingId?.toLowerCase() == 'bonus') { + this.pageTitle = this.tSvc.translate(`titles.ssg.${this.ssgSvc.ssgSimpleSectorLabel()}`); + return; + } + + let displayName = this.modelName; + + if (this.moduleBehavior.displayNameKey != null) { + displayName = this.tSvc.translate(this.moduleBehavior.displayNameKey); + } + + this.pageTitle = this.tSvc.translate('titles.' + this.questionsAlias.toLowerCase().trim()) + ' - ' + displayName; + } + /** * Controls the mass expansion/collapse of all subcategories on the screen. * @param mode diff --git a/CSETWebNg/src/app/assessment/questions/question-block-maturity/question-block-maturity.component.ts b/CSETWebNg/src/app/assessment/questions/question-block-maturity/question-block-maturity.component.ts index 71a1843bee..dbd7969592 100644 --- a/CSETWebNg/src/app/assessment/questions/question-block-maturity/question-block-maturity.component.ts +++ b/CSETWebNg/src/app/assessment/questions/question-block-maturity/question-block-maturity.component.ts @@ -139,7 +139,7 @@ export class QuestionBlockMaturityComponent implements OnInit { * hidden. Use config moduleBehavior to define this. */ showLevelIndicator(q): boolean { - const behavior = this.configSvc.config.moduleBehaviors.find(m => m.moduleName == this.assessSvc.assessment.maturityModel.modelName) + const behavior = this.configSvc.getModuleBehavior(this.assessSvc.assessment.maturityModel.modelName); if (!!behavior) { return behavior.showMaturityLevelBadge ?? true; } diff --git a/CSETWebNg/src/app/assessment/questions/question-extras/question-extras.component.html b/CSETWebNg/src/app/assessment/questions/question-extras/question-extras.component.html index 92089fa88e..6b1a37a9e1 100644 --- a/CSETWebNg/src/app/assessment/questions/question-extras/question-extras.component.html +++ b/CSETWebNg/src/app/assessment/questions/question-extras/question-extras.component.html @@ -278,7 +278,7 @@ -
+

m.moduleName == this.assessSvc.assessment.maturityModel?.modelName) + const behavior = this.configSvc.getModuleBehavior(this.assessSvc.assessment.maturityModel?.modelName); if (mode == 'DETAIL') { return behavior?.questionIcons?.showDetails ?? true; @@ -748,7 +748,7 @@ export class QuestionExtrasComponent implements OnInit { * @returns */ whichSupplementalIcon() { - const behavior = this.configSvc.config.moduleBehaviors.find(m => m.moduleName == this.assessSvc.assessment.maturityModel?.modelName); + const behavior = this.configSvc.getModuleBehavior(this.assessSvc.assessment.maturityModel?.modelName); if (!!behavior && behavior.questionIcons?.guidanceIcon?.toLowerCase() == 'g') { return "G"; } else { @@ -812,8 +812,8 @@ export class QuestionExtrasComponent implements OnInit { * independent from Examination Approach or not * @returns */ - seperateGuidanceFromApproach() { - const behavior = this.configSvc.config.moduleBehaviors.find(m => m.moduleName == this.assessSvc.assessment.maturityModel?.modelName); + separateGuidanceFromApproach() { + const behavior = this.configSvc.getModuleBehavior(this.assessSvc.assessment.maturityModel?.modelName); return behavior?.independentSuppGuidance; } diff --git a/CSETWebNg/src/app/assessment/results/cpg/cpg-summary/cpg-summary.component.ts b/CSETWebNg/src/app/assessment/results/cpg/cpg-summary/cpg-summary.component.ts index 0972b9e379..54b6e348b0 100644 --- a/CSETWebNg/src/app/assessment/results/cpg/cpg-summary/cpg-summary.component.ts +++ b/CSETWebNg/src/app/assessment/results/cpg/cpg-summary/cpg-summary.component.ts @@ -52,7 +52,7 @@ export class CpgSummaryComponent implements OnInit { */ ngOnInit(): void { this.cpgSvc.getAnswerDistrib().subscribe((resp: any) => { - const cpgAnswerOptions = this.configSvc.config.moduleBehaviors.find(b => b.moduleName == 'CPG').answerOptions; + const cpgAnswerOptions = this.configSvc.getModuleBehavior('CPG').answerOptions; resp.forEach(r => { r.series.forEach(element => { diff --git a/CSETWebNg/src/app/layout/acet-layout-main/acet-layout-main.component.scss b/CSETWebNg/src/app/layout/acet-layout-main/acet-layout-main.component.scss index 309643a683..1562d3f9cc 100644 --- a/CSETWebNg/src/app/layout/acet-layout-main/acet-layout-main.component.scss +++ b/CSETWebNg/src/app/layout/acet-layout-main/acet-layout-main.component.scss @@ -2311,7 +2311,7 @@ ul.related-questions li { .domain-group-heading { margin-bottom: 1rem; - font-size: 2rem; + font-size: 1.8rem; } .capability-group-heading { diff --git a/CSETWebNg/src/app/layout/cf-layout-main/cf-layout-main.component.scss b/CSETWebNg/src/app/layout/cf-layout-main/cf-layout-main.component.scss index f4bbdb1707..b505e253b4 100644 --- a/CSETWebNg/src/app/layout/cf-layout-main/cf-layout-main.component.scss +++ b/CSETWebNg/src/app/layout/cf-layout-main/cf-layout-main.component.scss @@ -2337,7 +2337,7 @@ ul.related-questions li { .domain-group-heading { margin-bottom: 1rem; - font-size: 2rem; + font-size: 1.8rem; } .capability-group-heading { diff --git a/CSETWebNg/src/app/layout/cie-layout-main/cie-layout-main.component.scss b/CSETWebNg/src/app/layout/cie-layout-main/cie-layout-main.component.scss index aa12a26783..f044762682 100644 --- a/CSETWebNg/src/app/layout/cie-layout-main/cie-layout-main.component.scss +++ b/CSETWebNg/src/app/layout/cie-layout-main/cie-layout-main.component.scss @@ -2344,7 +2344,7 @@ ul.related-questions li { .domain-group-heading { margin-bottom: 1rem; - font-size: 2rem; + font-size: 1.8rem; } .capability-group-heading { diff --git a/CSETWebNg/src/app/layout/iod-layout/iod-layout.component.scss b/CSETWebNg/src/app/layout/iod-layout/iod-layout.component.scss index 3ab5803bcc..e1f081ae1c 100644 --- a/CSETWebNg/src/app/layout/iod-layout/iod-layout.component.scss +++ b/CSETWebNg/src/app/layout/iod-layout/iod-layout.component.scss @@ -2340,7 +2340,7 @@ ul.related-questions li { .domain-group-heading { margin-bottom: 1rem; - font-size: 2rem; + font-size: 1.8rem; } .capability-group-heading { diff --git a/CSETWebNg/src/app/layout/layout-main/layout-main.component.scss b/CSETWebNg/src/app/layout/layout-main/layout-main.component.scss index 53e653718b..2fddcb3533 100644 --- a/CSETWebNg/src/app/layout/layout-main/layout-main.component.scss +++ b/CSETWebNg/src/app/layout/layout-main/layout-main.component.scss @@ -2345,7 +2345,7 @@ ul.related-questions li { .domain-group-heading { margin-bottom: 1rem; - font-size: 2rem; + font-size: 1.8rem; } .capability-group-heading { diff --git a/CSETWebNg/src/app/layout/renew-layout-main/renew-layout-main.component.scss b/CSETWebNg/src/app/layout/renew-layout-main/renew-layout-main.component.scss index 0168b2ce5a..ed40cc9979 100644 --- a/CSETWebNg/src/app/layout/renew-layout-main/renew-layout-main.component.scss +++ b/CSETWebNg/src/app/layout/renew-layout-main/renew-layout-main.component.scss @@ -2340,7 +2340,7 @@ ul.related-questions li { .domain-group-heading { margin-bottom: 1rem; - font-size: 2rem; + font-size: 1.8rem; } .capability-group-heading { diff --git a/CSETWebNg/src/app/layout/rra-layout-main/rra-layout-main.component.scss b/CSETWebNg/src/app/layout/rra-layout-main/rra-layout-main.component.scss index a3e32bad55..a61e15d970 100644 --- a/CSETWebNg/src/app/layout/rra-layout-main/rra-layout-main.component.scss +++ b/CSETWebNg/src/app/layout/rra-layout-main/rra-layout-main.component.scss @@ -2095,7 +2095,7 @@ ul.related-questions li { .domain-group-heading { margin-bottom: 1rem; - font-size: 2rem; + font-size: 1.8rem; } .capability-group-heading { diff --git a/CSETWebNg/src/app/layout/styles-base.scss b/CSETWebNg/src/app/layout/styles-base.scss index d10406585e..d3be9c3e55 100644 --- a/CSETWebNg/src/app/layout/styles-base.scss +++ b/CSETWebNg/src/app/layout/styles-base.scss @@ -2097,7 +2097,7 @@ ul.related-questions li { .domain-group-heading { margin-bottom: 1rem; - font-size: 2rem; + font-size: 1.8rem; } .capability-group-heading { diff --git a/CSETWebNg/src/app/layout/tsa-layout-main/tsa-layout-main.component.scss b/CSETWebNg/src/app/layout/tsa-layout-main/tsa-layout-main.component.scss index 2c826ca253..4c70e12c31 100644 --- a/CSETWebNg/src/app/layout/tsa-layout-main/tsa-layout-main.component.scss +++ b/CSETWebNg/src/app/layout/tsa-layout-main/tsa-layout-main.component.scss @@ -2292,7 +2292,7 @@ ul.related-questions li { .domain-group-heading { margin-bottom: 1rem; - font-size: 2rem; + font-size: 1.8rem; } .capability-group-heading { diff --git a/CSETWebNg/src/app/models/module-config.model.ts b/CSETWebNg/src/app/models/module-config.model.ts new file mode 100644 index 0000000000..3d25714468 --- /dev/null +++ b/CSETWebNg/src/app/models/module-config.model.ts @@ -0,0 +1,153 @@ +//////////////////////////////// +// +// Copyright 2024 Battelle Energy Alliance, LLC +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. +// +//////////////////////////////// + +/** + * Defines the configuration for a maturity module. + */ +export class ModuleBehavior { + moduleName: string; + modelId: number; + + /** + * The key to use with Transloco for the display name of the module. + */ + displayNameKey?: string; + + /** + * If defined for a model, this can hide the Domain headers. + * + * This is useful if the model has a single Domain and you don't need + * that large header to show. + */ + showDomainHeaders?: boolean; + + /** + * Indicates if the Critical Service fields should show on the Demographics page. + */ + showCriticalServiceDemog?: boolean; + + /** + * Indicates if the "Level 1" badge/pill should show below the question title. + */ + showMaturityLevelBadge?: boolean; + + /** + * + */ + independentSuppGuidance?: boolean; + + /** + * If true, the supplemental/guidance will be loaded automatically when the + * question comes into view. + */ + autoLoadSupplemental?: boolean; + + + questionIcons?: QuestionIconsConfig; + + + answerOptions?: AnswerOptionConfig[]; +} + + +export class AnswerOptionConfig { + /** + * Just a place for a comment. No functionality. + */ + note?: string; + + /** + * The internal code of the option: Y, N, NA, etc. + */ + code: string; + + /** + * The key to use with Transloco for the button label, button tooltip and answer + * + * The lookup is: + * answer-options.button-labels. + * answer-options.button-tooltips. + * answer-options.labels. + */ + buttonLabelKey: string; + + /** + * Defines the CSS class to apply to the answer button. + */ + buttonCss: string; + + /** + * Defines the HTML color code for bar chart segments. + */ + chartSegmentColor: string; + + /** + * Allows an answer option to be defined for one particular skin/installation mode. + */ + skin?: string; + + /** + * Indicates if this answer is considered "implemented". + * This is a future feature. + */ + consideredImplemented: boolean; +} + + +/** + * Defines preferences for the behavior of the "question extras" icons on each question. + */ +export class QuestionIconsConfig { + /** + * Indicates if the "Details" book icon should be displayed in the question icons. + */ + showDetails: boolean; + + /** + * Indicates if the "Supplemental Guidance" icon should be displayed in the question icons. + */ + showGuidance?: boolean; + + /** + * Indicates which icon should be used for supplemental/guidance. + * Default is the "i" icon + * Can be overriden with the "G" icon by setting this to "G". + */ + guidanceIcon?: string; + + /** + * Indicates if the "References" 'three books' icon should be displayed in the question icons. + */ + showReferences?: boolean; + + /** + * Indicates if the "Observations" light bulb icon should be displayed in the question icons. + */ + showObservations?: boolean; + + /** + * Indicates if the "Reviewed" button should be displayed in the question icons. + */ + showReviewed: boolean; +} \ No newline at end of file diff --git a/CSETWebNg/src/app/reports/cpg/cpg-report/cpg-report.component.ts b/CSETWebNg/src/app/reports/cpg/cpg-report/cpg-report.component.ts index 8fecbe7d4b..ae10f7b564 100644 --- a/CSETWebNg/src/app/reports/cpg/cpg-report/cpg-report.component.ts +++ b/CSETWebNg/src/app/reports/cpg/cpg-report/cpg-report.component.ts @@ -82,7 +82,7 @@ export class CpgReportComponent implements OnInit { }); this.cpgSvc.getAnswerDistrib().subscribe((resp: any) => { - const cpgAnswerOptions = this.configSvc.config.moduleBehaviors.find(b => b.moduleName == 'CPG').answerOptions; + const cpgAnswerOptions = this.configSvc.getModuleBehavior('CPG').answerOptions; resp.forEach(r => { r.series.forEach(element => { diff --git a/CSETWebNg/src/app/reports/pdf-reports/pdf-reports.component.ts b/CSETWebNg/src/app/reports/pdf-reports/pdf-reports.component.ts index 2a1387c9c8..619736a5ee 100644 --- a/CSETWebNg/src/app/reports/pdf-reports/pdf-reports.component.ts +++ b/CSETWebNg/src/app/reports/pdf-reports/pdf-reports.component.ts @@ -556,7 +556,7 @@ export class PdfReportsComponent implements OnInit, AfterViewInit { layout: 'noBorders' } - // A seperate table for the table key + // A separate table for the table key let tableLegend = { layout: 'noBorders', table: { diff --git a/CSETWebNg/src/app/services/config.service.ts b/CSETWebNg/src/app/services/config.service.ts index 1f6c108fa7..099fddb315 100644 --- a/CSETWebNg/src/app/services/config.service.ts +++ b/CSETWebNg/src/app/services/config.service.ts @@ -27,6 +27,7 @@ import { DOCUMENT } from '@angular/common'; import { concat } from 'rxjs'; import { tap } from 'rxjs/operators'; import { merge } from 'lodash'; +import { ModuleBehavior } from '../models/module-config.model'; @Injectable() export class ConfigService { @@ -332,7 +333,7 @@ export class ConfigService { * Either the modelId or moduleName can be sent as a key. * Returns null if it can't be found. */ - getModuleConfig(id: any) { + getModuleBehavior(id: any): ModuleBehavior { // check the model's configuration let modelConfiguration = this.config.moduleBehaviors.find(x => x.modelId == +id) || diff --git a/CSETWebNg/src/app/services/filtering/question-filter.service.ts b/CSETWebNg/src/app/services/filtering/question-filter.service.ts index 30c3f9e856..be667aa667 100644 --- a/CSETWebNg/src/app/services/filtering/question-filter.service.ts +++ b/CSETWebNg/src/app/services/filtering/question-filter.service.ts @@ -369,7 +369,7 @@ export class QuestionFilterService { /** evaluate domain heading principle question visibility. * Put into 'areFactorQuestionsDeficient' to allow both principle - * and principle-phase tables to have seperate filters + * and principle-phase tables to have separate filters */ d.categories.areFactorQuestionsDeficient = (d.categories.assessmentFactors.find(af => !af.areQuestionsDeficient) == null ? true : false); }); diff --git a/CSETWebNg/src/app/services/questions.service.ts b/CSETWebNg/src/app/services/questions.service.ts index 5199e233b2..3c91cb8ad0 100644 --- a/CSETWebNg/src/app/services/questions.service.ts +++ b/CSETWebNg/src/app/services/questions.service.ts @@ -96,7 +96,6 @@ export class QuestionsService { * Retrieves the list of questions. */ getQuestionsList() { - console.log('getQuestionsList'); return this.http.get(this.configSvc.apiUrl + 'questionlist', headers); } @@ -142,15 +141,15 @@ export class QuestionsService { } // find the configuration for the model - const moduleConfig = this.configSvc.getModuleConfig(modelId); + const moduleBehavior = this.configSvc.getModuleBehavior(modelId); // standards (modelid is null) - check the checkbox state - if (!moduleConfig) { + if (!moduleBehavior) { return this.autoLoadSuppCheckboxState; } - return moduleConfig.autoLoadSupplemental ?? false; + return moduleBehavior.autoLoadSupplemental ?? false; } /** @@ -392,10 +391,7 @@ export class QuestionsService { if (!!model && String(model).trim().length > 0) { // first try to find the model configuration using its model name - let modelConfiguration = - this.configSvc.config.moduleBehaviors.find(x => x.modelId == model) || - this.configSvc.config.moduleBehaviors.find(x => x.moduleName == model); - + let modelConfiguration = this.configSvc.getModuleBehavior(model); if (!!modelConfiguration) { // first look for a skin-specific answer option diff --git a/CSETWebNg/src/assets/i18n/en.json b/CSETWebNg/src/assets/i18n/en.json index 34f1a07937..347600eac7 100644 --- a/CSETWebNg/src/assets/i18n/en.json +++ b/CSETWebNg/src/assets/i18n/en.json @@ -1770,6 +1770,17 @@ "cisa is part of dhs": "CISA is part of the Department of Homeland Security", "cie website": "CIE Website" }, + "modules": { + "cpg": { + "display-name": "Cyber Performance Goals (CPG)" + }, + "cmmc2f": { + "display-name": "Cybersecurity Maturity Model Certification (CMMC) 2.0" + }, + "rra": { + "display-name": "Ransomware Readiness Assessment (RRA)" + } + }, "aggregation": { "assessment alias": "Assessment Alias", "total": "Total", diff --git a/CSETWebNg/src/assets/i18n/es.json b/CSETWebNg/src/assets/i18n/es.json index 97bd31eab2..efe57d5993 100644 --- a/CSETWebNg/src/assets/i18n/es.json +++ b/CSETWebNg/src/assets/i18n/es.json @@ -538,14 +538,14 @@ "please confirm": "Confirme, por favor", "remove contact": "¿Estás seguro de que quieres eliminar a {{firstName}} {{lastName}} de esta evaluación?", "remove assessment": "¿Estás seguro de que quieres eliminar {{assessmentName}}?", - "confirm create new assessment": "¿Está seguro de que desea crear una nueva evaluación?", - "export assessment title": "Opciones de evaluación de exportación", - "scrub pcii": "Seleccione para eliminar los campos PCII de la exportación", - "encrypt 1": "Para cifrar su evaluación, ingrese una contraseña.", - "encrypt 2": "Si continúa sin ingresar una contraseña, no se utilizará ningún cifrado.", - "access denied": "Acceso denegado", - "access denied 1": "Su sesión expiró, se produjo un error de conexión o ya no está autorizado a acceder a esa evaluación.", - "access denied 2": "Por favor inicia sesión nuevamente.", + "confirm create new assessment": "¿Está seguro de que desea crear una nueva evaluación?", + "export assessment title": "Opciones de evaluación de exportación", + "scrub pcii": "Seleccione para eliminar los campos PCII de la exportación", + "encrypt 1": "Para cifrar su evaluación, ingrese una contraseña.", + "encrypt 2": "Si continúa sin ingresar una contraseña, no se utilizará ningún cifrado.", + "access denied": "Acceso denegado", + "access denied 1": "Su sesión expiró, se produjo un error de conexión o ya no está autorizado a acceder a esa evaluación.", + "access denied 2": "Por favor inicia sesión nuevamente.", "access denied 3": "Otro usuario ha cambiado su función en esta evaluación." }, "reports": { @@ -1304,6 +1304,17 @@ "cisa is part of dhs": "CISA es parte del Departamento de Seguridad Nacional", "cie website": "CIE Sitio Web" }, + "modules": { + "cpg": { + "display-name": "Cyber Performance Goals (CPG)" + }, + "cmmc2f": { + "display-name": "Cybersecurity Maturity Model Certification (CMMC) 2.0" + }, + "rra": { + "display-name": "Ransomware Readiness Assessment (RRA)" + } + }, "aggregation": { "assessment alias": "Alias de evaluación", "total": "Total", diff --git a/CSETWebNg/src/assets/i18n/uk.json b/CSETWebNg/src/assets/i18n/uk.json index 7ff46ba94b..35f773e090 100644 --- a/CSETWebNg/src/assets/i18n/uk.json +++ b/CSETWebNg/src/assets/i18n/uk.json @@ -487,14 +487,14 @@ "please confirm": "Підтвердження", "remove contact": "Ви впевнені, що хочете видалити {{firstName}} {{lastName}} з цього оцінювання?", "remove assessment": "Ви впевнені, що хочете видалити {{assessmentName}}?", - "confirm create new assessment": "Ви впевнені, що хочете створити нове оцінювання?", - "export assessment title": "Параметри експортної оцінки", - "scrub pcii": "Виберіть, щоб видалити поля PCII з експорту", - "encrypt 1": "Щоб зашифрувати свою оцінку, введіть пароль.", - "encrypt 2": "Якщо ви продовжите без введення пароля, шифрування не використовуватиметься.", - "access denied": "Доступ заборонено", - "access denied 1": "Ваш сеанс закінчився, сталася помилка підключення або ви більше не маєте доступу до цього оцінювання.", - "access denied 2": "Будь ласка, увійдіть знову.", + "confirm create new assessment": "Ви впевнені, що хочете створити нове оцінювання?", + "export assessment title": "Параметри експортної оцінки", + "scrub pcii": "Виберіть, щоб видалити поля PCII з експорту", + "encrypt 1": "Щоб зашифрувати свою оцінку, введіть пароль.", + "encrypt 2": "Якщо ви продовжите без введення пароля, шифрування не використовуватиметься.", + "access denied": "Доступ заборонено", + "access denied 1": "Ваш сеанс закінчився, сталася помилка підключення або ви більше не маєте доступу до цього оцінювання.", + "access denied 2": "Будь ласка, увійдіть знову.", "access denied 3": "Вашу роль у цьому оцінюванні змінив інший користувач." }, "reports": { @@ -1209,6 +1209,17 @@ "cisa is part of dhs": "CISA є частиною Департамент державної безпеки Сполучених Штатів", "cie website": "CIE Веб-сайт" }, + "modules": { + "cpg": { + "display-name": "Cyber Performance Goals (CPG)" + }, + "cmmc2f": { + "display-name": "Cybersecurity Maturity Model Certification (CMMC) 2.0" + }, + "rra": { + "display-name": "Ransomware Readiness Assessment (RRA)" + } + }, "aggregation": { "assessment alias": "Аліас оцінки", "total": "Загальна кількість", diff --git a/CSETWebNg/src/assets/settings/config.json b/CSETWebNg/src/assets/settings/config.json index 221fbf6a2d..f452882af8 100644 --- a/CSETWebNg/src/assets/settings/config.json +++ b/CSETWebNg/src/assets/settings/config.json @@ -118,6 +118,7 @@ "moduleBehaviors": [ { "moduleName": "EDM", + "modelId": "3", "questionIcons": { "showDetails": false, "guidanceIcon": "G", @@ -126,6 +127,7 @@ }, { "moduleName": "CRR", + "modelId": "4", "questionIcons": { "showDetails": false, "guidanceIcon": "G", @@ -134,6 +136,7 @@ }, { "moduleName": "IMR", + "modelId": "15", "showMaturityLevelBadge": false, "showCriticalServiceDemog": false, "questionIcons": { @@ -145,6 +148,8 @@ { "moduleName": "RRA", "modelId": "5", + "displayNameKey": "modules.rra.display-name", + "showDomainHeaders": false, "questionIcons": { "showDetails": false, "guidanceIcon": "G", @@ -169,6 +174,7 @@ }, { "moduleName": "CIS", + "modelId": "8", "questionIcons": { "showDetails": false, "showObservations": false, @@ -178,6 +184,7 @@ }, { "moduleName": "SD02 Series", + "modelId": "14", "questionIcons": { "showDetails": false } @@ -185,6 +192,8 @@ { "moduleName": "CPG", "modelId": "11", + "displayNameKey": "modules.cpg.display-name", + "showDomainHeaders": false, "autoLoadSupplemental": true, "showMaturityLevelBadge": false, "questionIcons": { @@ -254,6 +263,7 @@ }, { "moduleName": "C2M2", + "modelId": "12", "questionIcons": { "showReviewed": false }, @@ -282,7 +292,9 @@ }, { "moduleName": "ACET", + "modelId": "1", "independentSuppGuidance": true, + "showDomainHeaders": true, "answerOptions": [ { "skin": "ACET", @@ -295,6 +307,8 @@ }, { "moduleName": "ISE", + "modelId": 10, + "showDomainHeaders": false, "questionIcons": { "showObservations": false }, @@ -317,6 +331,7 @@ }, { "moduleName": "HYDRO", + "modelId": "13", "questionIcons": { "showDetails": false, "showGuidance": false, @@ -326,6 +341,7 @@ }, { "moduleName": "CIE", + "modelId": "17", "questionIcons": { "showDetails": false, "showGuidance": false, @@ -351,6 +367,7 @@ }, { "moduleName": "MVRA", + "modelId": "9", "answerOptions": [ { "code": "Y", diff --git a/CSETWebNg/src/sass/styles.scss b/CSETWebNg/src/sass/styles.scss index 15cffdc3d1..fca941b4e6 100644 --- a/CSETWebNg/src/sass/styles.scss +++ b/CSETWebNg/src/sass/styles.scss @@ -1838,7 +1838,7 @@ ul.related-questions li { .domain-group-heading { margin-bottom: 1rem; - font-size: 30px; + font-size: 1.8rem; } // Dashboard