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:
@@ -15,6 +15,16 @@ export interface ParentAssignment {
|
||||
parentId: string
|
||||
}
|
||||
|
||||
export function getValidParentTypes(childType: NodeType): NodeType[] {
|
||||
if (childType === 'lxc' || childType === 'vm') {
|
||||
return ['proxmox', 'vm', 'lxc', 'docker_host']
|
||||
}
|
||||
if (childType === 'docker_container') {
|
||||
return ['docker_host', 'lxc', 'vm', 'proxmox']
|
||||
}
|
||||
return []
|
||||
}
|
||||
|
||||
export function resolveVirtualEdgeParent(
|
||||
source: VirtualEdgeEndpoint,
|
||||
target: VirtualEdgeEndpoint,
|
||||
|
||||
Reference in New Issue
Block a user