add advanced toggle to targets table

This commit is contained in:
miloschwartz
2025-10-09 18:24:09 -07:00
committed by Pallavi Kumari
parent 2f5e6248cd
commit 24d564b79b
5 changed files with 525 additions and 615 deletions

View File

@@ -468,7 +468,8 @@
"createdAt": "Created At", "createdAt": "Created At",
"proxyErrorInvalidHeader": "Invalid custom Host Header value. Use domain name format, or save empty to unset custom Host Header.", "proxyErrorInvalidHeader": "Invalid custom Host Header value. Use domain name format, or save empty to unset custom Host Header.",
"proxyErrorTls": "Invalid TLS Server Name. Use domain name format, or save empty to remove the TLS Server Name.", "proxyErrorTls": "Invalid TLS Server Name. Use domain name format, or save empty to remove the TLS Server Name.",
"proxyEnableSSL": "Enable SSL (https)", "proxyEnableSSL": "Enable SSL",
"proxyEnableSSLDescription": "Enable SSL/TLS encryption for secure HTTPS connections to your targets.",
"target": "Target", "target": "Target",
"configureTarget": "Configure Targets", "configureTarget": "Configure Targets",
"targetErrorFetch": "Failed to fetch targets", "targetErrorFetch": "Failed to fetch targets",
@@ -497,7 +498,7 @@
"targetTlsSettings": "Secure Connection Configuration", "targetTlsSettings": "Secure Connection Configuration",
"targetTlsSettingsDescription": "Configure SSL/TLS settings for your resource", "targetTlsSettingsDescription": "Configure SSL/TLS settings for your resource",
"targetTlsSettingsAdvanced": "Advanced TLS Settings", "targetTlsSettingsAdvanced": "Advanced TLS Settings",
"targetTlsSni": "TLS Server Name (SNI)", "targetTlsSni": "TLS Server Name",
"targetTlsSniDescription": "The TLS Server Name to use for SNI. Leave empty to use the default.", "targetTlsSniDescription": "The TLS Server Name to use for SNI. Leave empty to use the default.",
"targetTlsSubmit": "Save Settings", "targetTlsSubmit": "Save Settings",
"targets": "Targets Configuration", "targets": "Targets Configuration",
@@ -506,9 +507,21 @@
"targetStickySessionsDescription": "Keep connections on the same backend target for their entire session.", "targetStickySessionsDescription": "Keep connections on the same backend target for their entire session.",
"methodSelect": "Select method", "methodSelect": "Select method",
"targetSubmit": "Add Target", "targetSubmit": "Add Target",
"targetNoOne": "No targets. Add a target using the form.", "targetNoOne": "This resource doesn't have any targets. Add a target to configure where to send requests to your backend.",
"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",
"targetErrorInvalidIp": "Invalid IP address",
"targetErrorInvalidIpDescription": "Please enter a valid IP address or hostname",
"targetErrorInvalidPort": "Invalid port",
"targetErrorInvalidPortDescription": "Please enter a valid port number",
"targetErrorNoSite": "No site selected",
"targetErrorNoSiteDescription": "Please select a site for the target",
"targetCreated": "Target created",
"targetCreatedDescription": "Target has been created successfully",
"targetErrorCreate": "Failed to create target",
"targetErrorCreateDescription": "An error occurred while creating the target",
"save": "Save",
"proxyAdditional": "Additional Proxy Settings", "proxyAdditional": "Additional Proxy Settings",
"proxyAdditionalDescription": "Configure how your resource handles proxy settings", "proxyAdditionalDescription": "Configure how your resource handles proxy settings",
"proxyCustomHeader": "Custom Host Header", "proxyCustomHeader": "Custom Host Header",
@@ -1412,6 +1425,7 @@
"externalProxyEnabled": "External Proxy Enabled", "externalProxyEnabled": "External Proxy Enabled",
"addNewTarget": "Add New Target", "addNewTarget": "Add New Target",
"targetsList": "Targets List", "targetsList": "Targets List",
"advancedMode": "Advanced Mode",
"targetErrorDuplicateTargetFound": "Duplicate target found", "targetErrorDuplicateTargetFound": "Duplicate target found",
"healthCheckHealthy": "Healthy", "healthCheckHealthy": "Healthy",
"healthCheckUnhealthy": "Unhealthy", "healthCheckUnhealthy": "Unhealthy",

File diff suppressed because it is too large Load Diff

View File

