Hi,
I want to enable or disable a dashboard panel based on a drop-down value. For example, there are 2 values in drop-down and 2 panels say-
Drilldown has 2 values - A and B
Panels- 1 and 2
If A is selected 2 panel is hidden and 1 is displayed
If B is selected, 1 is hidden 2 is displayed.
Any pointers would be helpful on the same.
Hi,
you can take a look at the depends and rejects tags of the panel: Link
You should be able to set an token based on your dropdown and with the depends and reject tokens your decide if a panel is shown or not. There is a realy good example in the "Splunk 6.2 Overview" app called "Universal Hide-Show Objects".
Greetings
Tom
Hi,
you can take a look at the depends and rejects tags of the panel: Link
You should be able to set an token based on your dropdown and with the depends and reject tokens your decide if a panel is shown or not. There is a realy good example in the "Splunk 6.2 Overview" app called "Universal Hide-Show Objects".
Greetings
Tom
Hi Rahul,
Even I have a similar requirement wherein , the respective dashboard should display depending on the dropdown selection.
Can you please let me know how you got this done?
Can you please provide the source code?
Thanks in advance for the help.
Harishma,
With the new version of splunk, you can use the tag in the dashboard and can basically assign the dropdown value to a token and can use the same in the depends on tag.
For previous versions, i had changed my dashboard to a html dashboard and then caught the drilldown event and used if else to compare its values and enable/disable the panels.
Refer to the below link:-
https://answers.splunk.com/answers/188709/how-to-display-dashboard-panels-dynamically.html
Hope that solves your issue.
Hi Tom,
Thanks you very much but i'm afraid i forgot to include here that i'm using Splunk 6.1. Heard someone telling me to make use of JS and MVC , not sure how to do that as i'm relatively new here.
Yeah this might also be a solution. Sorry i can not provide a complete solution for this way. But basically, you have to call a js file within your view (Doku). Within the js you can check the value of your dropdown and with this information you can hide/show the panels. This can happen for example via css display: none or something similar. However, you need some experience with js and the splunk webframework to get such an solution up and running. ou can check out splunk dev for some tutorials on this topic.
Greetings
Tom
Thanks Tom, i finally found a way of doing the same. Just caught the drilldown event and used if else to compare its values and enable/disable the panels. Thanks for your help .
Guys any pointers would be welcome.