Dashboards & Visualizations

Can I use a hyperlink inside a html panel of a dashboard to set or unsest a token? Hyperlink for set a token.

jtroncoso
Explorer

Can I use a hyperlink inside a html panel of a dashboard to set or unsest a token?
I want the users click on a href link in the dashboard for set or unset token to show or hide another panel in the same dashboard.
Is it possible to do this using href link?
How can I do this with a hyperlink in an html panel of a dashboard?
Example: href="set token=$showPanel2$"**
Hyperlink for set a token.
Help me. Please.

0 Karma
1 Solution

niketn
Legend

@jtroncoso, if you want to stick to Simple XML Dashboard you should check out
Splunk Link List form input which should take care of this: http://docs.splunk.com/Documentation/Splunk/latest/Viz/EventHandlerReference#link

You can also check out Splunk Dashboard Examples app from Splunkbase which has Link Switcher example: https://splunkbase.splunk.com/app/1603/

Only if there is any limitation with Splunk's Link input and you have to set tokens based on clicked hyperlink in HTML panel, you would need to do so using Simple XML JavaScript extension with jQuery to trap click event of the hyperlink and set the token using SplunkJS stack: http://dev.splunk.com/view/webframework-developapps/SP-CAAAEW3

Please let us know if Link input does not cater your need and why. We could then assist you with some sample code for JavaScript Extension.

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

View solution in original post

0 Karma

niketn
Legend

@jtroncoso, if you want to stick to Simple XML Dashboard you should check out
Splunk Link List form input which should take care of this: http://docs.splunk.com/Documentation/Splunk/latest/Viz/EventHandlerReference#link

You can also check out Splunk Dashboard Examples app from Splunkbase which has Link Switcher example: https://splunkbase.splunk.com/app/1603/

Only if there is any limitation with Splunk's Link input and you have to set tokens based on clicked hyperlink in HTML panel, you would need to do so using Simple XML JavaScript extension with jQuery to trap click event of the hyperlink and set the token using SplunkJS stack: http://dev.splunk.com/view/webframework-developapps/SP-CAAAEW3

Please let us know if Link input does not cater your need and why. We could then assist you with some sample code for JavaScript Extension.

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

jtroncoso
Explorer

I have look how to do this very good in the example "Custom Token Links" of the application "Splunk Dashboard Examples". I have been able to do what I want.
Now I can use a hyperlinks inside a html panel of a dashboard to set or unsest a token.
Thank you very much.

niketn
Legend

Glad you were able to find the exact example you needed. Even I had forgotten about it. The example uses SplunkJS stack for setting and un-setting tokens.

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

Enterprise Security Content Update (ESCU) | New Releases

In December, the Splunk Threat Research Team had 1 release of new security content via the Enterprise Security ...

Why am I not seeing the finding in Splunk Enterprise Security Analyst Queue?

(This is the first of a series of 2 blogs). Splunk Enterprise Security is a fantastic tool that offers robust ...

Index This | What are the 12 Days of Splunk-mas?

December 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...