ux(storage): hide 'Eltávolítás a listából' on wizard-enrolled drives
List-removal only deletes the registry entry — it's the undo of a manual path add. On an enrolled drive (/mnt/felhom-drives/) it leaves a de-registered-but-still-bound limbo nobody wants; the real lifecycle there is Biztonságos leválasztás / Végleges leszerelés. New StoragePathView.IsEnrolled gates the button; manual paths keep it; the decommissioned-branch removal (final cleanup) is unchanged. Endpoint untouched.
This commit is contained in:
@@ -109,6 +109,7 @@ type StoragePathView struct {
|
||||
StoppedApps []string // stacks auto-stopped due to disconnect (for restart UI)
|
||||
MigratedToLabel string // label of the drive data was migrated to
|
||||
HasOtherPaths bool // true if other connected non-decommissioned paths exist
|
||||
IsEnrolled bool // enrolled via the wizard (stable /mnt/felhom-drives/ path) — lifecycle is disconnect/decommission, not list-removal
|
||||
}
|
||||
|
||||
func (s *Server) baseData(page, title string) map[string]interface{} {
|
||||
@@ -964,6 +965,7 @@ func (s *Server) storagePageData() map[string]interface{} {
|
||||
StoragePath: sp,
|
||||
StoppedApps: sp.StoppedStacks,
|
||||
HasOtherPaths: connectedCount > 1,
|
||||
IsEnrolled: strings.HasPrefix(sp.Path, "/mnt/felhom-drives/"),
|
||||
}
|
||||
if sp.Disconnected {
|
||||
// Skip I/O calls on disconnected drives — they'd hang or fail
|
||||
|
||||
Reference in New Issue
Block a user