All Apps and Add-ons

Side View Utils: changing tab focus when clicking on chart.

keerthana_k
Communicator

Hi,

We are using Splunk version 5.0.4 and sideview utils app in our application. In our dashboard, we are using tab switcher module to display charts under different categories. Our requirement is to change from one tab to the other when a particular chart is clicked. More specifically, the drill down of one chart should take us to another tab of the same dashboard, with the click arguments passed. Is there any way we can do this?

Thanks in advance.

Tags (1)
1 Solution

sideview
SplunkTrust
SplunkTrust

Yes it's possible. It sounds like you're using the Splunk TabSwitcher module though and you will have to make the leap to using the Sideview Tabs and Switcher modules instead. Tabs + Switcher is one of a very small number of cases where you need two Sideview modules to do what a Splunk module does - usually it's the reverse.

So, the easiest way is that in your chart drilldown you have a Redirector module, and you have the url param be the same view the user is already on. Then you pass also a key whose name is the name param of the Tabs module, and whose value is the value of the tab you want to switch to. Pass all other arguments as necessary to run the page correctly, and make sure you have a UrlLoader module at the top of the view.

that will be sufficient to make the chart click basically switch to the second tab and run the second search using your drilldown arguments from the chart click. Technically the user will reload the page but it will happy quickly.

It would technically be possible to also implement this using a Gate module and no custom code, and the user would never actually reload the page. However it is a lot simpler and less brainbending to do it the way I've described above. If you're interested in the Gate module solution just email me at nick [at] sideviewapps.com and I'll spill the beans.

And thirdly, it's also possible to write a CustomBehavior or two to script the interaction with a few lines of custom code.... but I don't recommend that simply because custom code will always cause you headaches in the long run.

View solution in original post

0 Karma

sideview
SplunkTrust
SplunkTrust

Yes it's possible. It sounds like you're using the Splunk TabSwitcher module though and you will have to make the leap to using the Sideview Tabs and Switcher modules instead. Tabs + Switcher is one of a very small number of cases where you need two Sideview modules to do what a Splunk module does - usually it's the reverse.

So, the easiest way is that in your chart drilldown you have a Redirector module, and you have the url param be the same view the user is already on. Then you pass also a key whose name is the name param of the Tabs module, and whose value is the value of the tab you want to switch to. Pass all other arguments as necessary to run the page correctly, and make sure you have a UrlLoader module at the top of the view.

that will be sufficient to make the chart click basically switch to the second tab and run the second search using your drilldown arguments from the chart click. Technically the user will reload the page but it will happy quickly.

It would technically be possible to also implement this using a Gate module and no custom code, and the user would never actually reload the page. However it is a lot simpler and less brainbending to do it the way I've described above. If you're interested in the Gate module solution just email me at nick [at] sideviewapps.com and I'll spill the beans.

And thirdly, it's also possible to write a CustomBehavior or two to script the interaction with a few lines of custom code.... but I don't recommend that simply because custom code will always cause you headaches in the long run.

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

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

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...