Files
gohoarder/frontend/src/components/SeveritySummary.vue
T
lukaszraczylo 041c6e8012 feat(frontend): rebuild the dashboard and stats on library components
KpiTile and StatGroup carry the totals, BarChart draws download activity,
ActivityFeed lists live events and DataTable lists recent packages and
registries. Loading, empty and error states use the library states. Severity
badges are StatusBadge with the tones critical danger, high warning, moderate
info and low neutral, and always print the word.
2026-11-23 02:29:13 +00:00

19 lines
611 B
Vue

<template>
<StatGroup :columns="4" :aria-label="label">
<KpiTile v-for="level in SEVERITY_LEVELS" :key="level" :label="formatSeverityName(level)" :value="counts[level]">
<template #icon><StatusDot :tone="SEVERITY_TONES[level]" /></template>
</KpiTile>
</StatGroup>
</template>
<script setup lang="ts">
import { KpiTile, StatGroup, StatusDot } from '@perfect-design/ui'
import type { VulnerabilityCounts } from '../stores/packages'
import { SEVERITY_LEVELS, SEVERITY_TONES, formatSeverityName } from '@/lib/severity'
defineProps<{
counts: VulnerabilityCounts
label: string
}>()
</script>