Dashboards & Visualizations

simpleresultstable with a column of HyperLinks

davecroto
Splunk Employee
Splunk Employee

I am considering a new module that would allow a way to "link" to a URI in a dashboard table? I have a need to build a table and one of the columns is a bunch of "referrals". Need to be able to go right out and link to the actual page from the dashboard table. I haven't figured a way to do it with core. Any thoughts?

Tags (2)
0 Karma

sideview
SplunkTrust
SplunkTrust

Well if you're a) proficient with Javascript, b) you're familiar with the javascript methods and classes around the Splunk module framework, and c) you can follow the javascript on this page: http://dev.splunk.com/view/SP-CAAADT7,

then you can add some javascript to application.js. The idea is that you carefully patch the existing Javascript methods on the SimpleResultsTable module. I know that some people have specifically done this kind of patch -- where the clicks go to a page whose URL is defined in a particular cell of the table. It's messy and you really do have to understand the Javascript that you're modifying, but it can be done.

However if you're using Sideview Utils this becomes a great deal easier.

Let's say that your table has a field displayed called "referer". Let's also say that your SimpleResultsTable is configured with "drilldown" set to "row", such that the user selects the entire row when they click.

At this simplest level, with Sideview Utils you can give your SimpleResultsTable this child:

<module name="Redirector">
   <param name="url">$click.fields.referer$</param>
</module>

And then when the user clicks on a given row, the browser will go to the URL represented by the referer field in that row. Note that Redirector also has a "popup" param that can be useful here, and I recommend that you apply some CSS, so that the table looks a little different; Splunk users will usually not expect clicking a Splunk table to tear them out of the Splunk UI...

On the other hand, your table might be configured with drilldown set to "all" rather than "row", meaning that that when the user clicks, he/she selects both a row and a column. If you want such a table to redirect the user only when the 'referer' column is clicked and not when other columns are clicked, then the Redirector module isn't what you want and you'll need to write what Sideview calls a customBehavior. A Sideview customBehavior is similar to the JS patch described in the link above, but easier to deal with and a lot less brittle. And as always, Sideview Utils itself contains documentation about this feature.

0 Karma
Get Updates on the Splunk Community!

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...