Skip to content

Commit fb8f8b2

Browse files
xingzhang-suselsongsuse
authored andcommitted
Fixed bugs on chart filters and routing
1 parent c93eeb3 commit fb8f8b2

File tree

5 files changed

+16
-37
lines changed

5 files changed

+16
-37
lines changed

pkg/sbombastic-image-vulnerability-scanner/components/ImageDetails.vue

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999
class="row"
100100
>
101101
<div class="col span-4">
102-
<RouterLink>
102+
<RouterLink :to="`/c/${this.$route.params.cluster}/${ this.PRODUCT_NAME }/${this.PAGE.VULNERABILITIES}/${vuln.cveId}`">
103103
{{ vuln.cveId }}
104104
</RouterLink>
105105
</div>
@@ -217,6 +217,7 @@
217217
:namespaced="false"
218218
:row-actions="false"
219219
:search="true"
220+
:key-field="'cveId'"
220221
@selection="onSelectionChange"
221222
>
222223
<template #header-left>
@@ -699,7 +700,7 @@ export default {
699700
.vulnerabilities-list {
700701
display: flex;
701702
flex-direction: column;
702-
gap: 4px;
703+
gap: 8px;
703704
width: 100%;
704705
}
705706
@@ -709,8 +710,8 @@ export default {
709710
}
710711
711712
.vulnerabilities-list .col {
712-
padding: 8px 16px;
713-
min-height: 32px;
713+
padding: 0 16px;
714+
min-height: 24px;
714715
}
715716
716717
.cve-id {

pkg/sbombastic-image-vulnerability-scanner/components/SeverityDistribution.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
font-family: Lato;
4141
font-size: 18px;
4242
font-style: normal;
43-
font-weight: 400;
43+
font-weight: 600;
4444
line-height: 21px; /* 116.667% */
4545
}
4646
.severity-bar-chart {

pkg/sbombastic-image-vulnerability-scanner/config/table-headers.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ export const IMAGE_LIST_TABLE = [
157157
labelKey: "imageScanner.images.listTable.headers.identifiedCVEs",
158158
value: "spec.scanResult",
159159
formatter: "IdentifiedCVEsCell",
160-
sort: "spec.scanResult",
160+
sort: ["spec.scanResult.critical", "spec.scanResult.high", "spec.scanResult.medium", "spec.scanResult.low", "spec.scanResult.none"],
161161
width: 300,
162162
},
163163
{
@@ -278,7 +278,7 @@ export const VULNERABILITY_DETAILS_TABLE = [
278278
name: "cveId",
279279
labelKey: "imageScanner.imageDetails.table.headers.cveId",
280280
value: "cveId",
281-
formatter: "CveIdCell",
281+
formatter: "CveNameLink",
282282
sort: "cveId",
283283
width: 150,
284284
},

pkg/sbombastic-image-vulnerability-scanner/formatters/CveIdCell.vue

Lines changed: 0 additions & 25 deletions
This file was deleted.

pkg/sbombastic-image-vulnerability-scanner/pages/c/_cluster/sbombastic-image-vulnerability-scanner/RegistriesConfiguration.vue

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -138,10 +138,13 @@
138138
this.loadData(true);
139139
},
140140
filterByStatus(status) {
141-
console.log("filter by status", status);
142-
this.rows = this.rows.filter(row => row.status === status);
143-
this.registryStatusList = this.registryStatusList.filter(item => item.status === status);
144-
this.statusSummary = this.statusSummary[status] || {};
141+
const el = document.querySelector(
142+
'input[type="search"][placeholder="Filter"][aria-label="Filter table results"]'
143+
);
144+
el.value = status;
145+
146+
el.dispatchEvent(new Event('input', { bubbles: true }));
147+
el.dispatchEvent(new KeyboardEvent('keyup', { bubbles: true, key: 'a' }));
145148
},
146149
openAddEditRegistry() {
147150
this.$router.push({
@@ -206,7 +209,7 @@
206209
});
207210
return scanJobMap;
208211
},
209-
getRegistryDataset(registriesCRD, scanJobMap) {
212+
getRegistryDataset(registriesCRD, scanJobMap ) {
210213
let registryStatusList = [];
211214
const statusSummary = {
212215
pending: 0,

0 commit comments

Comments
 (0)