improve targets round robin warning

This commit is contained in:
miloschwartz
2026-05-11 22:06:43 -07:00
parent 77d17af15b
commit b6caeda0a5
3 changed files with 30 additions and 17 deletions

View File

@@ -673,6 +673,7 @@
"targetNoOneDescription": "Adding more than one target above will enable load balancing.", "targetNoOneDescription": "Adding more than one target above will enable load balancing.",
"targetsSubmit": "Save Targets", "targetsSubmit": "Save Targets",
"addTarget": "Add Target", "addTarget": "Add Target",
"proxyMultiSiteRoundRobinNodeHelp": "Round robin routing will not work between sites that are not connected to the same node, but failover will work.",
"targetErrorInvalidIp": "Invalid IP address", "targetErrorInvalidIp": "Invalid IP address",
"targetErrorInvalidIpDescription": "Please enter a valid IP address or hostname", "targetErrorInvalidIpDescription": "Please enter a valid IP address or hostname",
"targetErrorInvalidPort": "Invalid port", "targetErrorInvalidPort": "Invalid port",

View File

@@ -84,6 +84,7 @@ import {
AlertTriangle, AlertTriangle,
CircleCheck, CircleCheck,
CircleX, CircleX,
ExternalLink,
Info, Info,
Plus, Plus,
Settings Settings
@@ -961,13 +962,18 @@ function ProxyResourceTargetsForm({
{build === "saas" && {build === "saas" &&
targets.length > 1 && targets.length > 1 &&
new Set(targets.map((t) => t.siteId)).size > 1 && ( new Set(targets.map((t) => t.siteId)).size > 1 && (
<p className="text-sm text-muted-foreground mt-3 flex items-start gap-1.5"> <p className="text-sm text-muted-foreground mt-3">
<AlertTriangle className="h-4 w-4 shrink-0 mt-0.5" /> {t("proxyMultiSiteRoundRobinNodeHelp")}{" "}
<span> <a
Round robin routing will not work between href="https://docs.pangolin.net/manage/resources/public/targets#distributing-sites-load-across-servers"
sites that are not connected to the same target="_blank"
node, but failover will work. rel="noopener noreferrer"
</span> className="text-primary hover:underline inline-flex items-center gap-1"
>
{t("learnMore")}
<ExternalLink className="size-3.5 shrink-0" />
</a>
.
</p> </p>
)} )}
</SettingsSectionBody> </SettingsSectionBody>

View File

@@ -82,8 +82,8 @@ import { AxiosResponse } from "axios";
import { import {
CircleCheck, CircleCheck,
CircleX, CircleX,
ExternalLink,
Info, Info,
InfoIcon,
Plus, Plus,
Settings, Settings,
SquareArrowOutUpRight SquareArrowOutUpRight
@@ -1425,16 +1425,22 @@ export default function Page() {
</Button> </Button>
</div> </div>
)} )}
{build === "enterprise" && {build === "saas" &&
targets.length > 1 && targets.length > 1 &&
new Set(targets.map((t) => t.siteId)).size > 1 && ( new Set(targets.map((t) => t.siteId)).size >
<p className="text-sm text-muted-foreground mt-3 flex items-start gap-1.5"> 1 && (
<InfoIcon className="h-4 w-4 shrink-0 mt-0.5" /> <p className="text-sm text-muted-foreground mt-3">
<span> {t("proxyMultiSiteRoundRobinNodeHelp")}{" "}
Round robin routing will not work between <a
sites that are not connected to the same href="https://docs.pangolin.net/manage/resources/public/targets#distributing-sites-load-across-servers"
node, but failover will work. target="_blank"
</span> rel="noopener noreferrer"
className="text-primary hover:underline inline-flex items-center gap-1"
>
{t("learnMore")}
<ExternalLink className="size-3.5 shrink-0" />
</a>
.
</p> </p>
)} )}
</SettingsSectionBody> </SettingsSectionBody>