mirror of
https://github.com/lukaszraczylo/gohoarder.git
synced 2026-06-05 22:53:53 +00:00
Add blocked packages counter and storage progress bar
Backend: - Add blocked_packages count to stats API by checking vulnerabilities against thresholds - Add max_cache_size to stats API from config - Add isBlocked field to package API responses Frontend: - Add blocked_packages and max_cache_size to Stats interface - Add blocked packages counter card to stats page with fa-hand icon - Add storage usage progress bar with color coding (green/yellow/orange/red) - Add /blocked-packages route that filters vulnerable packages by isBlocked - Update VulnerabilityBadge to show BLOCKED badge with fa-hand icon - Fix TypeScript imports for useRoute in VulnerablePackages Features: - Stats page now shows blocked packages count (clickable) - Storage display shows usage vs max with visual progress bar - Blocked packages view accessible from stats page - All blocked indicators use fa-hand icon instead of fa-ban
This commit is contained in:
@@ -159,7 +159,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed, onMounted, ref } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { useRouter, useRoute } from 'vue-router'
|
||||
import { usePackageStore, type Package } from '../stores/packages'
|
||||
import { Alert, AlertDescription } from '@/components/ui/alert'
|
||||
import { Card, CardContent } from '@/components/ui/card'
|
||||
|
||||
@@ -34,9 +34,11 @@ export interface Stats {
|
||||
registry: string
|
||||
total_packages: number
|
||||
total_size: number
|
||||
max_cache_size: number
|
||||
total_downloads: number
|
||||
scanned_packages: number
|
||||
vulnerable_packages: number
|
||||
blocked_packages: number
|
||||
}
|
||||
|
||||
export const usePackageStore = defineStore('packages', () => {
|
||||
|
||||
Reference in New Issue
Block a user