File tree Expand file tree Collapse file tree 5 files changed +25
-18
lines changed
pkg/sbombastic-image-vulnerability-scanner
pages/c/_cluster/sbombastic-image-vulnerability-scanner Expand file tree Collapse file tree 5 files changed +25
-18
lines changed Original file line number Diff line number Diff line change @@ -44,22 +44,18 @@ export const REGISTRY_SCAN_TABLE = [
44
44
{
45
45
name : "progress" ,
46
46
labelKey : "imageScanner.registries.registrytable.header.progress" ,
47
- getValue : ( row : any ) => {
48
- return {
49
- progress : row . progress ,
50
- error : row . error ,
51
- } ;
52
- } ,
47
+ getValue : ( row : any ) => row ,
53
48
formatter : "ProgressCell" ,
54
49
sort : "progress" ,
50
+ width : 120 ,
55
51
} ,
56
52
{
57
53
name : "previousScan" ,
58
54
labelKey : "imageScanner.registries.registrytable.header.prevScan" ,
59
55
getValue : ( row : any ) => row ,
60
56
formatter : "PreviousScanCell" ,
61
57
sort : "previousScan" ,
62
- width : 150 ,
58
+ width : 200 ,
63
59
} ,
64
60
] ;
65
61
Original file line number Diff line number Diff line change 1
1
<script >
2
2
import ProgressCell from " @sbombastic-image-vulnerability-scanner/formatters/ProgressCell" ;
3
3
export default {
4
+ components: {
5
+ ProgressCell
6
+ },
7
+ name: " PreviousScanCell" ,
4
8
props: {
5
9
value: {
6
10
type: String ,
@@ -28,12 +32,12 @@ export default {
28
32
<template>
29
33
<div class="previous-scan-cell">
30
34
<div class="dot" :class="getStatusDotClass(row)"></div>
31
- <div class="status" :class="getStatusLabelClass(row)">{{ getStatusText(row) }}</div>
35
+ <div class="status" :class="getStatusLabelClass(row)">{{ getStatusText(row) }}</div>
32
36
<div v-if="row.prevProgress">
33
- <ProgressCell :status ="{ progress: row.prevProgress, error: row.error }" />
37
+ <span>{{ t("imageScanner.general.at") }}</span>< ProgressCell style="display: inline-block;" :row ="{ progress: row.prevProgress, error: null }" />
34
38
</div>
35
- <div v-if="row.prevScanStatus.toLowerCase() === 'failed' && row.error ">
36
- <span class="error-message">|<span style="margin-left: 10px ;">{{ t("imageScanner.general.error") }}</span></span>
39
+ <div v-if="row.prevScanStatus.toLowerCase() === 'failed' && row.PrevError ">
40
+ <span class="error-message">|<span style="margin-left: 8px ;">{{ t("imageScanner.general.error") }}</span></span>
37
41
</div>
38
42
</div>
39
43
</template>
Original file line number Diff line number Diff line change 1
1
<script >
2
2
export default {
3
3
props: {
4
- value : {
4
+ row : {
5
5
type: Object ,
6
6
required: true
7
7
}
@@ -10,8 +10,13 @@ export default {
10
10
</script >
11
11
<template >
12
12
<div class =" progress-cell" >
13
- <span v-if =" value.progress" class =" progress-text" >{{ value.progress }}% | <span v-if =" value.error" >{{ value.error }}</span ></span >
13
+ <span v-if =" row.progress" class =" progress-text" >{{ row.progress }}%
14
+ <span v-if =" row.error" >|
15
+ <span style =" margin-left : 4px ;" >{{ t("imageScanner.general.error") }}</span >
16
+ </span >
17
+ </span >
14
18
<span v-else class =" progress-text text-muted" >n/a</span >
19
+
15
20
</div >
16
21
</template >
17
22
<style lang="scss" scoped>
Original file line number Diff line number Diff line change @@ -135,6 +135,7 @@ imageScanner:
135
135
justNow : Just now
136
136
none : none
137
137
error : Error
138
+ at : at
138
139
139
140
typeLabel :
140
141
sbombastic.rancher.io.registry : Registries configuration
Original file line number Diff line number Diff line change @@ -212,11 +212,12 @@ import { template } from "lodash";
212
212
rec .id = ` ${ rec .metadata .namespace } /${ rec .metadata .name } ` ;
213
213
rec .currStatus = status;
214
214
rec .prevScanStatus = prevScanStatus;
215
- rec .progress = scanjobs[0 ] && scanjobs[0 ].status .imageCount && scanjobs[0 ].status .scannedImageCount ?
216
- Math .ceil (scanjobs[0 ].status .scannedImageCount / scanjobs[0 ].status .imageCount * 100 ) : 0 ;
217
- rec .prevProgress = scanjobs[1 ] && scanjobs[1 ].status .imageCount && scanjobs[1 ].status .scannedImageCount ?
218
- Math .ceil (scanjobs[1 ].status .scannedImageCount / scanjobs[1 ].status .imageCount * 100 ) : 0 ;
219
- rec .error = scanjobs[0 ] && scanjobs[0 ].status .statusResult .type === " Failed" ? scanjobs[0 ].status .statusResult .message : " " ;
215
+ rec .progress = scanjobs[0 ] && scanjobs[0 ].status .imagesCount && scanjobs[0 ].status .scannedImagesCount ?
216
+ Math .ceil (scanjobs[0 ].status .scannedImagesCount / scanjobs[0 ].status .imagesCount * 100 ) : 0 ;
217
+ rec .prevProgress = scanjobs[1 ] && scanjobs[1 ].status .imagesCount && scanjobs[1 ].status .scannedImagesCount ?
218
+ Math .ceil (scanjobs[1 ].status .scannedImagesCount / scanjobs[1 ].status .imagesCount * 100 ) : 0 ;
219
+ rec .error = scanjobs[0 ] && scanjobs[0 ].status .statusResult .type .toLowerCase () === " failed" ? scanjobs[0 ].status .statusResult .message : " " ;
220
+ rec .PrevError = scanjobs[1 ] && scanjobs[1 ].status .statusResult .type .toLowerCase () === " failed" ? scanjobs[1 ].status .statusResult .message : " " ;
220
221
221
222
// Summarize the data for Latest status updates panel
222
223
registryStatusList .push ({
You can’t perform that action at this time.
0 commit comments