feat(adminui): UNS-tree delete for Cluster + Enterprise (refuse-if-children, no rowversion)

This commit is contained in:
Joseph Doherty
2026-06-16 16:35:07 -04:00
parent 6a8020e7e7
commit 526eebb3bb
5 changed files with 349 additions and 3 deletions
@@ -303,8 +303,19 @@
result = await Svc.DeleteEquipmentAsync(node.EntityId!, equipment.RowVersion);
break;
case UnsNodeKind.Cluster:
// Cluster carries no RowVersion (Option B); EntityId mirrors the ClusterId.
result = await Svc.DeleteClusterAsync(node.EntityId!);
break;
case UnsNodeKind.Enterprise:
// Enterprise is a tree label, not an entity — its name is the DisplayName.
// Deletes every cluster carrying that label (refuse-if-children, all-or-nothing).
result = await Svc.DeleteEnterpriseAsync(node.DisplayName);
break;
default:
// Enterprise/Cluster have no delete button, so this branch is unreachable in practice.
// Tag/VirtualTag are not deletable from the global tree.
result = new UnsMutationResult(false, "Delete for this node kind is not yet available.");
break;
}