34 lines
980 B
Vue
34 lines
980 B
Vue
<script setup lang="ts">
|
|
import AuditTable from "@/base/AuditTable.vue";
|
|
import { computed, onMounted } from "vue";
|
|
import { storeToRefs } from "pinia";
|
|
|
|
import PageHeader from "@/base/PageHeader.vue";
|
|
import { resourcesForPage, useControlPlaneStore } from "@/stores/control-plane";
|
|
import StructuredResourceCard from "./StructuredResourceCard.vue";
|
|
|
|
const controlPlane = useControlPlaneStore();
|
|
const { catalog, catalogError } = storeToRefs(controlPlane);
|
|
const resources = computed(() =>
|
|
resourcesForPage(catalog.value, "repositories"),
|
|
);
|
|
onMounted(controlPlane.load);
|
|
</script>
|
|
|
|
<template>
|
|
<div>
|
|
<PageHeader title="Repositories" />
|
|
|
|
<p v-if="catalogError" class="text-sm text-destructive" role="alert">
|
|
{{ catalogError }}
|
|
</p>
|
|
<StructuredResourceCard
|
|
v-for="descriptor in resources"
|
|
:key="descriptor.kind"
|
|
:descriptor="descriptor"
|
|
root-path="repositories"
|
|
/>
|
|
<AuditTable :resources="resources" />
|
|
</div>
|
|
</template>
|