Skip to content

Commit 587973f

Browse files
rushk014xingzhang-suse
authored andcommitted
fix: Fix Scan History table column sorting and Progress column cell formatter
1 parent db3d141 commit 587973f

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,36 +65,36 @@ export const REGISTRY_SCAN_HISTORY_TABLE = [
6565
labelKey: "imageScanner.registries.configuration.scanTable.header.status",
6666
value: "status.statusResult.type",
6767
formatter: "RegistryStatusCellBadge",
68-
sort: "status",
68+
sort: "status.statusResult.type",
6969
width: 100,
7070
},
7171
{
7272
name: "since",
7373
labelKey: "imageScanner.registries.configuration.scanTable.header.since",
7474
value: "status.statusResult.lastTransitionTime",
7575
formatter: "Date",
76-
sort: "timestamp",
76+
sort: "status.statusResult.lastTransitionTime:desc",
7777
},
7878
{
7979
name: "progress",
8080
labelKey: "imageScanner.registries.configuration.scanTable.header.progress",
8181
getValue: (row: any) => row,
82-
formatter: "ProgressCell",
82+
formatter: "Progress",
8383
sort: "progress",
8484
},
8585
{
8686
name: "imagesScanned",
8787
labelKey:
8888
"imageScanner.registries.configuration.scanTable.header.imagesScanned",
8989
value: "status.scannedImagesCount",
90-
sort: "imagesScanned",
90+
sort: "status.scannedImagesCount",
9191
},
9292
{
9393
name: "imagesFound",
9494
labelKey:
9595
"imageScanner.registries.configuration.scanTable.header.imagesFound",
9696
value: "status.imagesCount",
97-
sort: "imagesFound",
97+
sort: "status.imagesCount",
9898
},
9999
{
100100
name: "errors",
@@ -133,7 +133,7 @@ export const VEX_MANAGEMENT_TABLE = [
133133
labelKey: "imageScanner.vexManagement.table.headers.createdBy",
134134
value: (row: any) => {
135135
const gen = Number(row?.metadata?.generation);
136-
return (gen === 1) ? 'Rancher' : 'Manual entry';
136+
return gen === 1 ? "Rancher" : "Manual entry";
137137
},
138138
sort: "metadata.generation",
139139
},

0 commit comments

Comments
 (0)