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:
2026-07-05 22:56:39 -04:00
parent 72a8336087
commit 65cd753818
14 changed files with 696 additions and 100 deletions
@@ -0,0 +1,9 @@
ALTER TABLE nfs_exports
ADD COLUMN read_only INTEGER NOT NULL DEFAULT 0,
ADD COLUMN async_ INTEGER NOT NULL DEFAULT 0,
ADD COLUMN root_squash INTEGER NOT NULL DEFAULT 1,
ADD COLUMN subtree_check INTEGER NOT NULL DEFAULT 0,
ADD COLUMN fsid INTEGER NOT NULL DEFAULT 0,
ADD COLUMN advanced TEXT NOT NULL DEFAULT '{}';
CREATE INDEX IF NOT EXISTS idx_nfs_exports_fsid ON nfs_exports(fsid);