Skip to content

Commit 6faccfa

Browse files
committed
Fix progress cell on Registry details page
1 parent fff3856 commit 6faccfa

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@
108108
];
109109
110110
this.scanHistory = scanJobs.map((rec) => {
111+
rec.progress = Math.ceil(rec.status.scannedImagesCount / rec.status.imagesCount * 100)
111112
rec.status.statusResult = rec.status.conditions.filter(condition => {
112113
return condition.status === "True";
113114
})[0] || {

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

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export const REGISTRY_SCAN_TABLE = [
4444
{
4545
name: "progress",
4646
labelKey: "imageScanner.registries.registrytable.header.progress",
47-
getValue: (row: any) => row,
47+
getValue: (row: any) => row,
4848
formatter: "ProgressCell",
4949
sort: "progress",
5050
width: 120,
@@ -78,12 +78,7 @@ export const REGISTRY_SCAN_HISTORY_TABLE = [
7878
{
7979
name: "progress",
8080
labelKey: "imageScanner.registries.configuration.scanTable.header.progress",
81-
getValue: (row: any) => {
82-
let progress = Math.round(
83-
(row.status.scannedImagesCount / row.status.imagesCount) * 100
84-
);
85-
return { progress };
86-
},
81+
getValue: (row: any) => row,
8782
formatter: "ProgressCell",
8883
sort: "progress",
8984
},

0 commit comments

Comments
 (0)