Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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",
},
Expand Down
2 changes: 1 addition & 1 deletion pkg/sbombastic-image-vulnerability-scanner/l10n/en-us.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ imageScanner:
status: Status
since: Since
progress: Progress
imagesScanned: Images scan
imagesScanned: Images scanned
imagesFound: Images found
error: Error
messages:
Expand Down