diff --git a/frontend/src/components/ProxyHostForm.tsx b/frontend/src/components/ProxyHostForm.tsx index b6578a17..dabe6350 100644 --- a/frontend/src/components/ProxyHostForm.tsx +++ b/frontend/src/components/ProxyHostForm.tsx @@ -42,9 +42,9 @@ export default function ProxyHostForm({ host, onSubmit, onCancel }: ProxyHostFor const getDockerHostString = () => { if (connectionSource === 'local') return undefined; - if (connectionSource === 'custom') return undefined; + if (connectionSource === 'custom') return null; const server = remoteServers.find(s => s.uuid === connectionSource); - if (!server) return undefined; + if (!server) return null; // Construct the Docker host string return `tcp://${server.host}:${server.port}`; } @@ -250,7 +250,7 @@ export default function ProxyHostForm({ host, onSubmit, onCancel }: ProxyHostFor className="w-4 h-4 text-blue-600 bg-gray-900 border-gray-700 rounded focus:ring-blue-500" /> Force SSL -
+
@@ -262,7 +262,7 @@ export default function ProxyHostForm({ host, onSubmit, onCancel }: ProxyHostFor className="w-4 h-4 text-blue-600 bg-gray-900 border-gray-700 rounded focus:ring-blue-500" /> HTTP/2 Support -
+
@@ -274,7 +274,7 @@ export default function ProxyHostForm({ host, onSubmit, onCancel }: ProxyHostFor className="w-4 h-4 text-blue-600 bg-gray-900 border-gray-700 rounded focus:ring-blue-500" /> HSTS Enabled -
+
@@ -286,7 +286,7 @@ export default function ProxyHostForm({ host, onSubmit, onCancel }: ProxyHostFor className="w-4 h-4 text-blue-600 bg-gray-900 border-gray-700 rounded focus:ring-blue-500" /> HSTS Subdomains -
+
@@ -298,7 +298,7 @@ export default function ProxyHostForm({ host, onSubmit, onCancel }: ProxyHostFor className="w-4 h-4 text-blue-600 bg-gray-900 border-gray-700 rounded focus:ring-blue-500" /> Block Exploits -
+
@@ -310,7 +310,7 @@ export default function ProxyHostForm({ host, onSubmit, onCancel }: ProxyHostFor className="w-4 h-4 text-blue-600 bg-gray-900 border-gray-700 rounded focus:ring-blue-500" /> Websockets Support -
+
diff --git a/frontend/src/hooks/useDocker.ts b/frontend/src/hooks/useDocker.ts index eb315ee3..b4f9d386 100644 --- a/frontend/src/hooks/useDocker.ts +++ b/frontend/src/hooks/useDocker.ts @@ -1,7 +1,7 @@ import { useQuery } from '@tanstack/react-query' import { dockerApi } from '../api/docker' -export function useDocker(host?: string) { +export function useDocker(host?: string | null) { const { data: containers = [], isLoading, @@ -9,7 +9,8 @@ export function useDocker(host?: string) { refetch, } = useQuery({ queryKey: ['docker-containers', host], - queryFn: () => dockerApi.listContainers(host), + queryFn: () => dockerApi.listContainers(host || undefined), + enabled: host !== null, // Disable if host is explicitly null retry: 1, // Don't retry too much if docker is not available })