fix(sdn): zone DNS is an SDN DNS entry id, not an IP — use select
All checks were successful
Backend Tests / pytest (Python 3.12) (push) Successful in 52s
Deploy to Production / Trigger production update (push) Successful in 8s

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-02 03:05:06 +05:00
parent 91080d8574
commit d3fbdb1ff5
4 changed files with 40 additions and 8 deletions

View File

@@ -41,6 +41,20 @@ export function useSDNSubnets(serverId: number, vnet: string) {
});
}
export interface SDNDnsEntry {
dns: string;
type?: string;
url?: string;
}
export function useSDNDns(serverId: number, enabled = true) {
return useQuery({
queryKey: ['sdn-dns', serverId] as const,
queryFn: () => apiClient.get<{ dns: SDNDnsEntry[] }>(`/proxmox/api/servers/${serverId}/sdn/dns`),
enabled: serverId > 0 && enabled,
});
}
// Invalidate the SDN status (pending indicator) alongside the changed entity.
function useSDNInvalidator(serverId: number) {
const qc = useQueryClient();