feat: add storage info to settings page and improve NFS export handling
Backend: - Add source/used_by/available/error fields to diskUsage in system status - collectDiskUsage() now reads /proc/mounts, samba shares and NFS exports from DB - Paths are deduplicated; shared paths list all shares/exports using them - syscall.Statfs errors surface as available=false with user-facing error - collectServiceStatus made a method of Server (receiver consistency) Frontend: - Settings page now shows two cards: mount points and shared resources - Each path shows source badge (Sistema/Mount/SMB/NFS), used_by chips, progress bar - Unavailable paths show amber warning instead of progress bar - DiskUsage interface updated with new fields - NFSExport interface updated with structured fields (fsid, async, etc) - NFS page updated to use new export fields
This commit is contained in:
+10
-1
@@ -13,7 +13,12 @@ export interface NFSExport {
|
||||
id: number;
|
||||
path: string;
|
||||
clients: string[];
|
||||
options: string;
|
||||
read_only: boolean;
|
||||
async: boolean;
|
||||
root_squash: boolean;
|
||||
subtree_check: boolean;
|
||||
fsid: number;
|
||||
advanced: string;
|
||||
}
|
||||
|
||||
export interface User {
|
||||
@@ -43,6 +48,10 @@ export interface DiskUsage {
|
||||
free_bytes: number;
|
||||
used_bytes: number;
|
||||
used_percent: number;
|
||||
source: "system" | "mount" | "samba" | "nfs";
|
||||
used_by?: string[];
|
||||
available: boolean;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface ServiceStatus {
|
||||
|
||||
Reference in New Issue
Block a user