diff --git a/src/app/[orgId]/settings/resources/[niceId]/proxy/page.tsx b/src/app/[orgId]/settings/resources/[niceId]/proxy/page.tsx
index 1f7a3f3d..fdb7ff91 100644
--- a/src/app/[orgId]/settings/resources/[niceId]/proxy/page.tsx
+++ b/src/app/[orgId]/settings/resources/[niceId]/proxy/page.tsx
@@ -860,17 +860,14 @@ export default function ReverseProxyTargets(props: {
}
},
{
- accessorKey: "siteId",
- header: t("site"),
+ accessorKey: "address",
+ header: t("address"),
cell: ({ row }) => {
const selectedSite = sites.find(
(site) => site.siteId === row.original.siteId
);
- const handleContainerSelectForTarget = (
- hostname: string,
- port?: number
- ) => {
+ const handleContainerSelectForTarget = (hostname: string, port?: number) => {
updateTarget(row.original.targetId, {
...row.original,
ip: hostname
@@ -884,67 +881,53 @@ export default function ReverseProxyTargets(props: {
};
return (
-
-
-
-
-
-
-
-
-
-
- {t("siteNotFound")}
-
-
- {sites.map((site) => (
- {
- updateTarget(
- row.original
- .targetId,
- {
- siteId: site.siteId
- }
- );
- }}
- >
-
- {site.name}
-
- ))}
-
-
-
-
-
- {selectedSite &&
+
+
- );
- }
- },
- {
- accessorKey: "target",
- header: t("target"),
- cell: ({ row }) => {
- const hasTarget = !!(row.original.ip || row.original.port || row.original.method);
- return hasTarget ? (
-
-
- updateTarget(row.original.targetId, {
- ...row.original,
- ...config
- })
- }
- showMethod={resource.http}
- trigger={
-
-
-
- }
- />
-
+
+
+
+ {"://"}
+
+
+ {
+ const input = e.target.value.trim();
+ const hasProtocol = /^(https?|h2c):\/\//.test(input);
+ const hasPort = /:\d+(?:\/|$)/.test(input);
+
+ if (hasProtocol || hasPort) {
+ const parsed = parseHostTarget(input);
+ if (parsed) {
+ updateTarget(row.original.targetId, {
+ ...row.original,
+ method: hasProtocol
+ ? parsed.protocol
+ : row.original.method,
+ ip: parsed.host,
+ port: hasPort
+ ? parsed.port
+ : row.original.port
+ });
+ } else {
+ updateTarget(row.original.targetId, {
+ ...row.original,
+ ip: input
+ });
+ }
+ } else {
+ updateTarget(row.original.targetId, {
+ ...row.original,
+ ip: input
+ });
+ }
+ }}
+ />
+
+ {":"}
+
+
+ updateTarget(row.original.targetId, {
+ ...row.original,
+ port: parseInt(e.target.value, 10)
+ })
+ }
+ />
+
+
- ) : (
-
- updateTarget(row.original.targetId, {
- ...row.original,
- ...config
- })
- }
- showMethod={resource.http}
- trigger={
-
-
- {t("configureTarget")}
-
- }
- />
);
}
},