grafana-flowcharting icon indicating copy to clipboard operation
grafana-flowcharting copied to clipboard

Feature: Open links in current tab

Open ghost opened this issue 5 years ago • 3 comments

Is it possible to add configuration of whether a link is opened in a new tab or in the current one? Right now it always opens in a new tab. It would be good to be able to remain in the current tab.

ghost avatar Jan 21 '20 09:01 ghost

Ho @thomasgolding-cognite, thx for your suggestion. Why not

algenty avatar Jan 21 '20 14:01 algenty

Hi, that new feature would help my project too. Unfortunately, I don't see it mentioned in your roadmap of new things. Would you mind to prioritize it ? Hope it does not require you too much effort.

Many thanks Lorenzo

IT024551 avatar Apr 07 '20 16:04 IT024551

Hi there.

Apparently, draw.io now seems to have the option to have links open in new windows or not. Would it be possible to adapt to it?

image


In the meantime, if your grafana dashboard is in an iframe, you can rewrite the iframe's window.open function so that the flowcharting link loads in that iframe :

var iframe = $("#your_iframe_id");

function rewriteWindowOpen() {
  iframe[0].contentWindow.open = function(url, windowName, windowFeatures) {
   iframe.attr("src", url);
  }
})

iframe.on("load", rewriteWindowOpen);

If you don't embed your grafana in an iframe, I haven't tested it but you can probably add a Text dashboard, after enabling the disable_sanitize_html option in the config, and rewriting the window.open function from there.

Webbeh avatar May 03 '21 16:05 Webbeh