Skip to content

Commit b55f119

Browse files
STIG Manager Severity Filter Change #229
1 parent ea31de4 commit b55f119

File tree

2 files changed

+90
-60
lines changed

2 files changed

+90
-60
lines changed

client/src/app/pages/import-processing/stigmanager-import/stigmanager-import.component.html

+79-59
Original file line numberDiff line numberDiff line change
@@ -36,65 +36,85 @@
3636
dataKey="groupId">
3737
<ng-template pTemplate="header">
3838
<tr>
39-
<th *ngFor="let col of allColumns"
40-
id="col"
41-
[pSortableColumn]="col.field"
42-
[ngStyle]="{'width': col.width}">
43-
{{col.header}}
44-
<ng-container *ngIf="col.field === 'benchmarkId'">
45-
<p-columnFilter [type]="'multi'"
46-
[field]="col.field"
47-
[showOperator]="false"
48-
[showMatchModes]="false"
49-
showAddButton="false"
50-
showClearButton="false"
51-
showApplyButton="false"
52-
[matchMode]="'in'"
53-
display="menu">
54-
<ng-template pTemplate="filter" let-value let-filter="filterCallback">
55-
<p-multiSelect [(ngModel)]="selectedBenchmarkIds"
56-
[options]="col.filterOptions"
57-
placeholder="Select Benchmarks"
58-
[showClear]="true"
59-
(onChange)="onBenchmarkFilterChange($event, filter)"
60-
(onClear)="onBenchmarkFilterClear($event, filter)"
61-
styleClass="w-full"
62-
[maxSelectedLabels]="1"
63-
[showToggleAll]="true"
64-
optionLabel="label"
65-
optionValue="value"
66-
selectedItemsLabel="{0} benchmarks selected">
67-
</p-multiSelect>
68-
</ng-template>
69-
</p-columnFilter>
70-
</ng-container>
71-
<ng-container *ngIf="col.field === 'poam'">
72-
<p-columnFilter [field]="col.filterField"
73-
type="multi"
74-
matchMode="in"
75-
[showOperator]="false"
76-
[showMatchModes]="false"
77-
[showAddButton]="false"
78-
[showButtons]="true"
79-
display="menu">
80-
<ng-template pTemplate="filter" let-value let-filter="filterCallback">
81-
<p-multiSelect [ngModel]="value"
82-
[options]="col.filterOptions"
83-
(onChange)="filter($event.value)"
84-
placeholder="Select Status"
85-
[showClear]="true"
86-
styleClass="w-full">
87-
</p-multiSelect>
88-
</ng-template>
89-
</p-columnFilter>
90-
</ng-container>
91-
<p-columnFilter *ngIf="col.field !== 'poam' && col.field !== 'benchmarkId'"
92-
[type]="col.filterType"
93-
[field]="col.field"
94-
[showOperator]="false"
95-
display="menu">
96-
</p-columnFilter>
97-
</th>
39+
<th *ngFor="let col of allColumns"
40+
id="col"
41+
[pSortableColumn]="col.field"
42+
[ngStyle]="{'width': col.width}">
43+
{{col.header}}
44+
<ng-container *ngIf="col.field === 'benchmarkId'">
45+
<p-columnFilter [type]="'multi'"
46+
[field]="col.field"
47+
[showOperator]="false"
48+
[showMatchModes]="false"
49+
showAddButton="false"
50+
showClearButton="false"
51+
showApplyButton="false"
52+
[matchMode]="'in'"
53+
display="menu">
54+
<ng-template pTemplate="filter" let-value let-filter="filterCallback">
55+
<p-multiSelect [(ngModel)]="selectedBenchmarkIds"
56+
[options]="col.filterOptions"
57+
placeholder="Select Benchmarks"
58+
[showClear]="true"
59+
(onChange)="onBenchmarkFilterChange($event, filter)"
60+
(onClear)="onBenchmarkFilterClear($event, filter)"
61+
styleClass="w-full"
62+
[maxSelectedLabels]="1"
63+
[showToggleAll]="true"
64+
optionLabel="label"
65+
optionValue="value"
66+
selectedItemsLabel="{0} benchmarks selected">
67+
</p-multiSelect>
68+
</ng-template>
69+
</p-columnFilter>
70+
</ng-container>
71+
<ng-container *ngIf="col.field === 'poam'">
72+
<p-columnFilter [field]="col.filterField"
73+
type="multi"
74+
matchMode="in"
75+
[showOperator]="false"
76+
[showMatchModes]="false"
77+
[showAddButton]="false"
78+
[showButtons]="true"
79+
display="menu">
80+
<ng-template pTemplate="filter" let-value let-filter="filterCallback">
81+
<p-multiSelect [ngModel]="value"
82+
[options]="col.filterOptions"
83+
(onChange)="filter($event.value)"
84+
placeholder="Select Status"
85+
[showClear]="true"
86+
styleClass="w-full">
87+
</p-multiSelect>
88+
</ng-template>
89+
</p-columnFilter>
90+
</ng-container>
91+
<ng-container *ngIf="col.field === 'severity'">
92+
<p-columnFilter type="multi"
93+
[field]="col.field"
94+
matchMode="in"
95+
[showOperator]="false"
96+
[showMatchModes]="false"
97+
[showAddButton]="false"
98+
[showButtons]="true"
99+
display="menu">
100+
<ng-template pTemplate="filter" let-value let-filter="filterCallback">
101+
<p-multiSelect [ngModel]="value"
102+
[options]="col.filterOptions"
103+
(onChange)="filter($event.value)"
104+
placeholder="Select Severity"
105+
[showClear]="true"
106+
styleClass="w-full">
107+
</p-multiSelect>
108+
</ng-template>
109+
</p-columnFilter>
110+
</ng-container>
111+
<p-columnFilter *ngIf="col.field !== 'poam' && col.field !== 'benchmarkId' && col.field !== 'severity'"
112+
[type]="col.filterType"
113+
[field]="col.field"
114+
[showOperator]="false"
115+
display="menu">
116+
</p-columnFilter>
117+
</th>
98118
</tr>
99119
</ng-template>
100120
<ng-template pTemplate="body" let-rowData>

client/src/app/pages/import-processing/stigmanager-import/stigmanager-import.component.ts

+11-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,17 @@ export class STIGManagerImportComponent implements OnInit, OnDestroy {
119119
filterType: 'multi',
120120
filterOptions: [{ label: 'Any', value: null }]
121121
},
122-
{ field: 'severity', header: 'Severity', width: '15%', filterType: 'text' },
122+
{
123+
field: 'severity',
124+
header: 'Severity',
125+
width: '15%',
126+
filterType: 'text',
127+
filterOptions: [
128+
{ label: 'CAT I - High', value: 'CAT I - High' },
129+
{ label: 'CAT II - Medium', value: 'CAT II - Medium' },
130+
{ label: 'CAT III - Low', value: 'CAT III - Low' }
131+
]
132+
},
123133
{ field: 'assetCount', header: 'Asset Count', width: '15%', filterType: 'numeric' },
124134
];
125135
private dataSource: AssetEntry[] = [];

0 commit comments

Comments
 (0)