diff --git a/CSETWebNg/src/app/reports/crr/crr-comments-marked/crr-comments-marked.component.ts b/CSETWebNg/src/app/reports/crr/crr-comments-marked/crr-comments-marked.component.ts
index b71be472a2..b0439ac852 100644
--- a/CSETWebNg/src/app/reports/crr/crr-comments-marked/crr-comments-marked.component.ts
+++ b/CSETWebNg/src/app/reports/crr/crr-comments-marked/crr-comments-marked.component.ts
@@ -162,7 +162,7 @@ export class CrrCommentsMarkedComponent implements OnInit {
}
getFullAnswerText(abb: string) {
- return this.questionsSvc.answerDisplayLabel(4, abb);
+ return this.questionsSvc.answerDisplayLabel('CRR', abb);
}
printReport() {
diff --git a/CSETWebNg/src/app/reports/crr/crr-deficiency/crr-deficiency.component.ts b/CSETWebNg/src/app/reports/crr/crr-deficiency/crr-deficiency.component.ts
index e099004c11..4e5dfd9d44 100644
--- a/CSETWebNg/src/app/reports/crr/crr-deficiency/crr-deficiency.component.ts
+++ b/CSETWebNg/src/app/reports/crr/crr-deficiency/crr-deficiency.component.ts
@@ -112,7 +112,7 @@ export class CrrDeficiencyComponent implements OnInit {
}
getFullAnswerText(abb: string) {
- return this.questionsSvc.answerDisplayLabel(4, abb);
+ return this.questionsSvc.answerDisplayLabel('CRR', abb);
}
printReport() {
diff --git a/CSETWebNg/src/app/reports/imr/imr-report/imr-report.component.html b/CSETWebNg/src/app/reports/imr/imr-report/imr-report.component.html
new file mode 100644
index 0000000000..6cce8409d4
--- /dev/null
+++ b/CSETWebNg/src/app/reports/imr/imr-report/imr-report.component.html
@@ -0,0 +1,139 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/CSETWebNg/src/app/reports/imr/imr-report/imr-report.component.scss b/CSETWebNg/src/app/reports/imr/imr-report/imr-report.component.scss
new file mode 100644
index 0000000000..1a904c4568
--- /dev/null
+++ b/CSETWebNg/src/app/reports/imr/imr-report/imr-report.component.scss
@@ -0,0 +1,754 @@
+/*
+
+ Copyright 2023 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.
+
+*/
+a.navbar-brand {
+ white-space: normal;
+ text-align: center;
+ word-break: break-all;
+ }
+
+ /* Reports styles
+ -------------------------------------------------- */
+ * {
+ scroll-margin-top: 60px;
+ }
+
+ .report-body-imr {
+ font-family: Arial !important;
+ font-size: 12pt !important;
+ margin-left: 15vw !important;
+ }
+
+ .report-title {
+ margin-left: 25px;
+ text-align: center;
+ font-family: Verdana;
+ font-size: 40px;
+ letter-spacing: 12px;
+ color: #0f3c7a;
+ }
+
+ h1 {
+ font-size: 48pt;
+ color: #005288;
+ }
+
+ h2 {
+ font-size: 34pt;
+ color: #005288;
+ }
+
+ h3 {
+ font-size: 24pt;
+ }
+
+ h4 {
+ font-size: 16pt;
+ color: #005288;
+ }
+
+ p {
+ font-family: Arial;
+ font-size: 14pt;
+ }
+
+ .small {
+ font-size: 0.875rem;
+ }
+
+ .page-break {
+ page-break-before: always;
+ clear: both;
+ }
+
+ .col-1 {
+ flex: 0 0 auto;
+ max-width: unset;
+ }
+
+ // Override max width of containers to match bootstrap v5
+ @media (min-width: 1400px) {
+ .container {
+ max-width: 1320px;
+ }
+ }
+
+ @media only screen {
+ .page-break {
+ margin: 40px 0;
+ border-top: 2px solid #769bb5;
+ }
+ }
+
+ /*
+ Cover Sheet
+ */
+ .coversheet-text * {
+ padding: 0 5rem;
+ font-family: 'Franklin Gothic', Arial;
+ font-weight: bolder;
+ }
+
+ /*
+ CISA Self Assessment Page
+ */
+ .cisa * {
+ color: black;
+ justify-content: center;
+ text-align: center;
+ }
+
+ /*
+ CRR About/Intro
+ */
+ .about-intro p {
+ margin-bottom: 16px;
+ font-size: 12pt;
+ font-family: Arial;
+ }
+
+ .about-intro li {
+ font-size: 12pt;
+ font-family: Arial;
+ }
+
+ /*
+ Depictions
+ */
+ .depiction-title {
+ font-family: Arial;
+ font-weight: bold;
+ font-size: 18pt;
+ margin: 0;
+ }
+
+ /*
+ Miscellaneous
+ */
+ .crr-logo {
+ width: 20%;
+ height: auto;
+ }
+
+
+ /* Legends */
+ .legend-svg text {
+ font-size: .5rem;
+ }
+
+
+ /*
+ Domain Detail
+ */
+ table {
+ margin: 0;
+ padding: 0;
+ }
+
+ .domain-detail p {
+ font-size: 12pt;
+ font-family: Arial;
+ }
+
+ .report-notification {
+ background-color: #D3D3D3;
+ padding: 1rem;
+ border: solid 2px black;
+ width: 70%;
+ margin: 10% auto;
+ break-inside: avoid-page;
+ }
+
+ .report-notification h1 {
+ text-align: center;
+ font-size: 1.4rem;
+ font-weight: bold;
+ margin-bottom: 2rem;
+ }
+
+ .col-mod {
+ padding-left: 2px;
+ padding-right: 0;
+ font-size: small;
+ text-align: center;
+ }
+
+ .col-mod-group {
+ padding-left: 0;
+ padding-right: 0;
+ }
+
+ .col-mod-header {
+ margin-bottom: 3px;
+ padding: 8px 10px;
+ border-radius: 3px;
+ }
+
+ .col-mod-score {
+ padding: 4px 4px !important;
+ border-radius: 3px;
+ color: #fff;
+ }
+
+ .red-score {
+ background-color: #DC3545;
+ border: 1px solid #DC3545;
+ color: #fff;
+ }
+
+ .yellow-score {
+ background-color: #FFC107;
+ border: 1px solid #FFC107;
+ color: #000;
+ }
+
+ .green-score {
+ background-color: #28A745;
+ border: 1px solid #28A745;
+ color: #fff;
+ }
+
+ .light-gray-score {
+ background-color: #d3d3d3;
+ border: 1px solid #d3d3d3;
+ color: #000;
+ }
+
+ .default-score {
+ background-color: #6C757D;
+ border: 1px solid #6C757D;
+ color: #fff;
+ }
+
+ /* Provide sufficient contrast against white background */
+ a {
+ color: #0366d6;
+ }
+
+ .btn-primary {
+ color: #fff;
+ background-color: #1b6ec2;
+ border-color: #1861ac;
+ }
+
+ .nav-pills .nav-link.active, .nav-pills .show > .nav-link {
+ color: #fff;
+ background-color: #1b6ec2;
+ border-color: #1861ac;
+ }
+
+ .report-section-title {
+ color: #1274d2;
+ font-size: 22px;
+ }
+
+ .marked-flag {
+ width: 15px;
+ height: auto;
+ }
+
+ .page-line {
+ width: 100%;
+ background-color: #000;
+ }
+
+ .report-domain-header {
+ color: #1274d2;
+ font-size: 18px;
+ text-align: left;
+ margin-left: 1rem;
+ }
+
+ .max-w-75in {
+ max-width: 7.5in;
+ }
+
+
+ /* Sticky footer styles
+ -------------------------------------------------- */
+ html {
+ font-size: 14px;
+ }
+
+ @media (min-width: 768px) {
+ html {
+ font-size: 16px;
+ }
+ }
+
+ .border-top {
+ border-top: 1px solid #e5e5e5;
+ }
+
+ .border-bottom {
+ border-bottom: 1px solid #e5e5e5;
+ }
+
+ .box-shadow {
+ box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05);
+ }
+
+ button.accept-policy {
+ font-size: 1rem;
+ line-height: inherit;
+ }
+
+ /* Sticky footer styles
+ -------------------------------------------------- */
+ html {
+ position: relative;
+ min-height: 100%;
+ }
+
+ body {
+ /* Margin bottom by footer height */
+ margin-bottom: 60px;
+ }
+
+ .footer {
+ position: absolute;
+ bottom: 0;
+ width: 100%;
+ white-space: nowrap;
+ line-height: 60px;
+ /* Vertically center the text there */
+ }
+
+ /* --- spinner styles -- */
+ .spinner-container {
+ padding: 8px;
+ }
+
+ .spinner-container>.spinner,
+ .spinner-container>div {
+ border: 4px solid #f2f2f2;
+ border-radius: 50%;
+ border-top: 4px solid #052637;
+ width: 100px;
+ height: 100px;
+ -webkit-animation: spin-wait 1.3s linear infinite;
+ /* Safari */
+ animation: spin-wait 1.3s linear infinite;
+ margin-left: auto;
+ margin-right: auto;
+ }
+
+ .spinner-container.toc>.spinner,
+ .spinner-container.toc>div {
+ border-top: 4px solid #6390a9;
+ }
+
+ div.spinner-size-50 {
+ max-width: 50px;
+ max-height: 50px;
+ }
+
+ /* Safari */
+ @-webkit-keyframes spin-wait {
+ 0% {
+ -webkit-transform: rotate(0deg);
+ }
+
+ 100% {
+ -webkit-transform: rotate(360deg);
+ }
+ }
+
+ @keyframes spin-wait {
+ 0% {
+ transform: rotate(0deg);
+ }
+
+ 100% {
+ transform: rotate(360deg);
+ }
+ }
+
+ /* spinner fade animation */
+ .spinner-fade-in {
+ opacity: 0 !important;
+ transition: 0.2s ease-in-out all;
+ }
+
+ .spinner-show {
+ opacity: 1 !important;
+ }
+
+ .spinner-hide {
+ display: none;
+ }
+
+
+ /* ---- Table styles ---- */
+
+ table.cset-table, table.cset-table-4 {
+ width: calc(100% - 2em);
+ margin: 0 auto 2em auto;
+ border-collapse: collapse;
+ }
+
+ table.cset-table th, table.cset-table-4 th {
+ background-color: #336699;
+ color: #fff;
+ font-weight: bold;
+ break-inside: avoid;
+ }
+
+ table.cset-table th, table.cset-table td, table.cset-table-4 th, table.cset-table-4 td {
+ padding: 10px;
+ border: 1px solid #999;
+ vertical-align: top;
+ break-inside: avoid;
+ }
+
+ table.cset-table-2 {
+ width: calc(100% - 2em);
+ margin: 0 auto 2em auto;
+ border-collapse: collapse;
+ }
+
+ table.cset-table-2 th, table.cset-table-2 td {
+ border: 1px solid #000;
+ border: 1px solid #999;
+ padding: 5px;
+ break-inside: avoid;
+ }
+
+ table.cset-table-2 tr.pale-green {
+ background-color: #EAF1DD;
+ background-color: #ecf6f9;
+ }
+
+ table.cset-table-3 {
+ width: calc(100% - 2em);
+ margin: 0 auto 1em auto;
+ border-collapse: collapse;
+ }
+
+ table.cset-table-3 th, table.cset-table-3 td {
+ border: 1px solid #999;
+ padding: 5px;
+ break-inside: avoid;
+ }
+
+ table.cset-table-3 th {
+ text-align: left;
+ font-weight: normal;
+ background-color: #d9e6ed;
+ }
+
+ table.cset-table.alt-shade tr:nth-child(even) {
+ background: #f2f2f2;
+ }
+
+ table.cset-table.alt-shade tr:nth-child(odd) {
+ background: #fafafa;
+ }
+
+ table.no-borders tr, table.no-borders td {
+ border: none;
+ }
+
+ .font-weight-bold {
+ font-weight: 700 !important;
+ }
+
+ div.widget {
+ margin-top: 2rem;
+ margin-bottom: 2rem;
+ text-align: center;
+ }
+
+ div.widget svg {
+ vertical-align: top !important;
+ }
+
+ .page-margin-top {
+ page-break-before: always;
+ min-width: 860px;
+ margin-top: 40px;
+ border-top: 2px solid #769bb5;
+ padding-top: 40px;
+ }
+
+ /* VARIABLES */
+ :host {
+ --page-width: 792px;
+ --table-margin: 0px;
+ --table-width: calc(var(--page-width) - calc(var(--table-margin)*2));
+ --table-name-width: 160px;
+ --table-row-height: 50px;
+ --axis-label-row-height: 80px;
+ --mil-1-ratio: .5;
+ --mil-1-width: calc( calc( var(--table-width) - var(--table-name-width) ) * var(--mil-1-ratio) );
+ --mil-upper-width: calc( calc( var(--table-width) - var(--table-name-width) ) * calc(1 - var(--mil-1-ratio)) );
+ --mil-upper-width-individual: calc(var(--mil-upper-width) / 4);
+ --bar-height: 16px;
+ }
+ /* END VARIABLES */
+
+
+
+ .crrResultsTable {
+ width: var(--table-width);
+
+ font-size: 0;
+ }
+ .parent {
+ width: var(--page-width);
+ }
+
+ .parent * {
+ font-family: Arial;
+ }
+
+ .crrResultsTableRow {
+ width: calc(var(--table-width));
+ height: var(--table-row-height);
+ box-sizing: border-box;
+ border-top: solid 1px black;
+ border-right: solid 1px black;
+ font-size: 0; /*Done to prevent funky margins*/
+ }
+
+ .crrResultsDomainCell {
+ height: var(--table-row-height);
+ font-size: 12px;
+ vertical-align: top;
+ font-weight: 600;
+ border-right: solid 1px black;
+ display: inline-block;
+ }
+
+ .crrResultsTableDomainName {
+ width: var(--table-name-width);
+ }
+
+ .crrResultsProgressBar {
+ height: var(--bar-height);
+ background: rgb(199,121,44);
+ display: inline-block;
+ position: relative;
+ margin-left: var(--table-name-width);
+ top: calc( -1 * calc( calc( var(--table-row-height) /2 ) + calc(var(--bar-height) / 2) ) );
+ box-sizing: border-box;
+ border-left: solid 1px black;
+ }
+
+
+ .mil-1-grid {
+ padding-right: 2px;
+ display: inline-block;
+ height: var(--table-row-height);
+ width: calc(var(--mil-1-width) / 4);
+ box-sizing: border-box;
+ }
+ .mil-1-override {
+ box-sizing: border-box;
+ border-right: solid 1px gray !important;
+ }
+
+ .mil-upper-grid {
+ display: inline-block;
+ height: var(--table-row-height);
+ width: calc(var(--mil-upper-width) / 4);
+ box-sizing: border-box;
+ }
+
+ .rb-l {
+ box-sizing: border-box;
+ border-right: solid 1px lightgray;
+ }
+
+ .rb-d {
+ box-sizing: border-box;
+ border-right: solid 1px gray;
+ }
+
+ .mil-number-labels {
+ font-size: 12px;
+ padding-right: 5px;
+ }
+
+ /* CAN THE CLASS NAMES GET ANY LONGER?!?! */
+ .crrResultsTableAxisLabelRow {
+ height: var(--axis-label-row-height);
+ font-size: 14px;
+ vertical-align: top;
+ font-weight: 600;
+ box-sizing: border-box;
+ border-right: solid 1px black;
+ display: inline-block;
+ }
+
+ .crrResultsTableLabelRow {
+ width: calc(var(--table-width));
+ height: 80px;
+ box-sizing: border-box;
+ border-top: white solid 0px;
+ border-right: solid 1px black;
+ }
+
+ .crrResultsLabelCell {
+ width: var(--table-name-width);
+ height: var(--table-row-height);
+ font-size: 14px;
+ vertical-align: top;
+ font-weight: 200;
+ box-sizing: border-box;
+ border-right: solid 1px black;
+ display: inline-block;
+ text-align: right;
+ }
+
+ .crrTableLabel {
+ text-align: right;
+ vertical-align: top;
+ }
+
+ .upper-mil-label-desc, .upper-mil-label-bold {
+ font-size: 8px;
+ text-align: right;
+ padding-left: 10px;
+ padding-right: 5px;
+ }
+
+ .upper-mil-label-bold {
+ font-size: 8px;
+ font-weight: 800;
+ white-space: nowrap;
+ padding-left: 5px;
+ }
+
+ .ccrLastLabel {
+ width: var(--mil-upper-width-individual);
+ margin-left: -9px;
+ font-size: 18px;
+ /* Minus 9, one for each of the borders included in the row*/
+ }
+
+ .crrLastResultsTableRow {
+ margin-left: 1px;
+ }
+
+ @media screen {
+ table.page-layout {
+ margin-left: auto;
+ margin-right: auto;
+ }
+
+ #main-toc {
+ display: none;
+ }
+ }
+
+ /**************** Print styles ****************/
+ @page {
+ size: letter;
+ margin: 0;
+ }
+
+ @media print {
+
+ html, body {
+ margin: 0 !important;
+ }
+
+ .report-body-crr {
+ margin-left: 1.5cm !important;
+ margin-right: -2cm !important;
+ }
+
+ #coversheet1 {
+ margin-left: -2cm;
+ margin-right: -2cm;
+ }
+
+ .container-fluid, .report-body-crr {
+ -webkit-print-color-adjust: exact !important;
+ print-color-adjust: exact !important;
+ }
+
+ .page-margin-top {
+ border-top: none !important;
+ padding-top: 1.5cm !important;
+ }
+
+ .report-notification {
+ margin-top: 8cm !important;
+ }
+
+ #mil4-page-break {
+ page-break-after: always;
+ }
+
+ .page-break {
+ padding-top: 1.5cm !important;
+ }
+
+ .container {
+ margin: 0 !important;
+ }
+
+ .mat-section {
+ break-inside: avoid !important;
+ }
+
+ table.page-layout {
+ page-break-inside: auto;
+ }
+
+ .print-footer-right, .print-header-left, .print-header-right,
+ .print-footer-left, .footer-space, .header-space {
+ height: 2cm;
+ width: 5cm;
+ background-color: white;
+ z-index: 10;
+ padding: 1rem;
+ }
+
+ .print-footer-right {
+ position: fixed;
+ bottom: 0;
+ right: 2cm;
+ }
+
+ .print-footer-left {
+ position: fixed;
+ bottom: 0;
+ left: 2cm;
+ }
+
+ .print-header-right {
+ position: fixed;
+ top: 0;
+ right: 2cm;
+ }
+
+ .print-header-left {
+ position: fixed;
+ top: 0;
+ left: 2cm;
+ }
+ }
+
\ No newline at end of file
diff --git a/CSETWebNg/src/app/reports/imr/imr-report/imr-report.component.ts b/CSETWebNg/src/app/reports/imr/imr-report/imr-report.component.ts
new file mode 100644
index 0000000000..6e07c06852
--- /dev/null
+++ b/CSETWebNg/src/app/reports/imr/imr-report/imr-report.component.ts
@@ -0,0 +1,78 @@
+////////////////////////////////
+//
+// Copyright 2023 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.
+//
+////////////////////////////////
+import { Component, OnInit } from '@angular/core';
+import { CrrService } from './../../../services/crr.service';
+import { CrrReportModel } from '../../../models/reports.model';
+import { Title } from '@angular/platform-browser';
+import { ConfigService } from '../../../services/config.service';
+
+@Component({
+ selector: 'app-imr-report',
+ templateUrl: './imr-report.component.html',
+ styleUrls: ['./imr-report.component.scss']
+})
+export class ImrReportComponent implements OnInit {
+
+ crrModel: CrrReportModel;
+ securityLevel: string = '';
+
+ constructor(
+ private crrSvc: CrrService,
+ private titleSvc: Title,
+ public configSvc: ConfigService) { }
+
+ ngOnInit(): void {
+
+ const securityLevel = localStorage.getItem('crrReportConfidentiality');
+ if (securityLevel) {
+ securityLevel !== 'None' ? this.securityLevel = securityLevel : this.securityLevel = '';
+ localStorage.removeItem('crrReportConfidentiality');
+ }
+
+ this.titleSvc.setTitle('IMR Report - ' + this.configSvc.behaviors.defaultTitle);
+ this.crrSvc.getCrrModel().subscribe((data: CrrReportModel) => {
+
+ data.structure.Model.Domain.forEach(d => {
+ d.Goal.forEach(g => {
+ // The Question object needs to be an array for the template to work.
+ // A singular question will be an object. Create an array and push the question into it
+ if (!Array.isArray(g.Question)) {
+ var onlyChild = Object.assign({}, g.Question);
+ g.Question = [];
+ g.Question.push(onlyChild);
+ }
+ });
+ });
+
+ this.crrModel = data
+ console.log(this.crrModel);
+ },
+ error => console.log('Error loading IMR report: ' + (
error).message)
+ );
+ }
+
+ printReport() {
+ window.print();
+ }
+}
diff --git a/CSETWebNg/src/app/reports/ise-answeredquestions/ise-answeredquestions.component.html b/CSETWebNg/src/app/reports/ise-answeredquestions/ise-answeredquestions.component.html
index 214a2c052a..bdab3cf767 100644
--- a/CSETWebNg/src/app/reports/ise-answeredquestions/ise-answeredquestions.component.html
+++ b/CSETWebNg/src/app/reports/ise-answeredquestions/ise-answeredquestions.component.html
@@ -103,7 +103,7 @@ Answered Statements
{{q.title}} |
|
- {{ questionsSvc.answerButtonLabel(10, q.answerText) }} |
+ {{ questionsSvc.answerButtonLabel('ISE', q.answerText) }} |
|
{{acetSvc.getAbbrev(q.maturityLevel)}} |
diff --git a/CSETWebNg/src/app/reports/ise-examination/ise-examination.component.html b/CSETWebNg/src/app/reports/ise-examination/ise-examination.component.html
index c3f82ac8ec..032a51bf4b 100644
--- a/CSETWebNg/src/app/reports/ise-examination/ise-examination.component.html
+++ b/CSETWebNg/src/app/reports/ise-examination/ise-examination.component.html
@@ -197,7 +197,7 @@
|
|
- {{ questionsSvc.answerButtonLabel(10, q.answerText) }} |
+ {{ questionsSvc.answerButtonLabel('ISE', q.answerText) }} |
{{acetSvc.getAbbrev(q.maturityLevel)}}
diff --git a/CSETWebNg/src/app/reports/ise-examination/ise-examination.component.ts b/CSETWebNg/src/app/reports/ise-examination/ise-examination.component.ts
index aca0efd00e..8fb6e22bc8 100644
--- a/CSETWebNg/src/app/reports/ise-examination/ise-examination.component.ts
+++ b/CSETWebNg/src/app/reports/ise-examination/ise-examination.component.ts
@@ -287,7 +287,7 @@ export class IseExaminationComponent implements OnInit {
* checks if the question needs to appear
*/
requiredQuestion(q: any) {
- if (this.questionsSvc.answerButtonLabel(10, q.answerText) == 'Unanswered' && q.maturityLevel == 'CORE+') {
+ if (this.questionsSvc.answerButtonLabel('ISE', q.answerText) == 'Unanswered' && q.maturityLevel == 'CORE+') {
return false;
}
return true;
diff --git a/CSETWebNg/src/app/reports/ise-examiner/ise-examiner.component.html b/CSETWebNg/src/app/reports/ise-examiner/ise-examiner.component.html
index 5439579220..16491fb7be 100644
--- a/CSETWebNg/src/app/reports/ise-examiner/ise-examiner.component.html
+++ b/CSETWebNg/src/app/reports/ise-examiner/ise-examiner.component.html
@@ -127,7 +127,7 @@
Response:
- {{ !this.ncuaSvc.isParentQuestion(q.title) ? questionsSvc.answerButtonLabel(10, q.answerText) : ' ' }}
+ {{ !this.ncuaSvc.isParentQuestion(q.title) ? questionsSvc.answerButtonLabel('ISE', q.answerText) : ' ' }}
Notes:
diff --git a/CSETWebNg/src/app/reports/question-comments/question-comments.component.html b/CSETWebNg/src/app/reports/question-comments/question-comments.component.html
index 3a0f8c9a29..885b2139dd 100644
--- a/CSETWebNg/src/app/reports/question-comments/question-comments.component.html
+++ b/CSETWebNg/src/app/reports/question-comments/question-comments.component.html
@@ -35,7 +35,7 @@
Question: |
|
- {{questionsSvc.answerDisplayLabel(0, c.answer)}} |
+ {{questionsSvc.answerDisplayLabel('', c.answer)}} |
Comment: |
diff --git a/CSETWebNg/src/app/reports/questions-marked-for-review/questions-marked-for-review.component.html b/CSETWebNg/src/app/reports/questions-marked-for-review/questions-marked-for-review.component.html
index 2a4840a7e1..3f59e5a39e 100644
--- a/CSETWebNg/src/app/reports/questions-marked-for-review/questions-marked-for-review.component.html
+++ b/CSETWebNg/src/app/reports/questions-marked-for-review/questions-marked-for-review.component.html
@@ -28,7 +28,7 @@
{{mfr.categoryAndNumber}} |
|
- {{questionsSvc.answerDisplayLabel(0, mfr.answer)}} |
+ {{questionsSvc.answerDisplayLabel('', mfr.answer)}} |
diff --git a/CSETWebNg/src/app/reports/site-detail/site-detail.component.html b/CSETWebNg/src/app/reports/site-detail/site-detail.component.html
index 38fd2f6cc9..9c9edc09e5 100644
--- a/CSETWebNg/src/app/reports/site-detail/site-detail.component.html
+++ b/CSETWebNg/src/app/reports/site-detail/site-detail.component.html
@@ -367,7 +367,7 @@
|
- {{questionsSvc.answerDisplayLabel(0, rq.answer)}} |
+ {{questionsSvc.answerDisplayLabel('', rq.answer)}} |
@@ -407,7 +407,7 @@
{{q.categoryAndNumber}} |
|
- {{questionsSvc.answerDisplayLabel(0, q.answer)}} |
+ {{questionsSvc.answerDisplayLabel('', q.answer)}} |
@@ -426,7 +426,7 @@
Question: |
|
- {{questionsSvc.answerDisplayLabel(0, q.answer)}} |
+ {{questionsSvc.answerDisplayLabel('', q.answer)}} |
Zone: |
diff --git a/CSETWebNg/src/app/services/chart.service.ts b/CSETWebNg/src/app/services/chart.service.ts
index 95ef28f9ba..b63693a4bb 100644
--- a/CSETWebNg/src/app/services/chart.service.ts
+++ b/CSETWebNg/src/app/services/chart.service.ts
@@ -200,7 +200,7 @@ export class ChartService {
let segmentLabels = [];
x.labels.forEach(element => {
segmentColors.push(this.segmentColor(element));
- segmentLabels.push(this.questionsSvc.answerDisplayLabel(0, element));
+ segmentLabels.push(this.questionsSvc.answerDisplayLabel('', element));
});
diff --git a/CSETWebNg/src/app/services/filtering/question-filter.service.ts b/CSETWebNg/src/app/services/filtering/question-filter.service.ts
index 580788114a..6e78ac7713 100644
--- a/CSETWebNg/src/app/services/filtering/question-filter.service.ts
+++ b/CSETWebNg/src/app/services/filtering/question-filter.service.ts
@@ -72,6 +72,11 @@ export class QuestionFilterService {
*/
public maturityModelId: number;
+ /**
+ * Consuming pages can set a model name
+ */
+ public maturityModelName: string;
+
/**
* Constructor
diff --git a/CSETWebNg/src/app/services/questions.service.ts b/CSETWebNg/src/app/services/questions.service.ts
index 5f27fba1f8..a9ae6612a2 100644
--- a/CSETWebNg/src/app/services/questions.service.ts
+++ b/CSETWebNg/src/app/services/questions.service.ts
@@ -249,7 +249,6 @@ export class QuestionsService {
*
*/
getSubGroupingQuestionCount(subGroups: string[], modelId: number) {
- console.log(subGroups)
return this.http.get(this.configSvc.apiUrl + 'SubGroupingQuestionCount?subGroups=' +
subGroups + '&modelId=' + modelId, headers);
}
@@ -387,23 +386,23 @@ export class QuestionsService {
/**
* Finds the button definition and return its CSS
*/
- answerOptionCss(modelId: Number, answerCode: string) {
- return this.findAnsDefinition(modelId, answerCode).buttonCss;
+ answerOptionCss(modelName: string, answerCode: string) {
+ return this.findAnsDefinition(modelName, answerCode).buttonCss;
}
/**
* Finds the button definition and returns its label
*/
- answerButtonLabel(modelId: Number, answerCode: string): string {
- return this.findAnsDefinition(modelId, answerCode).buttonLabel;
+ answerButtonLabel(modelName: string, answerCode: string): string {
+ return this.findAnsDefinition(modelName, answerCode).buttonLabel;
}
/**
* Finds the button definition and returns its tooltip, if defined.
* If a tooltip is not defined, the button label is returned.
*/
- answerButtonTooltip(modelId: Number, answerCode: string): string {
- var t = this.findAnsDefinition(modelId, answerCode);
+ answerButtonTooltip(modelName: string, answerCode: string): string {
+ var t = this.findAnsDefinition(modelName, answerCode);
if (!!t.buttonTooltip) {
return t.buttonTooltip;
}
@@ -413,10 +412,10 @@ export class QuestionsService {
/**
* Finds the button definition and returns its full label (tooltip)
*/
- answerDisplayLabel(modelId: Number, answerCode: string) {
- const def = this.findAnsDefinition(modelId, answerCode);
+ answerDisplayLabel(modelName: string, answerCode: string) {
+ const def = this.findAnsDefinition(modelName, answerCode);
if (!def) {
- console.log('cannot find definition for model: ' + modelId + ', answerCode: ' + answerCode);
+ console.log('cannot find definition for model: ' + modelName + ', answerCode: ' + answerCode);
return "?";
}
return def.answerLabel;
@@ -426,7 +425,7 @@ export class QuestionsService {
* Finds the answer in the default object or the model-specific object.
* Standards questions screen pass '0' for the modelId.
*/
- findAnsDefinition(modelId: Number, answerCode: string) {
+ findAnsDefinition(modelName: string, answerCode: string) {
// assume unanswered if null or undefined
if (!answerCode) {
answerCode = 'U';
@@ -434,19 +433,22 @@ export class QuestionsService {
// first look for a skin-specific label set
let ans = this.answerButtonDefs.find(x => x.skin == this.configSvc.installationMode
- && x.modelId == modelId)?.answers.find(y => y.code == answerCode);
+ && x.moduleName == modelName)?.answers.find(y => y.code == answerCode);
if (ans) {
return ans;
}
// next, look for a model-specific label set with no skin defined
- ans = this.answerButtonDefs.find(x => !x.skin && x.modelId == modelId)?.answers.find(y => y.code == answerCode);
- if (ans) {
- return ans;
+ let model = this.configSvc.config.moduleBehaviors.find(x => x.moduleName == modelName);
+ if (!!model) {
+ ans = model.answerOptions?.find(o => o.code == answerCode);
+ if (ans) {
+ return ans;
+ }
}
- // fallback to default definition set
- ans = this.answerButtonDefs[0].answers.find(x => x.code == answerCode);
+ // fallback to default options
+ ans = this.configSvc.config.answerOptionsDefault.find(x => x.code == answerCode);
if (ans) {
return ans;
}
diff --git a/CSETWebNg/src/assets/settings/config.json b/CSETWebNg/src/assets/settings/config.json
index f7b4f98445..f52f030711 100644
--- a/CSETWebNg/src/assets/settings/config.json
+++ b/CSETWebNg/src/assets/settings/config.json
@@ -1,6 +1,8 @@
{
- "NOTENODE":"Casing on config chain matters",
- "currentConfigChain": ["TSA", "TSAonline"],
+ "NOTENODE": "Casing on config chain matters",
+ "currentConfigChain": [
+ "CSET"
+ ],
"appCode": "CSET",
"isRunningAnonymous": false,
"app": {
@@ -29,7 +31,7 @@
"installationMode": "TSA",
"mobileEnvironment": "",
"behaviors": {
- "defaultTitle":"CSET",
+ "defaultTitle": "CSET",
"showDisclaimer": true,
"showModuleBuilder": true,
"showModuleImport": true,
@@ -37,7 +39,7 @@
"showAssessmentDocuments": true,
"showObservations": true,
"showFacilitatorDropDown": true,
- "showNameDisclaimer":false,
+ "showNameDisclaimer": false,
"showAggregation": true,
"showAnalytics": true,
"showAnalyticsAtTheEnd": true,
@@ -66,7 +68,7 @@
"showVulnerabilitiesDiagramInventoryTab": false,
"additionalUserGuides": []
},
- "answersDefault": [
+ "answerOptionsDefault": [
{
"code": "U",
"answerLabel": "Unanswered"
@@ -108,111 +110,196 @@
"answerLabel": "No with Issue(s)"
}
],
- "answersMVRA": [
+ "moduleBehaviors": [
{
- "code": "Y",
- "buttonLabel": "Fully",
- "buttonCss": "btn-yes",
- "answerLabel": "Fully Implemented"
+ "moduleName": "EDM",
+ "questionIcons": {
+ "showDetails": false,
+ "guidanceIcon": "G",
+ "showReviewed": false
+ }
},
{
- "code": "N",
- "buttonLabel": "Not",
- "buttonCss": "btn-no",
- "answerLabel": "Not Implemented"
+ "moduleName": "CRR",
+ "questionIcons": {
+ "showDetails": false,
+ "guidanceIcon": "G",
+ "showReviewed": false
+ }
},
{
- "code": "A",
- "buttonLabel": "Partial",
- "buttonCss": "btn-alt",
- "answerLabel": "Partially Implemented"
- }
- ],
- "answersACET": [
- {
- "code": "A",
- "buttonLabel": "Yes(C)",
- "buttonCss": "btn-alt",
- "answerLabel": "Yes Compensating Control",
- "note": "This will only apply in the ACET skin. See QuestionsService"
- }
- ],
- "answersISE": [
- {
- "code": "Y",
- "buttonLabel": "Yes",
- "buttonCss": "btn-yes",
- "answerLabel": ""
+ "moduleName": "IMR",
+ "showMaturityLevelBadge": false,
+ "questionIcons": {
+ "showDetails": false,
+ "guidanceIcon": "G",
+ "showReviewed": false
+ }
},
{
- "code": "N",
- "buttonLabel": "No",
- "buttonCss": "btn-no",
- "answerLabel": ""
+ "moduleName": "RRA",
+ "questionIcons": {
+ "showDetails": false,
+ "guidanceIcon": "G",
+ "showReviewed": false
+ }
},
{
- "code": "U",
- "buttonLabel": "Unanswered"
- }
- ],
- "answersCPG": [
- {
- "code": "Y",
- "buttonLabel": "Imp",
- "buttonCss": "btn-yes",
- "answerLabel": "Implemented",
- "buttonTooltip": "Implemented - An organization has implemented and continues to maintain the recommended actions, or a suitable alternative, necessary to achieve the stated outcome."
+ "moduleName": "CIS",
+ "questionIcons": {
+ "showDetails": false,
+ "showObservations": false,
+ "showReferences": false,
+ "showReviewed": false
+ }
},
{
- "code": "I",
- "buttonLabel": "Prog",
- "buttonCss": "btn-na",
- "answerLabel": "In Progress",
- "buttonTooltip": "In Progress - An organization is in the process of implementing the recommended actions within a goal, or a suitable alternative, to achieve the stated outcome."
+ "moduleName": "SD02C",
+ "questionIcons": {
+ "showDetails": false
+ }
},
{
- "code": "S",
- "buttonLabel": "Scoped",
- "buttonCss": "btn-alt",
- "answerLabel": "Scoped",
- "buttonTooltip": "Scoped - An organization has identified the full set of required activities required to meet the stated outcome of a goal."
+ "moduleName": "CPG",
+ "showMaturityLevelBadge": false,
+ "questionIcons": {
+ "showDetails": false,
+ "showReviewed": false
+ },
+ "answerOptions": [
+ {
+ "code": "Y",
+ "buttonLabel": "Imp",
+ "buttonCss": "btn-yes",
+ "answerLabel": "Implemented",
+ "buttonTooltip": "Implemented - An organization has implemented and continues to maintain the recommended actions, or a suitable alternative, necessary to achieve the stated outcome."
+ },
+ {
+ "code": "I",
+ "buttonLabel": "Prog",
+ "buttonCss": "btn-na",
+ "answerLabel": "In Progress",
+ "buttonTooltip": "In Progress - An organization is in the process of implementing the recommended actions within a goal, or a suitable alternative, to achieve the stated outcome."
+ },
+ {
+ "code": "S",
+ "buttonLabel": "Scoped",
+ "buttonCss": "btn-alt",
+ "answerLabel": "Scoped",
+ "buttonTooltip": "Scoped - An organization has identified the full set of required activities required to meet the stated outcome of a goal."
+ },
+ {
+ "code": "N",
+ "buttonLabel": "Not",
+ "buttonCss": "btn-no",
+ "answerLabel": "Not Implemented",
+ "buttonTooltip": "Not Implemented - An organization has no immediate plans to implement the recommended actions for a goal."
+ }
+ ]
},
{
- "code": "N",
- "buttonLabel": "Not",
- "buttonCss": "btn-no",
- "answerLabel": "Not Implemented",
- "buttonTooltip": "Not Implemented - An organization has no immediate plans to implement the recommended actions for a goal."
- }
- ],
- "answersC2M2": [
+ "moduleName": "C2M2",
+ "questionIcons": {
+ "showReviewed": false
+ },
+ "answerOptions": [
+ {
+ "code": "FI",
+ "buttonLabel": "FI",
+ "buttonCss": "btn-c2m2-fi",
+ "answerLabel": "Fully Implemented (FI)",
+ "buttonTooltip": "Fully Implemented - Complete"
+ },
+ {
+ "code": "LI",
+ "buttonLabel": "LI",
+ "buttonCss": "btn-c2m2-li",
+ "answerLabel": "Largely Implemented (LI)",
+ "buttonTooltip": "Largely Implemented - Complete, but with a recognized opportunity for improvement"
+ },
+ {
+ "code": "PI",
+ "buttonLabel": "PI",
+ "buttonCss": "btn-c2m2-pi",
+ "answerLabel": "Partially Implemented (PI)",
+ "buttonTooltip": "Partially Implemented - Incomplete; there are multiple opportunities for improvement"
+ },
+ {
+ "code": "NI",
+ "buttonLabel": "NI",
+ "buttonCss": "btn-c2m2-ni",
+ "answerLabel": "Not Implemented (NI)",
+ "buttonTooltip": "Not Implemented - Absent; the practice is not performed by the organization"
+ }
+ ]
+ },
{
- "code": "FI",
- "buttonLabel": "FI",
- "buttonCss": "btn-c2m2-fi",
- "answerLabel": "Fully Implemented (FI)",
- "buttonTooltip": "Fully Implemented - Complete"
+ "moduleName": "ACET",
+ "answerOptions": [
+ {
+ "code": "A",
+ "buttonLabel": "Yes(C)",
+ "buttonCss": "btn-alt",
+ "answerLabel": "Yes Compensating Control",
+ "note": "This will only apply in the ACET skin. See QuestionsService"
+ }
+ ]
},
{
- "code": "LI",
- "buttonLabel": "LI",
- "buttonCss": "btn-c2m2-li",
- "answerLabel": "Largely Implemented (LI)",
- "buttonTooltip": "Largely Implemented - Complete, but with a recognized opportunity for improvement"
+ "moduleName": "ISE",
+ "questionIcons": {
+ "showObservations": false
+ },
+ "answerOptions": [
+ {
+ "code": "Y",
+ "buttonLabel": "Yes",
+ "buttonCss": "btn-yes",
+ "answerLabel": ""
+ },
+ {
+ "code": "N",
+ "buttonLabel": "No",
+ "buttonCss": "btn-no",
+ "answerLabel": ""
+ },
+ {
+ "code": "U",
+ "buttonLabel": "Unanswered"
+ }
+ ]
},
{
- "code": "PI",
- "buttonLabel": "PI",
- "buttonCss": "btn-c2m2-pi",
- "answerLabel": "Partially Implemented (PI)",
- "buttonTooltip": "Partially Implemented - Incomplete; there are multiple opportunities for improvement"
+ "moduleName": "HYDRO",
+ "questionIcons": {
+ "showDetails": false,
+ "showGuidance": false,
+ "showObservations": false,
+ "showReferences": false
+ }
},
{
- "code": "NI",
- "buttonLabel": "NI",
- "buttonCss": "btn-c2m2-ni",
- "answerLabel": "Not Implemented (NI)",
- "buttonTooltip": "Not Implemented - Absent; the practice is not performed by the organization"
+ "moduleName": "MVRA",
+ "answerOptions": [
+ {
+ "code": "Y",
+ "buttonLabel": "Fully",
+ "buttonCss": "btn-yes",
+ "answerLabel": "Fully Implemented"
+ },
+ {
+ "code": "N",
+ "buttonLabel": "Not",
+ "buttonCss": "btn-no",
+ "answerLabel": "Not Implemented"
+ },
+ {
+ "code": "A",
+ "buttonLabel": "Partial",
+ "buttonCss": "btn-alt",
+ "answerLabel": "Partially Implemented"
+ }
+ ]
}
]
-}
+}
\ No newline at end of file
|