Skip to content

Commit 2f30f5e

Browse files
Merge pull request #5380 from cisagov/feature/CSET-3487
Removed demographics and critical service fields
2 parents b073adc + 50ac28f commit 2f30f5e

File tree

21 files changed

+238
-519
lines changed

21 files changed

+238
-519
lines changed

CSETWebApi/CSETWeb_Api/CSETWebCore.Business/App_Data/FieldValidation/FieldValidation.json

Lines changed: 14 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -5,31 +5,23 @@
55
},
66
{
77
"key": "OrganizationName",
8-
"value": "Organization Name"
8+
"value": "Name of Organization"
99
},
1010
{
1111
"key": "BusinessUnit",
1212
"value": "Business Unit"
1313
},
1414
{
15-
"key": "Sector",
16-
"value": "Sector"
17-
},
18-
{
19-
"key": "Subsector",
20-
"value": "Subsector"
15+
"key": "SectorSubsectors",
16+
"value": "Sector and Subsector"
2117
},
2218
{
2319
"key": "NumberEmployeesTotal",
2420
"value": "Number of employees in the agency/business"
2521
},
26-
{
27-
"key": "NumberEmployeesUnit",
28-
"value": "Number of employees in the department/unit"
29-
},
3022
{
3123
"key": "AnnualRevenue",
32-
"value": "Annual revenue/funding"
24+
"value": "Annual revenue/funding of agency/business"
3325
},
3426
{
3527
"key": "Standard1",
@@ -47,14 +39,7 @@
4739
"key": "RegulationType2",
4840
"value": "Regulation Type 2"
4941
},
50-
{
51-
"key": "Barrier1",
52-
"value": "Most significant information sharing barrier"
53-
},
54-
{
55-
"key": "Barrier2",
56-
"value": "Second most significant information sharing barrier"
57-
},
42+
5843

5944

6045

@@ -65,86 +50,27 @@
6550
"key": "cisaregion",
6651
"value": "CISA Region"
6752
},
68-
{
69-
"key": "CriticalServiceName",
70-
"value": "Critical Service Name"
71-
},
72-
{
73-
"key": "CriticalDependencyIncidentResponseSupport",
74-
"value": "Critical Dependency for Incident Response Support"
75-
},
76-
{
77-
"key": "CriticalServiceRevenuePercent",
78-
"value": "Percent of annual revenue dependent on the Critical Service"
79-
},
80-
{
81-
"key": "NumberPeopleServedByCritSvc",
82-
"value": "Number of people served annually by the Critical Service"
83-
},
84-
{
85-
"key": "DisruptedSector1",
86-
"value": "Most important disrupted sector"
87-
},
88-
{
89-
"key": "DisruptedSector2",
90-
"value": "Second most important disrupted sector"
91-
},
53+
9254

9355

9456

9557

9658
///////////////////////// CRITICAL SERVCIE PAGE STARTS HERE
9759

9860
{
99-
"key": "CriticalServiceDescription",
100-
"value": "Critical Service Description"
101-
},
102-
{
103-
"key": "ItIcsName",
104-
"value": "Critical Service - IT/ICS System"
105-
},
106-
{
107-
"key": "BudgetBasis",
108-
"value": "Critical Service - Cybersecurity Budget Basis"
109-
},
110-
{
111-
"key": "ItIcsStaffCount",
112-
"value": "Critical Service - IT/ICS management and staff count"
113-
},
114-
{
115-
"key": "CybersecurityItIcsStaffCount",
116-
"value": "Critical Service - IT/ICS cybersecurity management and staff count"
117-
},
118-
{
119-
"key": "AuthorizedOrganizationalUserCount",
120-
"value": "Critical Service - Organizational user count"
121-
},
122-
{
123-
"key": "AuthorizedNonOrganizationalUserCount",
124-
"value": "Critical Service - Non-organizational user count"
125-
},
126-
{
127-
"key": "CustomersCount",
128-
"value": "Critical Service - Customer count"
129-
},
130-
{
131-
"key": "NetworksDescription",
132-
"value": "Critical Service - Networks description"
133-
},
134-
{
135-
"key": "ServicesDescription",
136-
"value": "Critical Service - Services description"
61+
"key": "CriticalServiceName",
62+
"value": "Critical Service Name"
13763
},
13864
{
139-
"key": "ApplicationsDescription",
140-
"value": "Critical Service - Applications description"
65+
"key": "CriticalServiceDescription",
66+
"value": "Critical Service Description"
14167
},
14268
{
143-
"key": "ConnectionsDescription",
144-
"value": "Critical Service - Connections description"
69+
"key": "DisruptedSector1",
70+
"value": "Most important disrupted sector"
14571
},
14672
{
147-
"key": "PersonnelDescription",
148-
"value": "Critical Service - Individuals Description"
73+
"key": "DisruptedSector2",
74+
"value": "Second most important disrupted sector"
14975
}
15076
]

