mirror of
https://github.com/fosrl/pangolin.git
synced 2026-06-18 13:22:03 +00:00
Prefil the port with the best guess port
This commit is contained in:
@@ -570,7 +570,7 @@ export function PrivateResourceForm({
|
|||||||
mode: "host",
|
mode: "host",
|
||||||
destination: "",
|
destination: "",
|
||||||
alias: null,
|
alias: null,
|
||||||
destinationPort: 22,
|
destinationPort: null,
|
||||||
scheme: "http",
|
scheme: "http",
|
||||||
ssl: true,
|
ssl: true,
|
||||||
httpConfigSubdomain: null,
|
httpConfigSubdomain: null,
|
||||||
@@ -1038,9 +1038,35 @@ export function PrivateResourceForm({
|
|||||||
modeOptions
|
modeOptions
|
||||||
}
|
}
|
||||||
value={field.value}
|
value={field.value}
|
||||||
onChange={
|
onChange={(
|
||||||
field.onChange
|
newMode
|
||||||
}
|
) => {
|
||||||
|
field.onChange(
|
||||||
|
newMode
|
||||||
|
);
|
||||||
|
if (
|
||||||
|
newMode ===
|
||||||
|
"ssh"
|
||||||
|
) {
|
||||||
|
form.setValue(
|
||||||
|
"destinationPort",
|
||||||
|
22
|
||||||
|
);
|
||||||
|
} else if (
|
||||||
|
newMode ===
|
||||||
|
"http"
|
||||||
|
) {
|
||||||
|
form.setValue(
|
||||||
|
"destinationPort",
|
||||||
|
443
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
form.setValue(
|
||||||
|
"destinationPort",
|
||||||
|
null
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}}
|
||||||
cols={2}
|
cols={2}
|
||||||
/>
|
/>
|
||||||
<FormMessage />
|
<FormMessage />
|
||||||
|
|||||||
Reference in New Issue
Block a user