feat(instances): add/remove network interface from Networking tab
- AddNetworkInterfaceDialog: bridge dropdown (node networks), model select for VM, VLAN tag, firewall, optional MAC; LXC extras: eth name, dhcp/static IP with CIDR + gateway; picks next free netN slot - NetworkingTab: Add interface button, per-NIC delete with confirmation (config.put delete=netN) - new useNodeNetworks hook; netif i18n keys (en/ru) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -645,6 +645,26 @@ export function useExecuteCommand(serverId: number, vmid: number) {
|
||||
});
|
||||
}
|
||||
|
||||
// ==================== Node networks (bridges) ====================
|
||||
export interface NodeNetworkIface {
|
||||
iface?: string;
|
||||
name?: string;
|
||||
type?: string;
|
||||
active?: number;
|
||||
cidr?: string;
|
||||
ipam_network_id?: number;
|
||||
ipam_cidr?: string;
|
||||
ipam_name?: string;
|
||||
}
|
||||
|
||||
export function useNodeNetworks(serverId: number, node: string, enabled = true) {
|
||||
return useQuery<{ node: string; interfaces: NodeNetworkIface[] }>({
|
||||
queryKey: ['node-networks', serverId, node],
|
||||
queryFn: () => apiClient.get(`/proxmox/api/servers/${serverId}/nodes/${node}/networks`),
|
||||
enabled: enabled && !!node,
|
||||
});
|
||||
}
|
||||
|
||||
// ==================== ISO mount/unmount (KVM only) ====================
|
||||
export interface IsoItem {
|
||||
volid: string;
|
||||
|
||||
Reference in New Issue
Block a user