All Apps and Add-ons

Simple Redirect Drilldown Every Link on Dashboard

subtrakt
Contributor

Hi,

In a dashboard, what's the simplest way to make every link including timechart drill-down open a new tab?

Thanks!

1 Solution

nfilippi_splunk
Splunk Employee
Splunk Employee

As of Splunk 6, Simple XML only supports this behavior for dynamic drilldown, where the syntax would look something like this:

<drilldown target="_blank">
  <link>
    <![CDATA[search?q=[your search query here]&earliest=$earliest$&latest=$latest$]>
  </link>
</drilldown>

http://docs.splunk.com/Documentation/Splunk/latest/Viz/PanelreferenceforSimplifiedXML#Drilldown_elem...

View solution in original post

sideview
SplunkTrust
SplunkTrust

If you use Sideview Utils, then what you would do is put

<param name="target">_blank</param> into all your Redirector modules.

Unfortunately even with this that param, chart and table drilldowns will still open a new window. I suspect this is also true of all the other answers listed here (simple XML drilldown and holding down CTRL).

The one exception is that if you have simple blue links, made with either a Link module with a downstream Redirector, or with an HTML module (and maybe a ValueSetter to url-encode keys), then those blue links will indeed open a new tab instead of a new window.

The reason is that all these methods are opening the new window with Javascript, whereas a click can only ever open a new tab if a) it is literally an HTML <a> element handling the click. b) the browser's options are set that plain links open a new tab instead of a new window (which they generally are these days).

The reason the Link+Redirector combination does open a new tab, is that some recent work was done in the Link module, where if it sees that it only has a single child and that child is a Redirector, it takes on more responsibility and kinda pulls up the functionality so that the action is taken right on the anchor-tag click rather than being delegated to the Redirector's javascript. This was done specifically because so many users had asked for clicks to open in new tabs and I was tired of saying it couldn't be done.

0 Karma

nfilippi_splunk
Splunk Employee
Splunk Employee

As of Splunk 6, Simple XML only supports this behavior for dynamic drilldown, where the syntax would look something like this:

<drilldown target="_blank">
  <link>
    <![CDATA[search?q=[your search query here]&earliest=$earliest$&latest=$latest$]>
  </link>
</drilldown>

http://docs.splunk.com/Documentation/Splunk/latest/Viz/PanelreferenceforSimplifiedXML#Drilldown_elem...

View solution in original post

sideview
SplunkTrust
SplunkTrust

just for reference this will open the links in a new window, not in a new tab.

aelliott
Motivator

you could hit ctrl while clicking

0 Karma

subtrakt
Contributor

Thanks, is there a way to do it without sideview?

0 Karma

sideview
SplunkTrust
SplunkTrust

Are you asking just about dashboards that use Sideview Utils modules? If so then the best answer is to put <param name="target">_blank</param> into all your Redirector modules, and to use the Link module with a Redirector downstream for all your simple blue links.

0 Karma
Register for .conf21 Now! Go Vegas or Go Virtual!

How will you .conf21? You decide! Go in-person in Las Vegas, 10/18-10/21, or go online with .conf21 Virtual, 10/19-10/20.