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:
+19
-6
@@ -38,12 +38,25 @@ type SambaShare struct {
|
||||
}
|
||||
|
||||
type NFSExport struct {
|
||||
ID int64 `json:"id"`
|
||||
Path string `json:"path"`
|
||||
Clients []string `json:"clients"`
|
||||
Options string `json:"options"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
ID int64 `json:"id"`
|
||||
Path string `json:"path"`
|
||||
Clients []string `json:"clients"`
|
||||
ReadOnly bool `json:"read_only"`
|
||||
Async bool `json:"async"`
|
||||
RootSquash bool `json:"root_squash"`
|
||||
SubtreeCheck bool `json:"subtree_check"`
|
||||
FSID int64 `json:"fsid"`
|
||||
Advanced string `json:"advanced"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
}
|
||||
|
||||
type NFSAdvanced struct {
|
||||
AllSquash bool `json:"all_squash"`
|
||||
Secure bool `json:"secure"`
|
||||
WDelay bool `json:"wdelay"`
|
||||
Hide bool `json:"hide"`
|
||||
Crossmnt bool `json:"crossmnt"`
|
||||
}
|
||||
|
||||
type DirtyModule struct {
|
||||
|
||||
Reference in New Issue
Block a user