CSETWebApi/CSETWeb_Api/CSETWebCore.Business/Demographic/CisDemographicBusiness.cs

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -147,25 +147,28 @@ public int SaveServiceComposition(CisServiceComposition serviceComposition)
147147
var currentSecondaryDefiningSystems = _context.CIS_CSI_SERVICE_COMPOSITION_SECONDARY_DEFINING_SYSTEMS.Where(x => x.Assessment_Id == serviceComposition.AssessmentId).ToList();
148148

149149
// Removing un selected secondary defining systems
150-
foreach (var item in currentSecondaryDefiningSystems)
150+
if (serviceComposition.SecondaryDefiningSystems != null)
151151
{
152-
if (!serviceComposition.SecondaryDefiningSystems.Contains(item.Defining_System_Id))
152+
foreach (var item in currentSecondaryDefiningSystems)
153153
{
154-
_context.CIS_CSI_SERVICE_COMPOSITION_SECONDARY_DEFINING_SYSTEMS.Remove(currentSecondaryDefiningSystems.Find(x => x.Defining_System_Id == item.Defining_System_Id));
154+
if (!serviceComposition.SecondaryDefiningSystems.Contains(item.Defining_System_Id))
155+
{
156+
_context.CIS_CSI_SERVICE_COMPOSITION_SECONDARY_DEFINING_SYSTEMS.Remove(currentSecondaryDefiningSystems.Find(x => x.Defining_System_Id == item.Defining_System_Id));
157+
}
155158
}
156-
}
157159

158-
// Adding newly selected secondary defining systems
159-
foreach (var systemId in serviceComposition.SecondaryDefiningSystems)
160-
{
161-
if (!currentSecondaryDefiningSystems.Exists(x => x.Defining_System_Id == systemId))
160+
// Adding newly selected secondary defining systems
161+
foreach (var systemId in serviceComposition.SecondaryDefiningSystems)
162162
{
163-
_context.CIS_CSI_SERVICE_COMPOSITION_SECONDARY_DEFINING_SYSTEMS.Add(
164-
new CIS_CSI_SERVICE_COMPOSITION_SECONDARY_DEFINING_SYSTEMS
165-
{
166-
Assessment_Id = serviceComposition.AssessmentId,
167-
Defining_System_Id = systemId
168-
});
163+
if (!currentSecondaryDefiningSystems.Exists(x => x.Defining_System_Id == systemId))
164+
{
165+
_context.CIS_CSI_SERVICE_COMPOSITION_SECONDARY_DEFINING_SYSTEMS.Add(
166+
new CIS_CSI_SERVICE_COMPOSITION_SECONDARY_DEFINING_SYSTEMS
167+
{
168+
Assessment_Id = serviceComposition.AssessmentId,
169+
Defining_System_Id = systemId
170+
});
171+
}
169172
}
170173
}
171174

CSETWebApi/CSETWeb_Api/CSETWebCore.Business/Demographic/CisaAssessorWorkflowFieldValidator.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ public CisaWorkflowFieldValidationResponse ValidateFields()
4646

4747
// create composite list of properties for all three pages
4848
List<PropertyInfo> demoExtProperties = typeof(DemographicExt).GetProperties().ToList();
49+
// TODO-3487 - include sector/subsector - need at least one pair
4950
List<PropertyInfo> cisServiceDemoProperties = typeof(CisServiceDemographics).GetProperties().ToList();
5051
List<PropertyInfo> cisServiceCompProperties = typeof(CisServiceComposition).GetProperties().ToList();
5152
var allProperties = demoExtProperties.Concat(cisServiceDemoProperties).Concat(cisServiceCompProperties).ToList();
@@ -89,6 +90,17 @@ public CisaWorkflowFieldValidationResponse ValidateFields()
8990
continue;
9091
}
9192

93+
// special case for sector/subsector
94+
if (field.Key == "SectorSubsectors")
95+
{
96+
var ss = (List<SectorSubsector>)propertyValue;
97+
if (ss.All(x => x.SectorId == null && x.SubsectorId == null)
98+
|| ss.Any(x => x.SectorId != null && x.SubsectorId == null))
99+
{
100+
invalidFields.Add(field.Value);
101+
continue;
102+
}
103+
}
92104

