From 7d4be64b600a420d726bce218eca484f2089e416 Mon Sep 17 00:00:00 2001 From: Nicolas Arenas Date: Tue, 21 Apr 2026 20:01:42 +0200 Subject: [PATCH] Fix MAC address encoding in client logs Grafana URL MAC addresses contain colons which are special characters in Lucene query syntax. URL-encoding the MAC with encodeURIComponent ensures Grafana receives the value correctly decoded (52:54:00:e7:c7:cf) and can substitute it into the host.mac filter without parse errors. Co-Authored-By: Claude Sonnet 4.6 --- .../shared/client-logs-modal/client-logs-modal.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ogWebconsole/src/app/components/groups/shared/client-logs-modal/client-logs-modal.component.ts b/ogWebconsole/src/app/components/groups/shared/client-logs-modal/client-logs-modal.component.ts index 1c6c9ff..51a902f 100644 --- a/ogWebconsole/src/app/components/groups/shared/client-logs-modal/client-logs-modal.component.ts +++ b/ogWebconsole/src/app/components/groups/shared/client-logs-modal/client-logs-modal.component.ts @@ -18,7 +18,7 @@ export class ClientLogsModalComponent { private configService: ConfigService, private sanitizer: DomSanitizer ) { - const mac = this.data.client.mac || ''; + const mac = encodeURIComponent(this.data.client.mac || ''); const iframeUrlString = `${this.configService.logUrl}/d-solo/opengnsys-clients/filebeat-clients?orgId=1&timezone=browser&var-hostname=$__all&var-mac=${mac}&refresh=5s&panelId=1&__feature.dashboardSceneSolo`; this.iframeUrl = this.sanitizer.bypassSecurityTrustResourceUrl(iframeUrlString); this.grafanaUrl = `${this.configService.logUrl}/d/opengnsys-clients/filebeat-clients?orgId=1&from=now-5m&to=now&timezone=browser&var-hostname=$__all&var-mac=${mac}&refresh=5s&viewPanel=panel-1`;