[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:
Shijun Sun 2023-08-15 16:04:21 +08:00 committed by GitHub
parent 6050cb6325
commit 05cb1d771b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -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()}`);
}
});

View File

@ -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>