93105
if (propertyValue == null)
94106
{

CSETWebApi/CSETWeb_Api/CSETWeb_ApiCore/Controllers/ReportsController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -837,7 +837,7 @@ public IActionResult ModuleContentReport([FromQuery] string set)
837837
/// </summary>
838838
/// <returns></returns>
839839
[HttpGet]
840-
[Route("api/reports/CisaAssessorWorkflowValidateFields")]
840+
[Route("api/reports/cisa-assessor-workflow-validate-fields")]
841841
public IActionResult CisaAssessorWorkflowValidateFields()
842842
{
843843
var assessmentId = _token.AssessmentForUser();

CSETWebNg/src/app/app.module.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ import { LogoCsetComponent } from './layout/logos/logo-cset/logo-cset.component'
386386
import { LogoForReportsComponent } from './reports/logo-for-reports/logo-for-reports.component';
387387
import { QuestionBlockVadrComponent } from './assessment/questions/question-block-vadr/question-block-vadr.component';
388388
import { VadrDeficiencyComponent } from './reports/vadr/vadr-deficiency/vadr-deficiency.component';
389-
import { CsiComponent } from './assessment/prepare/csi/csi.component';
389+
import { CriticalServiceComponent } from './assessment/prepare/csi/critical-service.component';
390390
import { CsiServiceDemographicsComponent } from './assessment/prepare/csi/csi-service-demographics/csi-service-demographics.component';
391391
import { CsiServiceCompositionComponent } from './assessment/prepare/csi/csi-service-composition/csi-service-composition.component';
392392
import { AssessmentComparisonAnalyticsComponent } from './initial/assessmenet-comparison-analytics/assessment-comparison-analytics.component';
@@ -844,7 +844,7 @@ ModuleRegistry.registerModules([AllCommunityModule]);
844844
LogoForReportsComponent,
845845
QuestionBlockVadrComponent,
846846
VadrDeficiencyComponent,
847-
CsiComponent,
847+
CriticalServiceComponent,
848848
CsiServiceDemographicsComponent,
849849
CsiServiceCompositionComponent,
850850
AssessmentComparisonAnalyticsComponent,

CSETWebNg/src/app/assessment/prepare/assessment-info/assessment-config-iod/assessment-config-iod.component.html

Lines changed: 7 additions & 97 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
<label for="name" class="form-label">{{t('cisa region')}}</label>
6161
<select class="form-select" id="cisaRegion" tabindex="0" name="cisaRegion" (change)="updateDemographicsIod()"
6262
[(ngModel)]="iodDemographics.cisaRegion">
63-
<option [ngValue]="null">-- Select Region --</option>
63+
<option [ngValue]="null">-- {{t('select')}} --</option>
6464
<option *ngFor="let region of iodDemographics.cisaRegions" [ngValue]="region.optionValue">
6565
{{region.optionText}}
6666
</option>
@@ -136,112 +136,22 @@ <h4>{{ t('assessment settings') }}</h4>
136136
<label class="form-label" for="facilitator">{{t('contact.facilitator')}}</label>
137137
<select class="form-select" id="facilitator" tabindex="0" name="facilitator" (change)="updateDemographics()"
138138
[(ngModel)]="demographics.facilitatorId">
139-
<option [ngValue]="null">-- {{t('select facilitator')}} --</option>
139+
<option [ngValue]="null">-- {{t('select')}} --</option>
140140
<option *ngFor="let contact of contacts" [value]="contact.assessmentContactId">{{contact.firstName}}
141141
{{contact.lastName}}</option>
142142
</select>
143143
</div>
144144

145-
<div class="row mb-4">
146-
<div class="col">
147-
<label class="form-label" for="criticalService">{{t('critical service name')}}</label>
148-
<textarea [ngClass]="{ 'is-invalid' : !demographics.criticalService }" appAutoSize class="form-control"
149-
autocomplete="off" tabindex="0" maxlength="100" name="criticalService" id="criticalService"
150-
[(ngModel)]="demographics.criticalService" placeholder="{{t('critical service name')}}"
151-
(blur)="updateDemographics()"></textarea>
152-
</div>
153145

154-
<div class="col">
155-
<label class="form-label" for="criticalService">Critical Dependency for
156-
Incident Response Support</label>
157-
<textarea [ngClass]="{ 'is-invalid' : !iodDemographics.criticalDependencyIncidentResponseSupport }"
158-
appAutoSize class="form-control" autocomplete="off" tabindex="0" maxlength="100" name="criticalDependency"
159-
id="criticalDependency" [(ngModel)]="iodDemographics.criticalDependencyIncidentResponseSupport"
160-
placeholder="Critical Dependency for Incident Response Support" (blur)="updateDemographicsIod()"></textarea>
161-
</div>
162-
</div>
163146

164-
<div class="mb-4">
165-
<label class="form-label" for="critSvcPointOfContact">Critical Service Point of
166-
Contact</label>
167-
<select class="form-select" id="critSvcPointOfContact" tabindex="0" name="critSvcPointOfContact"
168-
(change)="updateDemographics()" [(ngModel)]="demographics.pointOfContact">
169-
<option [ngValue]="null">-- Select Contact --</option>
170-
<option *ngFor="let contact of contacts" [ngValue]="contact.assessmentContactId">
171-
{{ contact.firstName }} {{ contact.lastName }}
172-
</option>
173-
</select>
174-
</div>
175147

176-
<!-- #4 -->
177-
<div class="mb-4">
178-
<label for="percentageRevenue" class="form-label">
179-
Please estimate the percentage of your organization's annual revenue
180-
that depends on the critical service.
181-
</label>
182-
<select [ngClass]="{ 'is-invalid' : !iodDemographics.criticalServiceRevenuePercent }" class="form-select"
183-
id="percentageRevenue" tabindex="0" name="percentageRevenue"
184-
[(ngModel)]="iodDemographics.criticalServiceRevenuePercent" (change)="updateDemographicsIod()">
185-
<option [ngValue]="null">-- Select --</option>
186-
<option *ngFor="let i of iodDemographics.listRevenuePercentages" [ngValue]="i.optionValue"
187-
[selected]="i.optionValue === iodDemographics.criticalServiceRevenuePercent">
188-
{{ i.optionText }}
189-
</option>
190-
</select>
191-
</div>
192148

193-
<!-- #5 -->
194-
<div class="mb-4">
195-
<label for="NumberPeopleServedByCritSvc" class="form-label">
196-
If possible, please estimate the number of people served annually by the
197-
critical service. If an estimate is not
198-
available, please select N/A.
199-
</label>
200-
<select [ngClass]="{ 'is-invalid' : !iodDemographics.numberPeopleServedByCritSvc }" class="form-select"
201-
id="numberPeopleServedByCritSvc" tabindex="0" name="numberPeopleServedByCritSvc"
202-
[(ngModel)]="iodDemographics.numberPeopleServedByCritSvc" (change)="updateDemographicsIod()">
203-
<option [ngValue]="null">-- Select --</option>
204-
<option *ngFor="let i of iodDemographics.listNumberPeopleServed" [ngValue]="i.optionValue"
205-
[selected]="i.optionValue === iodDemographics.numberPeopleServedByCritSvc">
206-
{{ i.optionText }}
207-
</option>
208-
</select>
209-
</div>
210149

211-
<!-- #6 -->
212-
<div class="mb-4">
213-
<label for="disruptedSectors" class="form-label">
214-
Please select in order of criticality, the two critical infrastructure
215-
sectors which, if they were unavailable
216-
or disrupted for one week or more, would most affect your ability to
217-
sustain the critical service.
218-
</label>
219-
220-
<div>
221-
<label class="form-label">Most important</label>
222-
<select [ngClass]="{ 'is-invalid' : !iodDemographics.disruptedSector1 }" class="form-select mb-3"
223-
name="disruptedSector1" tabindex="0" [(ngModel)]="iodDemographics.disruptedSector1"
224-
(change)="updateDemographicsIod()">
225-
<option [ngValue]="null">-- Select --</option>
226-
<option *ngFor="let i of iodDemographics.listSectors" [ngValue]="i.optionValue"
227-
[selected]="i.optionValue === iodDemographics.disruptedSector1">
228-
{{ i.optionText }}
229-
</option>
230-
</select>
231-
</div>
232-
<div>
233-
<label class="form-label">Second most important</label>
234-
<select [ngClass]="{ 'is-invalid' : !iodDemographics.disruptedSector2 }" class="form-select mb-3"
235-
name="disruptedSector2" tabindex="0" [(ngModel)]="iodDemographics.disruptedSector2"
236-
(change)="updateDemographicsIod()">
237-
<option [ngValue]="null">-- Select --</option>
238-
<option *ngFor="let i of iodDemographics.listSectors" [ngValue]="i.optionValue"
239-
[selected]="i.optionValue === iodDemographics.disruptedSector2">
240-
{{ i.optionText }}
241-
</option>
242-
</select>
243-
</div>
244-
</div>
150+
151+
152+
153+
154+
245155
</div>
246156
<app-nav-back-next [page]="'info-config-iod'"></app-nav-back-next>
247157
</div>

0 commit comments

Comments
 (0)