refactor(web): remove deprecated dashboard components and enhance KPI grid
quality / commitlint (push) Skipped
quality / changes (push) Successful in 9s
quality / docker-check (push) Skipped
quality / openapi (push) Successful in 46s
quality / web (push) Successful in 1m16s
quality / go (push) Successful in 2m42s
quality / bird2 (push) Successful in 16s
CD / quality (push) Successful in 5m19s
CD / publish (push) Successful in 7m19s

- Deleted unused components: `DashboardActivityTimeline`, `DashboardFramePanel`, `DashboardModulesGrid`, `DashboardRecentJobsGrid`, and `DashboardRecentRevisionsGrid` to streamline the dashboard.
- Updated `DashboardKpiGrid` to improve KPI display logic, including progress indicators and enhanced badge functionality.
- Refactored `DashboardNetworkHealth` to provide better status representation based on loading states and network conditions.
- Introduced new properties for KPI cards to support progress tracking and improved visual feedback.

This cleanup aims to enhance performance and maintainability of the dashboard while providing a better user experience.
This commit is contained in:
Denozordec
2026-08-31 10:15:59 +07:00
parent e469c421ca
commit dc803bcb34
51 changed files with 1895 additions and 1078 deletions
+15
View File
@@ -116,11 +116,19 @@ type Backend interface {
GetModulePrefixSnapshot(tenantID, moduleID string) (*ModulePrefixSnapshot, bool, error)
SetModulePrefixSnapshot(tenantID, moduleID, inputHash string, prefixes []PrefixRow) error
DeleteModulePrefixSnapshot(tenantID, moduleID string) error
// SetModuleInputHash stores the ingest fingerprint on the module row (O(1) snapshot check).
SetModuleInputHash(tenantID, moduleID, hash string) error
// LockModuleSnapshot serializes read-modify-write of one module snapshot; unlock must be called.
LockModuleSnapshot(tenantID, moduleID string) (unlock func())
// ASNPrefixCache stores RIPEstat announced-prefixes per ASN (global TTL cache).
GetASNPrefixCache(asn int64) (*ASNPrefixCacheEntry, bool, error)
SetASNPrefixCache(asn int64, holder string, prefixes []string) error
// DomainResolveCache stores DoH results per FQDN (global TTL cache).
GetDomainResolveCache(fqdn string) (*DomainResolveCacheEntry, bool, error)
SetDomainResolveCache(fqdn string, addrs []string) error
// Ping verifies backend connectivity (no-op for in-memory).
Ping(ctx context.Context) error
@@ -178,6 +186,13 @@ type ASNPrefixCacheEntry struct {
FetchedAt time.Time
}
// DomainResolveCacheEntry is a cached DoH A/AAAA result for one FQDN.
type DomainResolveCacheEntry struct {
FQDN string
Addrs []string
ResolvedAt time.Time
}
// ModulePrefixSnapshot is the cached materialization for one module between refreshes.
type ModulePrefixSnapshot struct {
InputHash string