Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ function AlertRow({ alert }: { alert: unknown }) {
const rows = useMemo(
() =>
Object.entries(flat)
.filter(([k]) => !HIDDEN_FIELDS.has(k))
.filter(([k]) => !HIDDEN_FIELDS.has(k) && k !== 'events' && !k.startsWith('events.'))
.map(([k, v]) => ({ key: k, value: v }))
.sort((a, b) => a.key.localeCompare(b.key)),
[flat],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,17 @@ export function TestPlaygroundModal({ mode, titleKey, dataTypeOptions, draftCont
<AlertTriangle size={13} className="mt-0.5 shrink-0" /> {t(`playground.errors.${errorKind}`)}
</div>
)}

{mode === 'rule' && (
<>
<div className="flex items-start gap-2 rounded-md bg-sky-500/10 px-3 py-2 text-xs text-sky-700 dark:text-sky-300">
<Info size={13} className="mt-0.5 shrink-0" /> {t('playground.notices.geo')}
</div>
<div className="flex items-start gap-2 rounded-md bg-sky-500/10 px-3 py-2 text-xs text-sky-700 dark:text-sky-300">
<Info size={13} className="mt-0.5 shrink-0" /> {t('playground.notices.correlation')}
</div>
</>
)}
</div>

{/* Right column: result */}
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/features/playground/lib/event-fields.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export function flatten(obj: unknown, prefix = '', out: Record<string, unknown>
// Fields that duplicate what's already visible in the "Raw log" input on the
// left — showing the full raw string again inside the field grid wrecks its
// rhythm (one giant multi-line cell among dozens of short ones) for zero gain.
export const HIDDEN_FIELDS = new Set(['raw'])
export const HIDDEN_FIELDS = new Set(['raw', 'error'])

// Same severity/level palette already used across the product (see
// alerts/lib/alert-meta.ts SEV_META and log-explorer's LEVEL_TONE) — kept
Expand Down
4 changes: 4 additions & 0 deletions frontend/src/shared/i18n/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -5219,6 +5219,10 @@
"validation": "Die Anfrage war ungültig — prüfe das Rohprotokoll und den Pipeline-Inhalt.",
"server": "Der Playground konnte den Test nicht abschließen — bitte erneut versuchen."
},
"notices": {
"geo": "Das Geolocation-Plugin ist in dieser Lite-Version des Filter- und Regeltests nicht verfügbar.",
"correlation": "Regeln, die über afterEvent- oder correlation-Klauseln auf frühere Ereignisse verweisen, setzen voraus, dass entsprechende Ereignisse bereits im System vorhanden sind, damit die getestete Warnung ausgelöst wird."
},
"result": {
"label": "Verarbeitetes Ergebnis",
"empty": "Führe einen Test aus, um das verarbeitete Ereignis hier zu sehen.",
Expand Down
4 changes: 4 additions & 0 deletions frontend/src/shared/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -4629,6 +4629,10 @@
"validation": "The request was invalid — check the raw log and pipeline content.",
"server": "The playground couldn't complete the test — please try again."
},
"notices": {
"geo": "The geolocation plugin isn't available in this lite version of the filter and rule test.",
"correlation": "Rules that reference prior events through afterEvent or correlation clauses require matching historical events to already exist in the system for the tested alert to trigger."
},
"result": {
"label": "Parsed result",
"empty": "Run a test to see the parsed event here.",
Expand Down
4 changes: 4 additions & 0 deletions frontend/src/shared/i18n/locales/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -5181,6 +5181,10 @@
"validation": "La solicitud no era válida — revisa el log en crudo y el contenido del pipeline.",
"server": "El playground no pudo completar la prueba — inténtalo de nuevo."
},
"notices": {
"geo": "El plugin de geolocation no está disponible para esta versión lite del test de filtros y reglas.",
"correlation": "Las reglas que consultan eventos previos mediante las cláusulas afterEvent o correlation requieren que ya existan eventos coincidentes en el sistema para que la alerta bajo prueba se dispare."
},
"result": {
"label": "Resultado procesado",
"empty": "Ejecuta una prueba para ver aquí el evento procesado.",
Expand Down
4 changes: 4 additions & 0 deletions frontend/src/shared/i18n/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -5219,6 +5219,10 @@
"validation": "La requête est invalide — vérifiez le journal brut et le contenu du pipeline.",
"server": "Le playground n'a pas pu terminer le test — veuillez réessayer."
},
"notices": {
"geo": "Le plugin de géolocalisation n'est pas disponible dans cette version allégée du test de filtres et de règles.",
"correlation": "Les règles qui référencent des événements antérieurs via les clauses afterEvent ou correlation nécessitent que des événements correspondants existent déjà dans le système pour que l'alerte testée se déclenche."
},
"result": {
"label": "Résultat analysé",
"empty": "Exécutez un test pour voir ici l'événement analysé.",
Expand Down
4 changes: 4 additions & 0 deletions frontend/src/shared/i18n/locales/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -5219,6 +5219,10 @@
"validation": "La richiesta non è valida — controlla il log grezzo e il contenuto della pipeline.",
"server": "Il playground non è riuscito a completare il test — riprova."
},
"notices": {
"geo": "Il plugin di geolocalizzazione non è disponibile in questa versione lite del test di filtri e regole.",
"correlation": "Le regole che fanno riferimento a eventi precedenti tramite le clausole afterEvent o correlation richiedono che eventi corrispondenti siano già presenti nel sistema affinché l'allerta in prova venga generata."
},
"result": {
"label": "Risultato elaborato",
"empty": "Esegui un test per vedere qui l'evento elaborato.",
Expand Down
4 changes: 4 additions & 0 deletions frontend/src/shared/i18n/locales/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -5181,6 +5181,10 @@
"validation": "A requisição foi inválida — verifique o log bruto e o conteúdo do pipeline.",
"server": "O playground não conseguiu concluir o teste — tente novamente."
},
"notices": {
"geo": "O plugin de geolocalização não está disponível nesta versão lite do teste de filtros e regras.",
"correlation": "As regras que referenciam eventos anteriores por meio das cláusulas afterEvent ou correlation exigem que eventos correspondentes já existam no sistema para que o alerta em teste seja disparado."
},
"result": {
"label": "Resultado processado",
"empty": "Execute um teste para ver aqui o evento processado.",
Expand Down
4 changes: 4 additions & 0 deletions frontend/src/shared/i18n/locales/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -5245,6 +5245,10 @@
"validation": "Некорректный запрос — проверьте исходный лог и содержимое конвейера.",
"server": "Playground не смог завершить тест — попробуйте снова."
},
"notices": {
"geo": "Плагин геолокации недоступен в этой упрощённой версии теста фильтров и правил.",
"correlation": "Правила, обращающиеся к предыдущим событиям через операторы afterEvent или correlation, требуют наличия соответствующих событий в системе, чтобы тестируемое оповещение сработало."
},
"result": {
"label": "Обработанный результат",
"empty": "Запустите тест, чтобы увидеть здесь обработанное событие.",
Expand Down
Loading