mirror of
https://github.com/lukaszraczylo/gohoarder.git
synced 2026-11-26 06:37:07 +00:00
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.
19 lines
611 B
Vue
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>
|