Skip to content

fix(grafana): open TeslaMate links in new tab - #5626

Open
misenhower wants to merge 1 commit into
teslamate-org:mainfrom
misenhower:codex/grafana-teslamate-links-new-tab
Open

fix(grafana): open TeslaMate links in new tab#5626
misenhower wants to merge 1 commit into
teslamate-org:mainfrom
misenhower:codex/grafana-teslamate-links-new-tab

Conversation

@misenhower

@misenhower misenhower commented Aug 17, 2026

Copy link
Copy Markdown

Hey there. This PR fixes an issue I ran into with my TeslaMate config. I have Grafana hosted at / and the TeslaMate admin panel hosted on the same port under /admin. Without setting targetBlank to true, all the TeslaMate links within Grafana get picked up by its SPA and therefore don't render properly.

This PR makes all of those links open in a new tab, forcing it to break out of the Grafana SPA.

Let me know if you have any questions! Notes from Codex below.


Summary

  • open the top-level TeslaMate link in every bundled Grafana dashboard in a new tab
  • leave dashboard-to-dashboard links unchanged

Why

When Grafana and the TeslaMate UI share an origin, with TeslaMate mounted under URL_PATH, following the TeslaMate link in the current tab can leave the navigation under Grafana's client-side router instead of performing a fresh top-level navigation. This results in Grafana displaying an error for the TeslaMate path.

Opening the link in a new tab performs an independent browser navigation to the configured base_url while preserving the current dashboard.

Validation

  • validated every modified dashboard as JSON
  • built the Grafana image against the repository's pinned Grafana 13.1.3 image
  • provisioned all 23 bundled dashboards in a temporary local Grafana instance
  • verified through the Grafana API that all 22 applicable TeslaMate links have targetBlank: true
  • verified in Chrome that the rendered link has the configured href, target="_blank", and rel="noreferrer", and that clicking it opens a second tab
  • git diff --check

@CLAassistant

CLAassistant commented Aug 17, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@netlify

netlify Bot commented Aug 17, 2026

Copy link
Copy Markdown

Deploy Preview for teslamate ready!

Name Link
🔨 Latest commit bd8431c
🔍 Latest deploy log https://app.netlify.com/projects/teslamate/deploys/6a83717f2800f400080b2b5f
😎 Deploy Preview https://deploy-preview-5626--teslamate.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@misenhower
misenhower marked this pull request as ready for review August 17, 2026 20:44
@JakobLichterfeld JakobLichterfeld added the note:discussion Details or approval are up for discussion label Aug 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

note:discussion Details or approval are up for discussion

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants