diff --git a/pkg/sbombastic-image-vulnerability-scanner/components/RegistryDetails.vue b/pkg/sbombastic-image-vulnerability-scanner/components/RegistryDetails.vue index e0cebf2..bcd9a68 100644 --- a/pkg/sbombastic-image-vulnerability-scanner/components/RegistryDetails.vue +++ b/pkg/sbombastic-image-vulnerability-scanner/components/RegistryDetails.vue @@ -27,15 +27,7 @@ - Recent scans - + @@ -46,6 +38,7 @@ import RancherMeta from './common/RancherMeta.vue'; import RegisterStatusBadge from './common/RegisterStatusBadge.vue'; import { REGISTRY_SCAN_HISTORY_TABLE } from '@sbombastic-image-vulnerability-scanner/config/table-headers'; + import RegistryDetailScanTable from './RegistryDetailScanTable.vue'; export default { name: 'registryDetails', @@ -54,15 +47,15 @@ ResourceTable, RancherMeta, RegisterStatusBadge, + RegistryDetailScanTable }, data() { return { PRODUCT_NAME, RESOURCE, + registry: null, registryStatus: null, registryMetadata: [], - scanHistory: [], - headers: REGISTRY_SCAN_HISTORY_TABLE } }, async fetch() { @@ -89,7 +82,7 @@ { type: 'text', label: this.t('imageScanner.registries.configuration.meta.repositories'), - value: registry.spec.repositories.length + value: registry.spec.repositories?.length || 0 }, { type: 'text', @@ -110,19 +103,7 @@ } ]; - this.scanHistory = scanJobs.map((rec) => { - rec.status.statusResult = rec.status.conditions.filter(condition => { - return condition.status === "True"; - })[0] || { - type: "Pending", - lastTransitionTime: null, - }; - rec.status['scannedImagesCount'] = this.$route.params.id === 'kw-controller' ? 1000 : 500; - rec.status['imagesCount'] = 2000; - return rec; - }); - - console.log("Scan history:", this.scanHistory); + this.registry = registry; }, methods: { getRegistryStatus(registry) { @@ -150,10 +131,6 @@ gap: 24px; flex: 1 0 0; align-self: stretch; - - .table { - width: 100%; - } } .about { @@ -202,7 +179,7 @@ .resource-header-description { /* layout */ display: flex; - width: 900px; + max-width: 900px; height: 21px; flex-direction: column; justify-content: center;