From f71f31fedb8c292934fc8b893efb519d5565e5a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20S=C3=A1nchez?= Date: Mon, 3 Aug 2026 10:11:45 -0600 Subject: [PATCH 1/2] fix[frontend](testmodal/pipelines/rules): added changeable name on those sections of the test modal --- .../src/features/alerting-rules/components/rule-drawer.tsx | 1 + .../src/features/alerting-rules/pages/AlertingRulesPage.tsx | 2 +- .../parsing-filters/components/FilterFormDrawer.tsx | 1 + .../features/parsing-filters/pages/ParsingFiltersPage.tsx | 2 +- .../features/playground/components/TestPlaygroundModal.tsx | 6 ++++-- frontend/src/shared/i18n/locales/de.json | 4 ++++ frontend/src/shared/i18n/locales/en.json | 3 ++- frontend/src/shared/i18n/locales/es.json | 4 ++++ frontend/src/shared/i18n/locales/fr.json | 4 ++++ frontend/src/shared/i18n/locales/it.json | 4 ++++ frontend/src/shared/i18n/locales/pt.json | 4 ++++ frontend/src/shared/i18n/locales/ru.json | 4 ++++ 12 files changed, 34 insertions(+), 5 deletions(-) diff --git a/frontend/src/features/alerting-rules/components/rule-drawer.tsx b/frontend/src/features/alerting-rules/components/rule-drawer.tsx index e7086fecb..409a9b942 100644 --- a/frontend/src/features/alerting-rules/components/rule-drawer.tsx +++ b/frontend/src/features/alerting-rules/components/rule-drawer.tsx @@ -181,6 +181,7 @@ export function RuleDrawer({ {showTestModal && ( setShowTestModal(false)} diff --git a/frontend/src/features/alerting-rules/pages/AlertingRulesPage.tsx b/frontend/src/features/alerting-rules/pages/AlertingRulesPage.tsx index d96720ac9..df1f6d34e 100644 --- a/frontend/src/features/alerting-rules/pages/AlertingRulesPage.tsx +++ b/frontend/src/features/alerting-rules/pages/AlertingRulesPage.tsx @@ -295,7 +295,7 @@ export function AlertingRulesPage() { {open && setOpen(null)} onToggle={toggleActive} onDelete={remove} onSaved={() => { setOpen(null); refresh() }} t={t} />} {creating && setCreating(false)} onSaved={() => { setCreating(false); refresh() }} t={t} />} {importResults && setImportResults(null)} t={t} />} - {showTestModal && setShowTestModal(false)} />} + {showTestModal && setShowTestModal(false)} />} setShowTestModal(false)} diff --git a/frontend/src/features/parsing-filters/pages/ParsingFiltersPage.tsx b/frontend/src/features/parsing-filters/pages/ParsingFiltersPage.tsx index acdfedcac..023ba5b75 100644 --- a/frontend/src/features/parsing-filters/pages/ParsingFiltersPage.tsx +++ b/frontend/src/features/parsing-filters/pages/ParsingFiltersPage.tsx @@ -292,7 +292,7 @@ export function ParsingFiltersPage() { )} {showTestModal && ( - setShowTestModal(false)} /> + setShowTestModal(false)} /> )} ) diff --git a/frontend/src/features/playground/components/TestPlaygroundModal.tsx b/frontend/src/features/playground/components/TestPlaygroundModal.tsx index e0cff6bb1..1abcbd5f2 100644 --- a/frontend/src/features/playground/components/TestPlaygroundModal.tsx +++ b/frontend/src/features/playground/components/TestPlaygroundModal.tsx @@ -16,6 +16,8 @@ const MAX_BYTES = 1024 * 1024 interface Props { mode: PlaygroundMode + /** i18n key for the modal header, e.g. `playground.titleFilter` or `playground.titleRule`. */ + titleKey: string /** Entry A: active dataTypes from the catalog. Entry B: `model.dataTypes` of the draft. */ dataTypeOptions: string[] /** Present only for Entry B (unsaved draft content); omitted tests the live pipeline. */ @@ -23,7 +25,7 @@ interface Props { onClose: () => void } -export function TestPlaygroundModal({ mode, dataTypeOptions, draftContent, onClose }: Props) { +export function TestPlaygroundModal({ mode, titleKey, dataTypeOptions, draftContent, onClose }: Props) { const { t } = useTranslation() const [selectedDataType, setSelectedDataType] = useState(dataTypeOptions[0] ?? '') const [rawLog, setRawLog] = useState('') @@ -87,7 +89,7 @@ export function TestPlaygroundModal({ mode, dataTypeOptions, draftContent, onClo >

- {t('playground.title')} + {t(titleKey)}