mirror of
https://github.com/fosrl/pangolin.git
synced 2026-05-28 03:32:20 +00:00
Hide the destination and the alias
This commit is contained in:
@@ -2004,7 +2004,6 @@
|
|||||||
"sshServerDestinationDescription": "Configure the destination and port of the SSH server",
|
"sshServerDestinationDescription": "Configure the destination and port of the SSH server",
|
||||||
"destination": "Destination",
|
"destination": "Destination",
|
||||||
"bgTargetMultiSiteDisclaimer": "Selecting multiple sites enables resilient routing and failover for high availability.",
|
"bgTargetMultiSiteDisclaimer": "Selecting multiple sites enables resilient routing and failover for high availability.",
|
||||||
"sshAccess": "SSH Access",
|
|
||||||
"roleAllowSsh": "Allow SSH",
|
"roleAllowSsh": "Allow SSH",
|
||||||
"roleAllowSshAllow": "Allow",
|
"roleAllowSshAllow": "Allow",
|
||||||
"roleAllowSshDisallow": "Disallow",
|
"roleAllowSshDisallow": "Disallow",
|
||||||
|
|||||||
@@ -622,7 +622,7 @@ export function InternalResourceForm({
|
|||||||
clients: []
|
clients: []
|
||||||
});
|
});
|
||||||
setSelectedSites([]);
|
setSelectedSites([]);
|
||||||
setSshServerMode("standard");
|
setSshServerMode("native");
|
||||||
setTcpPortMode("all");
|
setTcpPortMode("all");
|
||||||
setUdpPortMode("all");
|
setUdpPortMode("all");
|
||||||
setTcpCustomPorts("");
|
setTcpCustomPorts("");
|
||||||
@@ -784,7 +784,7 @@ export function InternalResourceForm({
|
|||||||
},
|
},
|
||||||
...(disableEnterpriseFeatures || mode !== "ssh"
|
...(disableEnterpriseFeatures || mode !== "ssh"
|
||||||
? []
|
? []
|
||||||
: [{ title: t("sshAccess"), href: "#" }])
|
: [{ title: t("sshSettings"), href: "#" }])
|
||||||
]}
|
]}
|
||||||
>
|
>
|
||||||
<div className="space-y-4 mt-4 p-1">
|
<div className="space-y-4 mt-4 p-1">
|
||||||
@@ -996,55 +996,31 @@ export function InternalResourceForm({
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
<div
|
{sshServerMode !== "native" && (
|
||||||
className={cn(
|
<div
|
||||||
mode === "cidr" && "col-span-1",
|
className={cn(
|
||||||
(mode === "http" ||
|
mode === "cidr" && "col-span-1",
|
||||||
mode === "host" ||
|
(mode === "http" ||
|
||||||
mode === "ssh") &&
|
mode === "host" ||
|
||||||
"min-w-0"
|
mode === "ssh") &&
|
||||||
)}
|
"min-w-0"
|
||||||
>
|
|
||||||
<FormField
|
|
||||||
control={form.control}
|
|
||||||
name="destination"
|
|
||||||
render={({ field }) => (
|
|
||||||
<FormItem>
|
|
||||||
<FormLabel>
|
|
||||||
{t(destinationLabelKey)}
|
|
||||||
</FormLabel>
|
|
||||||
<FormControl>
|
|
||||||
<Input
|
|
||||||
{...field}
|
|
||||||
className="w-full"
|
|
||||||
disabled={
|
|
||||||
isHttpMode &&
|
|
||||||
httpSectionDisabled
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
</FormControl>
|
|
||||||
<FormMessage />
|
|
||||||
</FormItem>
|
|
||||||
)}
|
)}
|
||||||
/>
|
>
|
||||||
</div>
|
|
||||||
{(mode === "host" || mode === "ssh") && (
|
|
||||||
<div className="min-w-0">
|
|
||||||
<FormField
|
<FormField
|
||||||
control={form.control}
|
control={form.control}
|
||||||
name="alias"
|
name="destination"
|
||||||
render={({ field }) => (
|
render={({ field }) => (
|
||||||
<FormItem>
|
<FormItem>
|
||||||
<FormLabel>
|
<FormLabel>
|
||||||
{t(aliasLabelKey)}
|
{t(destinationLabelKey)}
|
||||||
</FormLabel>
|
</FormLabel>
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<Input
|
<Input
|
||||||
{...field}
|
{...field}
|
||||||
className="w-full"
|
className="w-full"
|
||||||
value={
|
disabled={
|
||||||
field.value ??
|
isHttpMode &&
|
||||||
""
|
httpSectionDisabled
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
@@ -1054,6 +1030,33 @@ export function InternalResourceForm({
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
{(mode === "host" || mode === "ssh") &&
|
||||||
|
sshServerMode !== "native" && (
|
||||||
|
<div className="min-w-0">
|
||||||
|
<FormField
|
||||||
|
control={form.control}
|
||||||
|
name="alias"
|
||||||
|
render={({ field }) => (
|
||||||
|
<FormItem>
|
||||||
|
<FormLabel>
|
||||||
|
{t(aliasLabelKey)}
|
||||||
|
</FormLabel>
|
||||||
|
<FormControl>
|
||||||
|
<Input
|
||||||
|
{...field}
|
||||||
|
className="w-full"
|
||||||
|
value={
|
||||||
|
field.value ??
|
||||||
|
""
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</FormControl>
|
||||||
|
<FormMessage />
|
||||||
|
</FormItem>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
{mode === "http" && (
|
{mode === "http" && (
|
||||||
<div className="min-w-0">
|
<div className="min-w-0">
|
||||||
<FormField
|
<FormField
|
||||||
|
|||||||
Reference in New Issue
Block a user