Skip to content

Commit 03507b1

Browse files
committed
fix: change severity structure in FE
1 parent ec0ed5c commit 03507b1

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

dashboard/src/app/components/findings-input-filter-dialog/findings-input-filter-dialog.component.ts

+8-8
Original file line numberDiff line numberDiff line change
@@ -55,16 +55,16 @@ export class FindingsInputFilterDialogComponent {
5555
const priMaxValue = this.rangeFilters.priorities.maxValue;
5656
this.dialogRef.close({
5757
...((sevMinValue !== 0 || sevMaxValue !== 100) && {
58-
severity: [
59-
this.rangeFilters.severities.minValue,
60-
this.rangeFilters.severities.maxValue,
61-
],
58+
severity: {
59+
minValue: this.rangeFilters.severities.minValue,
60+
maxValue: this.rangeFilters.severities.maxValue,
61+
},
6262
}),
6363
...((priMinValue !== 0 || priMaxValue !== 100) && {
64-
priority: [
65-
this.rangeFilters.priorities.minValue,
66-
this.rangeFilters.priorities.maxValue,
67-
],
64+
priority: {
65+
minValue: this.rangeFilters.priorities.minValue,
66+
maxValue: this.rangeFilters.priorities.maxValue,
67+
},
6868
}),
6969
...(source && source.length > 0 && { source }),
7070
...(cve_ids && cve_ids.length > 0 && { cve_ids }),

dashboard/src/app/services/recommendations.service.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export class RecommendationsService {
5151
body.taskId = taskId;
5252
}
5353
if (severity !== undefined) {
54-
body.severity = severity;
54+
body.severity = { minValue: severity[0], maxValue: severity[1] };
5555
}
5656

5757
return this.http.post<ReceivedRecommendations>(

0 commit comments

Comments
 (0)