fix(ipam): require resource name before allocating IP and fill missing fields on VM link
- Validate resource name in auto-allocate form before sending request - Fill resource_name, proxmox_node, resource_type, mac_address when syncing a VM that already has matching vmid/server_id but missing metadata Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -97,6 +97,7 @@ function AllocateCard() {
|
||||
};
|
||||
const handleAllocate = () => {
|
||||
if (!networkId) { toast.error(t('ipam.select_network')); return; }
|
||||
if (!resourceName.trim()) { toast.error(t('ipam.resource_required')); return; }
|
||||
autoAllocate.mutate(
|
||||
{ network_id: Number(networkId), resource_name: resourceName || undefined, hostname: hostname || undefined },
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user