History replaces the Audit card on every settings page: one change log for all settings, filterable by section, actor and time window, with the filters in the query so each page's History link opens it filtered to that page. Rows show the old and new value as a diff and expand to the full value; Restore still puts a resource back to the version before a change. The sidebar's edge drags (or takes arrow keys) between 180 and 420px, resets on double-click and remembers its width per browser.
60 lines
1.9 KiB
Vue
60 lines
1.9 KiB
Vue
<script setup lang="ts">
|
|
import HistoryLink from "@/settings/HistoryLink.vue";
|
|
import { computed, onMounted } from "vue";
|
|
import { storeToRefs } from "pinia";
|
|
|
|
import PageHeader from "@/base/PageHeader.vue";
|
|
import { Button } from "@/components/ui/button";
|
|
import { resourcesForPage, useControlPlaneStore } from "@/stores/control-plane";
|
|
import ConfigCard from "./ConfigCard.vue";
|
|
import DangerousActionsCard from "./DangerousActionsCard.vue";
|
|
import StructuredResourceCard from "./StructuredResourceCard.vue";
|
|
import { loadDangerous } from "./state";
|
|
|
|
const controlPlane = useControlPlaneStore();
|
|
const { catalog, catalogError } = storeToRefs(controlPlane);
|
|
const resources = computed(() => resourcesForPage(catalog.value, "advanced"));
|
|
async function load(): Promise<void> {
|
|
await Promise.all([controlPlane.load(), loadDangerous()]);
|
|
}
|
|
|
|
onMounted(load);
|
|
</script>
|
|
|
|
<template>
|
|
<div>
|
|
<PageHeader title="Advanced">
|
|
<HistoryLink :kinds="resources.map((r) => r.kind)" />
|
|
</PageHeader>
|
|
|
|
<p v-if="catalogError" class="text-sm text-destructive" role="alert">
|
|
{{ catalogError }}
|
|
</p>
|
|
<StructuredResourceCard
|
|
v-for="descriptor in resources"
|
|
:key="descriptor.kind"
|
|
:descriptor="descriptor"
|
|
/>
|
|
<ConfigCard title="Managed elsewhere">
|
|
<div class="flex flex-wrap gap-2">
|
|
<Button as-child variant="outline"
|
|
><RouterLink :to="'/events?tab=inspector'"
|
|
>Captured events</RouterLink
|
|
></Button
|
|
>
|
|
<Button as-child variant="outline"
|
|
><RouterLink :to="'/events?tab=mappings'"
|
|
>Capture mappings</RouterLink
|
|
></Button
|
|
>
|
|
<Button as-child variant="outline"
|
|
><RouterLink :to="'/events?tab=bindings'"
|
|
>Capture bindings</RouterLink
|
|
></Button
|
|
>
|
|
</div>
|
|
</ConfigCard>
|
|
<DangerousActionsCard />
|
|
</div>
|
|
</template>
|