feat(ui): redesign the dashboard as a package checkpoint

Add overview, packages with quick view, package detail tabs, a merged security page, insights, system and restyled bypasses. Old vulnerable and blocked routes redirect to the matching security tab.
This commit is contained in:
2026-11-24 01:13:09 +00:00
parent 45aa4bcace
commit 671bb0625b
50 changed files with 3022 additions and 1937 deletions
@@ -0,0 +1,25 @@
<template>
<p class="m-0 flex flex-wrap items-center gap-x-3 gap-y-1 text-sm text-muted-foreground" data-testid="policy-line">
<template v-if="info">
<span class="font-medium text-foreground">Policy</span>
<span>{{ describePolicy(info.security) }}</span>
<span v-if="info.security.enabled">{{ info.security.fail_closed ? 'Fail-closed' : 'Fail-open on scanner outage' }}.</span>
<span v-if="info.security.enabled">{{ enabledScanners }} of {{ info.security.scanners.length }} scanners on.</span>
<Link :as="RouterLink" to="/admin/system">System settings</Link>
</template>
<span v-else-if="error">Policy unavailable: {{ error }}</span>
<span v-else>Loading policy...</span>
</p>
</template>
<script setup lang="ts">
import { computed, onMounted } from 'vue'
import { RouterLink } from 'vue-router'
import { Link } from '@perfect-design/ui'
import { describePolicy, useSystem } from '@/lib/system'
const { info, error, load } = useSystem()
const enabledScanners = computed(() => info.value?.security.scanners.filter((s) => s.enabled).length ?? 0)
onMounted(() => void load())
</script>