mirror of
https://github.com/lukaszraczylo/gohoarder.git
synced 2026-11-26 06:37:07 +00:00
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.
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
<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>
|
||||
Reference in New Issue
Block a user