fix(grafana): open TeslaMate links in new tab - #5626
Open
misenhower wants to merge 1 commit into
Open
Conversation
✅ Deploy Preview for teslamate ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
misenhower
marked this pull request as ready for review
August 17, 2026 20:44
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 settingtargetBlankto 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
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_urlwhile preserving the current dashboard.Validation
targetBlank: truehref,target="_blank", andrel="noreferrer", and that clicking it opens a second tabgit diff --check