Skip to content
Merged
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 @@ -27,15 +27,7 @@
</div>
<RancherMeta :properties="registryMetadata" />
</div>
Recent scans
<ResourceTable
:headers="headers"
:rows="scanHistory"
:namespaced="false"
:rowActions="false"
:search="false"
class="table"
/>
<RegistryDetailScanTable :registry="registry" />
</div>
</template>

Expand All @@ -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',
Expand All @@ -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() {
Expand All @@ -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',
Expand All @@ -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) {
Expand Down Expand Up @@ -150,10 +131,6 @@
gap: 24px;
flex: 1 0 0;
align-self: stretch;

.table {
width: 100%;
}
}

.about {
Expand Down Expand Up @@ -202,7 +179,7 @@
.resource-header-description {
/* layout */
display: flex;
width: 900px;
max-width: 900px;
height: 21px;
flex-direction: column;
justify-content: center;
Expand Down