feat(node-modal): restore Parent Container selector for child types

Adds back the Parent Container selector in NodeModal, shown when:
- child type is lxc or vm (parents: proxmox/vm/lxc/docker_host)
- child type is docker_container (parents: docker_host/lxc/vm/proxmox)

Selector hidden when no valid candidate node exists on the canvas.
Centralizes the parent-type allowlist in getValidParentTypes
(shared with the virtual-edge auto-parent helper).

ha-relevant: yes
This commit is contained in:
Pouzor
2026-05-16 17:08:06 +02:00
parent 43426e96ac
commit 3a4df578ec
4 changed files with 92 additions and 6 deletions
+3
View File
@@ -550,6 +550,7 @@ export default function App() {
onClose={() => setAddNodeOpen(false)}
onSubmit={handleAddNode}
title="Add Node"
parentCandidates={nodes.map((n) => ({ id: n.id, label: n.data.label ?? n.id, type: n.data.type }))}
/>
{/* key forces re-mount when editing a different node, resetting form state */}
@@ -560,6 +561,8 @@ export default function App() {
onSubmit={handleUpdateNode}
initial={editNode?.data}
title="Edit Node"
parentCandidates={nodes.map((n) => ({ id: n.id, label: n.data.label ?? n.id, type: n.data.type }))}
currentNodeId={editNodeId ?? undefined}
/>
<EdgeModal