Skip to content

Commit 0273e08

Browse files
rushk014xingzhang-suse
authored andcommitted
NVSHAS-9873: UI Advanced Filter search issue in NeuVector 5.4.2
Adds "With All Fixed" option to Vulnerabilities advanced filter. The behavior is: - "With Fix" shows CVEs where any package contains a "Fix Version" - "With All Fixed" shows CVEs where all packages contain a "Fix Version" - "Without Fix" shows CVEs where all packages do not contain a "Fix Version"
1 parent b02bc9a commit 0273e08

File tree

4 files changed

+18
-10
lines changed

4 files changed

+18
-10
lines changed

admin/webapp/websrc/app/common/types/common/common.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,11 @@ export type DataOps = 'add' | 'edit' | 'delete';
2121

2222
export type VulQueryPublishedTimeOption = 'all' | 'before' | 'after';
2323

24-
export type VulQueryPackageTypeOption = 'all' | 'withfix' | 'withoutfix';
24+
export type VulQueryPackageTypeOption =
25+
| 'all'
26+
| 'withFix'
27+
| 'withoutFix'
28+
| 'withFixAll';
2529

2630
export type VulQuerySeverityTypeOption = 'all' | 'high' | 'medium' | 'low';
2731

admin/webapp/websrc/app/routes/vulnerabilities/vulnerability-items/vulnerability-items-table/vulnerability-items-table-filter/vulnerability-items-table-filter.component.html

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -73,24 +73,26 @@ <h1 mat-dialog-title>{{ 'general.FILTER_MATCH_ALL' | translate }}</h1>
7373
<mat-datepicker #picker></mat-datepicker>
7474
</mat-form-field>
7575
</section>
76-
<section class="row mx-0">
76+
<section class="row mx-0 mt-2">
7777
<span class="d-block col-2">{{
7878
'cis.report.gridHeader.SCORED' | translate
7979
}}</span>
8080
<mat-radio-group
8181
aria-label="Scored"
8282
class="col row"
8383
formControlName="packageType">
84-
<mat-radio-button class="col" value="all">{{
84+
<mat-radio-button class="col-2" value="all">{{
8585
'setting.ALL' | translate
8686
}}</mat-radio-button>
87-
<mat-radio-button class="col" value="withFix">{{
87+
<mat-radio-button class="col-3" value="withFix">{{
8888
'scan.WITH_FIX' | translate
8989
}}</mat-radio-button>
90-
<mat-radio-button class="col" value="withoutFix">{{
90+
<mat-radio-button class="col-3" value="withoutFix">{{
9191
'scan.WITHOUT_FIX' | translate
9292
}}</mat-radio-button>
93-
<div class="col"></div>
93+
<mat-radio-button class="col-4" value="withFixAll">{{
94+
'scan.WITH_FIX_ALL' | translate
95+
}}</mat-radio-button>
9496
</mat-radio-group>
9597
</section>
9698
<section class="row mx-0">
@@ -99,16 +101,16 @@ <h1 mat-dialog-title>{{ 'general.FILTER_MATCH_ALL' | translate }}</h1>
99101
aria-label="Profile"
100102
class="col row"
101103
formControlName="severityType">
102-
<mat-radio-button class="col" value="all">{{
104+
<mat-radio-button class="col-2" value="all">{{
103105
'setting.ALL' | translate
104106
}}</mat-radio-button>
105-
<mat-radio-button class="col" value="high">{{
107+
<mat-radio-button class="col-3" value="high">{{
106108
'enum.HIGH' | translate
107109
}}</mat-radio-button>
108-
<mat-radio-button class="col" value="medium">{{
110+
<mat-radio-button class="col-3" value="medium">{{
109111
'enum.MEDIUM' | translate
110112
}}</mat-radio-button>
111-
<mat-radio-button class="col" value="low">{{
113+
<mat-radio-button class="col-4" value="low">{{
112114
'enum.LOW' | translate
113115
}}</mat-radio-button>
114116
</mat-radio-group>

admin/webapp/websrc/assets/i18n/en-common.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1179,6 +1179,7 @@
11791179
"PUBLISHED_TYPE": "Published Type",
11801180
"WITH_FIX": "With Fix",
11811181
"WITHOUT_FIX": "Without Fix",
1182+
"WITH_FIX_ALL": "With All Fixed",
11821183
"INVALID_DATE": "Please input valid date.",
11831184
"INVALID_DATE_RANGE": "Please input valid date range.",
11841185
"CONDITION_HINT": "Sample: on Service use redis-pod.demo,nv.nvlab:node to matchredis-pod.demo or nv.nvlab:node service, same for the other criteria.",

admin/webapp/websrc/assets/i18n/zh_cn-common.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1179,6 +1179,7 @@
11791179
"PUBLISHED_TYPE": "发布类型",
11801180
"WITH_FIX": "修复",
11811181
"WITHOUT_FIX": "未修复",
1182+
"WITH_FIX_ALL": "完全修复",
11821183
"INVALID_DATE": "请输入有效的日期",
11831184
"INVALID_DATE_RANGE": "请输入有效的日期范围",
11841185
"CONDITION_HINT": "样本: 对于Namespace用redis-pod.demo,nv.nvlab:node去匹配matchredis-pod.demo或nv.nvlab:node服务, 其余同理",

0 commit comments

Comments
 (0)