Skip to content

Commit 9f72ccc

Browse files
rushk014xingzhang-suse
authored andcommitted
revert: 98a69d9
Revert changes to RegistryDetails.vue in 98a69d9
1 parent 98a69d9 commit 9f72ccc

File tree

1 file changed

+7
-30
lines changed

1 file changed

+7
-30
lines changed

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

Lines changed: 7 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,7 @@
2727
</div>
2828
<RancherMeta :properties="registryMetadata" />
2929
</div>
30-
Recent scans
31-
<ResourceTable
32-
:headers="headers"
33-
:rows="scanHistory"
34-
:namespaced="false"
35-
:rowActions="false"
36-
:search="false"
37-
class="table"
38-
/>
30+
<RegistryDetailScanTable :registry="registry" />
3931
</div>
4032
</template>
4133

@@ -46,6 +38,7 @@
4638
import RancherMeta from './common/RancherMeta.vue';
4739
import RegisterStatusBadge from './common/RegisterStatusBadge.vue';
4840
import { REGISTRY_SCAN_HISTORY_TABLE } from '@sbombastic-image-vulnerability-scanner/config/table-headers';
41+
import RegistryDetailScanTable from './RegistryDetailScanTable.vue';
4942
5043
export default {
5144
name: 'registryDetails',
@@ -54,15 +47,15 @@
5447
ResourceTable,
5548
RancherMeta,
5649
RegisterStatusBadge,
50+
RegistryDetailScanTable
5751
},
5852
data() {
5953
return {
6054
PRODUCT_NAME,
6155
RESOURCE,
56+
registry: null,
6257
registryStatus: null,
6358
registryMetadata: [],
64-
scanHistory: [],
65-
headers: REGISTRY_SCAN_HISTORY_TABLE
6659
}
6760
},
6861
async fetch() {
@@ -89,7 +82,7 @@
8982
{
9083
type: 'text',
9184
label: this.t('imageScanner.registries.configuration.meta.repositories'),
92-
value: registry.spec.repositories.length
85+
value: registry.spec.repositories?.length || 0
9386
},
9487
{
9588
type: 'text',
@@ -110,19 +103,7 @@
110103
}
111104
];
112105
113-
this.scanHistory = scanJobs.map((rec) => {
114-
rec.status.statusResult = rec.status.conditions.filter(condition => {
115-
return condition.status === "True";
116-
})[0] || {
117-
type: "Pending",
118-
lastTransitionTime: null,
119-
};
120-
rec.status['scannedImagesCount'] = this.$route.params.id === 'kw-controller' ? 1000 : 500;
121-
rec.status['imagesCount'] = 2000;
122-
return rec;
123-
});
124-
125-
console.log("Scan history:", this.scanHistory);
106+
this.registry = registry;
126107
},
127108
methods: {
128109
getRegistryStatus(registry) {
@@ -150,10 +131,6 @@
150131
gap: 24px;
151132
flex: 1 0 0;
152133
align-self: stretch;
153-
154-
.table {
155-
width: 100%;
156-
}
157134
}
158135
159136
.about {
@@ -202,7 +179,7 @@
202179
.resource-header-description {
203180
/* layout */
204181
display: flex;
205-
width: 900px;
182+
max-width: 900px;
206183
height: 21px;
207184
flex-direction: column;
208185
justify-content: center;

0 commit comments

Comments
 (0)