mirror of
https://github.com/fosrl/pangolin.git
synced 2026-02-16 18:06:39 +00:00
fix type and fix redirect to resource niceId on create
This commit is contained in:
@@ -574,7 +574,7 @@ export default function ReverseProxyTargets(props: {
|
||||
const [showPathInput, setShowPathInput] = useState(
|
||||
!!(row.original.path || row.original.pathMatchType)
|
||||
);
|
||||
|
||||
|
||||
if (!showPathInput) {
|
||||
return (
|
||||
<Button
|
||||
@@ -590,7 +590,7 @@ export default function ReverseProxyTargets(props: {
|
||||
}
|
||||
}}
|
||||
>
|
||||
+ {t("matchPath")}
|
||||
+ {t("matchPath")}
|
||||
</Button>
|
||||
);
|
||||
}
|
||||
@@ -617,8 +617,8 @@ export default function ReverseProxyTargets(props: {
|
||||
</Select>
|
||||
<Input
|
||||
placeholder={
|
||||
row.original.pathMatchType === "regex"
|
||||
? "^/api/.*"
|
||||
row.original.pathMatchType === "regex"
|
||||
? "^/api/.*"
|
||||
: "/path"
|
||||
}
|
||||
defaultValue={row.original.path || ""}
|
||||
@@ -1489,11 +1489,6 @@ export default function ReverseProxyTargets(props: {
|
||||
rows={4}
|
||||
/>
|
||||
</FormControl>
|
||||
<FormDescription>
|
||||
{t(
|
||||
"customHeadersDescription"
|
||||
)}
|
||||
</FormDescription>
|
||||
<FormMessage />
|
||||
</FormItem>
|
||||
)}
|
||||
|
||||
@@ -408,6 +408,7 @@ export default function Page() {
|
||||
|
||||
if (res && res.status === 201) {
|
||||
const id = res.data.data.resourceId;
|
||||
const niceId = res.data.data.niceId;
|
||||
setResourceId(id);
|
||||
|
||||
// Create targets if any exist
|
||||
@@ -440,7 +441,7 @@ export default function Page() {
|
||||
}
|
||||
|
||||
if (isHttp) {
|
||||
router.push(`/${orgId}/settings/resources/${id}`);
|
||||
router.push(`/${orgId}/settings/resources/${niceId}`);
|
||||
} else {
|
||||
const tcpUdpData = tcpUdpForm.getValues();
|
||||
// Only show config snippets if enableProxy is explicitly true
|
||||
@@ -551,7 +552,7 @@ export default function Page() {
|
||||
const [showPathInput, setShowPathInput] = useState(
|
||||
!!(row.original.path || row.original.pathMatchType)
|
||||
);
|
||||
|
||||
|
||||
if (!showPathInput) {
|
||||
return (
|
||||
<Button
|
||||
@@ -594,8 +595,8 @@ export default function Page() {
|
||||
</Select>
|
||||
<Input
|
||||
placeholder={
|
||||
row.original.pathMatchType === "regex"
|
||||
? "^/api/.*"
|
||||
row.original.pathMatchType === "regex"
|
||||
? "^/api/.*"
|
||||
: "/path"
|
||||
}
|
||||
defaultValue={row.original.path || ""}
|
||||
|
||||
Reference in New Issue
Block a user