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
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:
@@ -44,7 +44,9 @@ type Memory struct {
|
||||
settings map[string]map[string]any // tenantID -> key -> JSON-compatible value
|
||||
revPrefixes map[string][]PrefixRow
|
||||
moduleSnapshots map[string]*moduleSnapshotRec
|
||||
snapshotLocks sync.Map // key -> *sync.Mutex (per-module snapshot RMW)
|
||||
asnPrefixCache map[int64]*ASNPrefixCacheEntry
|
||||
domainResolveCache map[string]*DomainResolveCacheEntry
|
||||
apiKeys map[string]*apiKeyRec
|
||||
firewallClients map[string]*firewallClientRec
|
||||
firewallRules map[string]*FirewallRule
|
||||
@@ -99,6 +101,7 @@ type Module struct {
|
||||
LastRefreshedAt *time.Time
|
||||
DeletedAt *time.Time
|
||||
CreatedByUserID string // portal JWT sub; empty = system / API key
|
||||
InputHash string // ingest fingerprint; empty = not yet computed
|
||||
}
|
||||
|
||||
type Revision struct {
|
||||
@@ -156,6 +159,7 @@ func NewMemory() *Memory {
|
||||
revPrefixes: make(map[string][]PrefixRow),
|
||||
moduleSnapshots: make(map[string]*moduleSnapshotRec),
|
||||
asnPrefixCache: make(map[int64]*ASNPrefixCacheEntry),
|
||||
domainResolveCache: make(map[string]*DomainResolveCacheEntry),
|
||||
apiKeys: make(map[string]*apiKeyRec),
|
||||
firewallClients: make(map[string]*firewallClientRec),
|
||||
firewallRules: make(map[string]*FirewallRule),
|
||||
@@ -696,6 +700,20 @@ func cloneStringPtr(s *string) *string {
|
||||
return &v
|
||||
}
|
||||
|
||||
func (m *Memory) clearModuleInputHashLocked(moduleID string) {
|
||||
if mod, ok := m.modules[moduleID]; ok && mod != nil {
|
||||
mod.InputHash = ""
|
||||
}
|
||||
}
|
||||
|
||||
func (m *Memory) clearTenantModuleHashesLocked(tenantID string) {
|
||||
for _, mod := range m.modules {
|
||||
if mod != nil && mod.TenantID == tenantID && mod.DeletedAt == nil {
|
||||
mod.InputHash = ""
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func cloneModule(m *Module) *Module {
|
||||
if m == nil {
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user