mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-01 08:09:59 +01:00
[Cherry-pick]ignore spaces for vulnerability filters (#19181)
ignore spaces for vulnerability filters 1.Fixes #19168 Signed-off-by: AllForNothing <sshijun@vmware.com>
This commit is contained in:
parent
6050cb6325
commit
05cb1d771b
@ -97,7 +97,7 @@ export class VulnerabilityFilterComponent {
|
||||
return;
|
||||
} else if (
|
||||
item === OptionType.PROJECT_ID &&
|
||||
this.valueMap[OptionType.PROJECT_ID]
|
||||
this.valueMap[OptionType.PROJECT_ID]?.trim()
|
||||
) {
|
||||
result.projectId = this.valueMap[OptionType.PROJECT_ID]?.trim();
|
||||
} else if (item === OptionType.SEVERITY) {
|
||||
@ -107,14 +107,14 @@ export class VulnerabilityFilterComponent {
|
||||
);
|
||||
}
|
||||
} else if (item === OptionType.CVSS3) {
|
||||
if (this.startScore || this.endScore) {
|
||||
if (this.startScore?.trim() || this.endScore?.trim()) {
|
||||
result.normal.push(
|
||||
`${OptionType.CVSS3}=[${
|
||||
this.startScore ? this.startScore?.trim() : '0.0'
|
||||
}~${this.endScore ? this.endScore?.trim() : '10.0'}]`
|
||||
);
|
||||
}
|
||||
} else if (this.valueMap[item]) {
|
||||
} else if (this.valueMap[item]?.trim()) {
|
||||
result.normal.push(`${item}=${this.valueMap[item]?.trim()}`);
|
||||
}
|
||||
});
|
||||
|
@ -88,7 +88,7 @@
|
||||
{{ securitySummary?.none_cnt || 0 }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="clr-row" [hidden]="!securitySummary">
|
||||
<div class="clr-row" [hidden]="!securitySummary?.total_vuls">
|
||||
<div class="placeholder">
|
||||
<div class="pie-chart" id="pie-chart"></div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user