Dashboards & Visualizations

Question on button drilldown

prettysunshinez
Explorer

I have a html button in my dashboard..is there a way if i click on it it will navigate to a different page and perform a splunk search.

Thanks in advance!!

Tags (1)
0 Karma

TheEggi98
Path Finder

I made a Dashboard with drilldownbuttons without using HTML nor JS.
Note that its most likely not best practice but it works. ^^
I made a Lookup CSV with shortage and text
( example: shortage=showD, text=Show Details )
and use a searchmacro to get the lookup data
( searchmacro: inputlookup dashboardhelper | search shortage="$short$" | table text ).
I can simply insert a SingleValue to my Dashboard with the search:  | `dashboardhelper(showD)`
and can set, unset tokens or do other Drilldown actions in the SingleValue.

0 Karma

bowesmana
SplunkTrust
SplunkTrust

Making elements conditional uses the

 <xxx depends="$token$">

where xxx can generally be one of the XML elements in your dashboard. You can use this on html panels too, so I have often used buttons in with depends=. Then when a button is pressed, it sets/clears tokens as necessary.

See the Splunk dashboard examples app, which has some very simple guidelines on how to do just what you want - and it's quite simple. See the example called "Custom Token Links".

0 Karma

niketn
Legend

@prettysunshinez yes for HTML button you would need to code the drill down URL in JS. There is an alternative where you can display a table cell as button and confugure drilldown for table cell using SimpleXML.
Refer to one of my recent answer for above of using table cell like button which allows drilldown through SimpleXML approach: https://answers.splunk.com/answers/779524/can-an-html-button-with-value-be-done-without-usin-1.html#...

Same question also has another answer by Splunkers which will give you steps to code html button click handler using Simple XML JS extension.

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma

prettysunshinez
Explorer

Thank you...
having table cell as button and having the drilldown properties set to them works.
But would want to know if we can make "hide details" button get displayed only after clicking the "show details" button pls..

Thanks in advance.

0 Karma

prettysunshinez
Explorer

And I also tried using the one in the below link without JS script but It is not working.

https://answers.splunk.com/answers/563964/how-can-i-make-one-button-unset-other-button-token.html

0 Karma

prettysunshinez
Explorer

@niketnilay Could you kindly suggest

0 Karma

niketn
Legend

@prettysunshinez please refer to another answer of mine which has discussion on creating a link switcher which toggles on click.

https://answers.splunk.com/answers/581652/how-can-i-create-a-button-switcher.html

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma
Get Updates on the Splunk Community!

Wondering How to Build Resiliency in the Cloud?

IT leaders are choosing Splunk Cloud as an ideal cloud transformation platform to drive business resilience,  ...

Updated Data Management and AWS GDI Inventory in Splunk Observability

We’re making some changes to Data Management and Infrastructure Inventory for AWS. The Data Management page, ...

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...