@@ -107,7 +107,7 @@ export default function HealthCheckDialog({
useEffect(() => { useEffect(() => {
if (!open) return; if (!open) return;
// Determine default scheme from target method // Determine default scheme from target method
const getDefaultScheme = () => { const getDefaultScheme = () => {
if (initialConfig?.hcScheme) { if (initialConfig?.hcScheme) {
@@ -177,7 +177,7 @@ export default function HealthCheckDialog({
render={({ field }) => ( render={({ field }) => (
<FormItem className="flex flex-row items-center justify-between rounded-lg border p-4"> <FormItem className="flex flex-row items-center justify-between rounded-lg border p-4">
<div className="space-y-0.5"> <div className="space-y-0.5">
<FormLabel className="text-base font-semibold"> <FormLabel>
{t("enableHealthChecks")} {t("enableHealthChecks")}
</FormLabel> </FormLabel>
<FormDescription> <FormDescription>
@@ -210,7 +210,7 @@ export default function HealthCheckDialog({
name="hcScheme" name="hcScheme"
render={({ field }) => ( render={({ field }) => (
<FormItem> <FormItem>
<FormLabel className="text-base font-semibold"> <FormLabel>
{t("healthScheme")} {t("healthScheme")}
</FormLabel> </FormLabel>
<Select <Select
@@ -250,7 +250,7 @@ export default function HealthCheckDialog({
name="hcHostname" name="hcHostname"
render={({ field }) => ( render={({ field }) => (
<FormItem> <FormItem>
<FormLabel className="text-base font-semibold"> <FormLabel>
{t("healthHostname")} {t("healthHostname")}
</FormLabel> </FormLabel>
<FormControl> <FormControl>
@@ -277,7 +277,7 @@ export default function HealthCheckDialog({
name="hcPort" name="hcPort"
render={({ field }) => ( render={({ field }) => (
<FormItem> <FormItem>
<FormLabel className="text-base font-semibold"> <FormLabel>
{t("healthPort")} {t("healthPort")}
</FormLabel> </FormLabel>
<FormControl> <FormControl>
@@ -308,7 +308,7 @@ export default function HealthCheckDialog({
name="hcPath" name="hcPath"
render={({ field }) => ( render={({ field }) => (
<FormItem> <FormItem>
<FormLabel className="text-base font-semibold"> <FormLabel>
{t("healthCheckPath")} {t("healthCheckPath")}
</FormLabel> </FormLabel>
<FormControl> <FormControl>
@@ -338,7 +338,7 @@ export default function HealthCheckDialog({
name="hcMethod" name="hcMethod"
render={({ field }) => ( render={({ field }) => (
<FormItem> <FormItem>
<FormLabel className="text-base font-semibold"> <FormLabel>
{t("httpMethod")} {t("httpMethod")}
</FormLabel> </FormLabel>
<Select <Select
@@ -390,7 +390,7 @@ export default function HealthCheckDialog({
name="hcInterval" name="hcInterval"
render={({ field }) => ( render={({ field }) => (
<FormItem> <FormItem>
<FormLabel className="text-base font-semibold"> <FormLabel>
{t( {t(
"healthyIntervalSeconds" "healthyIntervalSeconds"
)} )}
@@ -425,7 +425,7 @@ export default function HealthCheckDialog({
name="hcUnhealthyInterval" name="hcUnhealthyInterval"
render={({ field }) => ( render={({ field }) => (
<FormItem> <FormItem>
<FormLabel className="text-base font-semibold"> <FormLabel>
{t( {t(
"unhealthyIntervalSeconds" "unhealthyIntervalSeconds"
)} )}
@@ -460,7 +460,7 @@ export default function HealthCheckDialog({
name="hcTimeout" name="hcTimeout"
render={({ field }) => ( render={({ field }) => (
<FormItem> <FormItem>
<FormLabel className="text-base font-semibold"> <FormLabel>
{t("timeoutSeconds")} {t("timeoutSeconds")}
</FormLabel> </FormLabel>
<FormControl> <FormControl>
@@ -499,7 +499,7 @@ export default function HealthCheckDialog({
name="hcStatus" name="hcStatus"
render={({ field }) => ( render={({ field }) => (
<FormItem> <FormItem>
<FormLabel className="text-base font-semibold"> <FormLabel>
{t("expectedResponseCodes")} {t("expectedResponseCodes")}
</FormLabel> </FormLabel>
<FormControl> <FormControl>
@@ -541,7 +541,7 @@ export default function HealthCheckDialog({
name="hcHeaders" name="hcHeaders"
render={({ field }) => ( render={({ field }) => (
<FormItem> <FormItem>
<FormLabel className="text-base font-semibold"> <FormLabel>
{t("customHeaders")} {t("customHeaders")}
</FormLabel> </FormLabel>
<FormControl> <FormControl>

View File

@@ -1,4 +1,4 @@
import { Pencil } from "lucide-react"; import { Settings } from "lucide-react";
import { import {
Select, Select,
SelectContent, SelectContent,
@@ -256,7 +256,7 @@ export function PathMatchDisplay({
<code className="text-sm flex-1 truncate" title={value.path}> <code className="text-sm flex-1 truncate" title={value.path}>
{value.path} {value.path}
</code> </code>
<Pencil className="h-3 w-3 shrink-0 opacity-70" /> <Settings className="h-4 w-4" />
</div> </div>
); );
} }
@@ -287,7 +287,7 @@ export function PathRewriteDisplay({
<code className="text-sm flex-1 truncate" title={value.rewritePath || ""}> <code className="text-sm flex-1 truncate" title={value.rewritePath || ""}>
{value.rewritePath || <span className="text-muted-foreground italic">(strip)</span>} {value.rewritePath || <span className="text-muted-foreground italic">(strip)</span>}
</code> </code>
<Pencil className="h-3 w-3 shrink-0 opacity-70" /> <Settings className="h-4 w-4" />
</div> </div>
); );
} }

View File

@@ -10,7 +10,7 @@ const Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(
return ( return (
<textarea <textarea
className={cn( className={cn(
"flex min-h-[80px] w-full rounded-md border border-input bg-card px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50", "flex min-h-[80px] w-full rounded-md border border-input bg-card px-3 py-2 text-sm placeholder:text-muted-foreground focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] transition-[color,box-shadow]",
className className
)} )}
ref={ref} ref={ref}