- {cfg.name || "Unnamed destination"} + {cfg.name || t("streamingUnnamedDestination")}
HTTP @@ -104,7 +106,7 @@ function DestinationCard({ {/* URL preview */}
{cfg.url || ( - No URL configured + {t("streamingNoUrlConfigured")} )}
@@ -116,7 +118,7 @@ function DestinationCard({ disabled={disabled} className="flex-1" > - Edit + {t("edit")}- Are you sure you want to delete{" "} + {t("streamingDeleteDialogAreYouSure")}{" "} {parseHttpConfig(deleteTarget.config).name || - "this destination"} + t("streamingDeleteDialogThisDestination")} - ? All configuration will be permanently removed. + {t("streamingDeleteDialogPermanentlyRemoved")}
} - buttonText="Delete Destination" + buttonText={t("streamingDeleteButtonText")} onConfirm={handleDeleteConfirm} /> )} > ); -} +} \ No newline at end of file diff --git a/src/components/HttpDestinationCredenza.tsx b/src/components/HttpDestinationCredenza.tsx index 205c17c84..e39567332 100644 --- a/src/components/HttpDestinationCredenza.tsx +++ b/src/components/HttpDestinationCredenza.tsx @@ -24,6 +24,7 @@ import { createApiClient, formatAxiosError } from "@app/lib/api"; import { useEnvContext } from "@app/hooks/useEnvContext"; import { toast } from "@app/hooks/useToast"; import { build } from "@server/build"; +import { useTranslations } from "next-intl"; // ── Types ────────────────────────────────────────────────────────────────────── @@ -91,6 +92,8 @@ interface HeadersEditorProps { } function HeadersEditor({ headers, onChange }: HeadersEditorProps) { + const t = useTranslations(); + const addRow = () => onChange([...headers, { key: "", value: "" }]); const removeRow = (i: number) => @@ -106,8 +109,7 @@ function HeadersEditor({ headers, onChange }: HeadersEditorProps) {- No custom headers configured. Click "Add Header" to add - one. + {t("httpDestNoHeadersConfigured")}
)} {headers.map((h, i) => ( @@ -115,7 +117,7 @@ function HeadersEditor({ headers, onChange }: HeadersEditorProps) { updateRow(i, "key", e.target.value)} - placeholder="Header name" + placeholder={t("httpDestHeaderNamePlaceholder")} className="flex-1" /> updateRow(i, "value", e.target.value) } - placeholder="Value" + placeholder={t("httpDestHeaderValuePlaceholder")} className="flex-1" />- Choose how requests to your endpoint - are authenticated. + {t("httpDestAuthDescription")}
- Sends requests without an{" "}
-
- Authorization
- {" "}
- header.
+ {t("httpDestAuthNoneDescription")}
- Adds an{" "}
-
- Authorization: Bearer
- <token>
- {" "}
- header to each request.
+ {t("httpDestAuthBearerDescription")}
- Adds an{" "}
-
- Authorization: Basic
- <credentials>
- {" "}
- header. Provide credentials
- as{" "}
-
- username:password
-
- .
+ {t("httpDestAuthBasicDescription")}
- Specify a custom HTTP
- header name and value for
- authentication (e.g.{" "}
-
- X-API-Key
-
- ).
+ {t("httpDestAuthCustomDescription")}
- Add custom headers to every outgoing
- request. Useful for static tokens or
- custom{" "}
-
- Content-Type
-
- . By default,{" "}
-
- Content-Type: application/json
- {" "}
- is sent.
+ {t("httpDestCustomHeadersDescription")}
- Control the JSON payload structure sent to - your endpoint. If disabled, a default JSON - object is sent for each event. + {t("httpDestBodyTemplateDescription")}
- Use template variables to reference - event fields in your payload. + {t("httpDestBodyTemplateHint")}
- How events are serialised into each - request body. + {t("httpDestPayloadFormatDescription")}
- One request per batch, body is
- a JSON array{" "}
-
- [{"{...}"}, {"{...}"}]
-
- . Compatible with most generic
- webhooks and Datadog.
+ {t("httpDestFormatJsonArrayDescription")}
- One request per batch, body is - newline-delimited JSON — one - object per line, no outer - array. Required by{" "} - Splunk HEC,{" "} - - Elastic / OpenSearch - - , and{" "} - Grafana Loki. + {t("httpDestFormatNdjsonDescription")}
@@ -685,13 +633,10 @@ export function HttpDestinationCredenza({ htmlFor="fmt-json-single" className="cursor-pointer font-medium" > - One Event Per Request + {t("httpDestFormatSingleTitle")}- Sends a separate HTTP POST for - each individual event. Use only - for endpoints that cannot - handle batches. + {t("httpDestFormatSingleDescription")}
@@ -703,12 +648,10 @@ export function HttpDestinationCredenza({- Choose which log types are forwarded to - this destination. Only enabled log types - will be streamed. + {t("httpDestLogTypesDescription")}
- Resource access attempts, including - authenticated and denied requests. + {t("httpDestAccessLogsDescription")}
- Administrative actions performed by - users within the organization. + {t("httpDestActionLogsDescription")}
@@ -773,12 +714,10 @@ export function HttpDestinationCredenza({ htmlFor="log-connection" className="text-sm font-medium cursor-pointer" > - Connection Logs + {t("httpDestConnectionLogsTitle")}- Site and tunnel connection events, - including connects and - disconnects. + {t("httpDestConnectionLogsDescription")}
@@ -797,12 +736,10 @@ export function HttpDestinationCredenza({ htmlFor="log-request" className="text-sm font-medium cursor-pointer" > - Request Logs + {t("httpDestRequestLogsTitle")}- HTTP request logs for proxied - resources, including method, path, - and response code. + {t("httpDestRequestLogsDescription")}
@@ -818,7 +755,7 @@ export function HttpDestinationCredenza({ variant="outline" disabled={saving} > - Cancel + {t("cancel")}