File tree Expand file tree Collapse file tree 2 files changed +17
-16
lines changed
pkg/sbombastic-image-vulnerability-scanner Expand file tree Collapse file tree 2 files changed +17
-16
lines changed Original file line number Diff line number Diff line change 106
106
value: registry .metadata .schedule || ' ' ,
107
107
}
108
108
];
109
-
110
- this .scanHistory = scanJobs .map ((rec ) => {
111
- rec .status .statusResult = rec .status .conditions .filter (condition => {
112
- return condition .status === " True" ;
113
- })[0 ] || {
114
- type: " Pending" ,
115
- lastTransitionTime: null ,
116
- };
117
- return rec;
109
+
110
+ scanJobs .forEach ((rec ) => {
111
+ this .scanHistory .push ({
112
+ ... rec,
113
+ progress: rec .status .scannedImagesCount && rec .status .imagesCount ? Math .ceil (rec .status .scannedImagesCount / rec .status .imagesCount * 100 ) : 0 ,
114
+ status: {
115
+ ... rec .status ,
116
+ statusResult: rec .status .conditions .filter (condition => {
117
+ return condition .status === " True" ;
118
+ })[0 ] || {
119
+ type: " Pending" ,
120
+ lastTransitionTime: null ,
121
+ }
122
+ }
123
+ })
118
124
});
119
125
},
120
126
getRegistryStatus (registry ) {
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ export const REGISTRY_SCAN_TABLE = [
44
44
{
45
45
name : "progress" ,
46
46
labelKey : "imageScanner.registries.registrytable.header.progress" ,
47
- getValue : ( row : any ) => row ,
47
+ getValue : ( row : any ) => row ,
48
48
formatter : "ProgressCell" ,
49
49
sort : "progress" ,
50
50
width : 120 ,
@@ -78,12 +78,7 @@ export const REGISTRY_SCAN_HISTORY_TABLE = [
78
78
{
79
79
name : "progress" ,
80
80
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 ,
87
82
formatter : "ProgressCell" ,
88
83
sort : "progress" ,
89
84
} ,
You can’t perform that action at this time.
0 commit comments