From 7594ee5f6ec4368f4d1dfc47ef4eb19e965f448d Mon Sep 17 00:00:00 2001 From: Rush Kapoor Date: Fri, 15 Aug 2025 09:43:26 -0700 Subject: [PATCH 1/2] Fix progress cell on Registry details page --- .../components/RegistryDetails.vue | 24 ++++++++++++------- .../config/table-headers.ts | 9 ++----- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/pkg/sbombastic-image-vulnerability-scanner/components/RegistryDetails.vue b/pkg/sbombastic-image-vulnerability-scanner/components/RegistryDetails.vue index b276ea4..6d2ccf6 100644 --- a/pkg/sbombastic-image-vulnerability-scanner/components/RegistryDetails.vue +++ b/pkg/sbombastic-image-vulnerability-scanner/components/RegistryDetails.vue @@ -106,15 +106,21 @@ value: registry.metadata.schedule || '', } ]; - - this.scanHistory = scanJobs.map((rec) => { - rec.status.statusResult = rec.status.conditions.filter(condition => { - return condition.status === "True"; - })[0] || { - type: "Pending", - lastTransitionTime: null, - }; - return rec; + + scanJobs.forEach((rec) => { + this.scanHistory.push({ + ...rec, + progress: rec.status.scannedImagesCount && rec.status.imagesCount ? Math.ceil(rec.status.scannedImagesCount / rec.status.imagesCount * 100) : 0, + status: { + ...rec.status, + statusResult: rec.status.conditions.filter(condition => { + return condition.status === "True"; + })[0] || { + type: "Pending", + lastTransitionTime: null, + } + } + }) }); }, getRegistryStatus(registry) { diff --git a/pkg/sbombastic-image-vulnerability-scanner/config/table-headers.ts b/pkg/sbombastic-image-vulnerability-scanner/config/table-headers.ts index 0570030..61e2e95 100644 --- a/pkg/sbombastic-image-vulnerability-scanner/config/table-headers.ts +++ b/pkg/sbombastic-image-vulnerability-scanner/config/table-headers.ts @@ -44,7 +44,7 @@ export const REGISTRY_SCAN_TABLE = [ { name: "progress", labelKey: "imageScanner.registries.registrytable.header.progress", - getValue: (row: any) => row, + getValue: (row: any) => row, formatter: "ProgressCell", sort: "progress", width: 120, @@ -78,12 +78,7 @@ export const REGISTRY_SCAN_HISTORY_TABLE = [ { name: "progress", labelKey: "imageScanner.registries.configuration.scanTable.header.progress", - getValue: (row: any) => { - let progress = Math.round( - (row.status.scannedImagesCount / row.status.imagesCount) * 100 - ); - return { progress }; - }, + getValue: (row: any) => row, formatter: "ProgressCell", sort: "progress", }, From 3eb024e2a8e05f8d27052f9e824268abc1c9497e Mon Sep 17 00:00:00 2001 From: Rush Kapoor Date: Fri, 15 Aug 2025 12:44:46 -0700 Subject: [PATCH 2/2] fix: Registry details Recent scans table l10n error --- pkg/sbombastic-image-vulnerability-scanner/l10n/en-us.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/sbombastic-image-vulnerability-scanner/l10n/en-us.yaml b/pkg/sbombastic-image-vulnerability-scanner/l10n/en-us.yaml index f16eb8c..0ae97d8 100644 --- a/pkg/sbombastic-image-vulnerability-scanner/l10n/en-us.yaml +++ b/pkg/sbombastic-image-vulnerability-scanner/l10n/en-us.yaml @@ -59,7 +59,7 @@ imageScanner: status: Status since: Since progress: Progress - imagesScanned: Images scan + imagesScanned: Images scanned imagesFound: Images found error: Error messages: