FleetHealth PR 2 (frontend): human-oriented landing + advanced menu
Build with clawstor cache / Cargo build (clawstor-cached) (pull_request) Successful in 18s
Build with clawstor cache / Cargo build (clawstor-cached) (pull_request) Successful in 18s
Reworks the SPA around the new DashboardStatus fields. The landing is now a fleet-health dashboard aimed at a layperson — disk gauges, mount ✓/✗, cache hit rate, next scheduled job. No hex, no primitives. Nav restructure: * Primary: 'Fleet health' (just the landing). * 'View Advanced ▾' dropdown reveals: Blobs / Tags / Refs / Snapshots / Ref-tracking. Routes moved under /advanced/*. New components: * StorageBar — horizontal used/total bar with pinned/evictable split, health-color threshold at 60/85%. * NodeCard — traffic-light dot + disk + hot tier bars + mount state + cache hit rate + next-timer countdown. Whole card is a link into node detail. New CommandCenter: * Fleet-wide storage roll-up card (sum of every node's disk). * Grid of NodeCards. * 10s poll cadence retained from previous version. Existing StorageBrowser + RefTrackingPage moved behind /advanced/* routes; internal component code untouched.
This commit is contained in:
@@ -1,6 +1,38 @@
|
||||
// Thin fetch wrappers around /api/v2/*. Kept minimal — no state
|
||||
// library; each page owns its own useEffect + useState.
|
||||
|
||||
export interface FilesystemUsage {
|
||||
mount_point: string;
|
||||
total_bytes: number;
|
||||
available_bytes: number;
|
||||
used_bytes: number;
|
||||
}
|
||||
|
||||
export interface HotTierUsage {
|
||||
used_bytes: number;
|
||||
max_bytes: number;
|
||||
pinned_bytes: number | null;
|
||||
}
|
||||
|
||||
export interface MountStatus {
|
||||
path: string;
|
||||
active: boolean;
|
||||
}
|
||||
|
||||
export interface CacheSummary {
|
||||
hits: number;
|
||||
misses: number;
|
||||
bytes_served: number;
|
||||
bytes_ingested: number;
|
||||
hit_rate: number;
|
||||
}
|
||||
|
||||
export interface TimerStatus {
|
||||
unit: string;
|
||||
next_fire_unix: number | null;
|
||||
last_result: string | null;
|
||||
}
|
||||
|
||||
export interface NodeStatusV2 {
|
||||
node_name: string;
|
||||
zone: string;
|
||||
@@ -12,6 +44,11 @@ export interface NodeStatusV2 {
|
||||
ref_tracking_count: number;
|
||||
blob_store_bytes: number;
|
||||
rustc_release: string | null;
|
||||
filesystem: FilesystemUsage | null;
|
||||
hot: HotTierUsage | null;
|
||||
mount: MountStatus | null;
|
||||
cache: CacheSummary | null;
|
||||
timers: TimerStatus[];
|
||||
online: boolean;
|
||||
error: string | null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user