Skip to content

Commit

Permalink
ignore spaces for vulnerability filters (#19180)
Browse files Browse the repository at this point in the history
1.Fixes #19168

Signed-off-by: AllForNothing <[email protected]>
  • Loading branch information
AllForNothing authored Aug 15, 2023
1 parent 661c762 commit 296e905
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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()}`);
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ <h2>
{{ 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>
Expand Down

0 comments on commit 296e905

Please sign in to comment.