All Apps and Add-ons

How do I configure a button to go from a view back to original dashboard but keeping the custom timerange?

chizops
Path Finder

So I read an answer at http://splunk-base.splunk.com/answers/22708/how-to-pass-on-the-selected-timerange-in-timerangepicker... that shows how to pass on the the selected timerange from the originating dashboard to the TimeRangepicker module on the target view. But now I want to create a button that goes from the view back to the dashboard using the same timeframe. I've created the button with the same type of redirector that brought me to the view in the first place but all it does is bring me back to the dashboard with the default time (Last 15 minutes). Any thoughts on how to go back to the dashboard using the same custom time I selected previously? Also, it appears that I need to click the button twice.

0 Karma
1 Solution

sideview
SplunkTrust
SplunkTrust

Well, if you take a step back, I think the best way to address this situation is to turn the back button on in the first view.

The way that you turn on Sideview's back button support, for any view that has textfields, checkboxes pulldowns, search bars, etc... is as follows:

a) wrap all of the user-editable modules in a URLLoader module, if there isn't one in there already. (By wrap I mean nest everything inside the URLLoader module. read the framework intro docs in Sideview Utils 2.2.2 if you've never been clear on what that means or what it does)

b) set the URLLoader module's keepUrlUpdated param to True.

That's it. That view will now push little tokens up into the URL whenever you make any change to a TextField, Pulldown, Checkbox, SearchBar, TimeRangePicker etc... It wont remember all things, like it wont restore clicked legend items in your charts, and it wont restore selected rows in SimpleResultsTables, but that's ok (because for some reason nobody expects it to).

And this wont actually require any changes or additions to your second view. If you change some stuff in view #1, then click a drilldown that takes you to view #2, and then use the back button to go back to view #1, well you'll go back to the 'last state of view #1', which means whatever most recent timerange you had on there, will get selected again.

I think this is the real answer to your question. However if instead you really do want a special button on view #2 that serves as a hardwired 'back' button to take the user back to view #1, that's not that hard to do either. Let me know and I can add that as an update. But I think your idea solution is that the "back button just works", and that's what I described above.

Make sure you get the latest Sideview Utils (2.2.2) from the Sideview site, because in older versions of Utils there was some unaddressed funkiness around 'all time' time ranges and some other items were fixed as well.

http://sideviewapps.com/apps/sideview-utils/

View solution in original post

sideview
SplunkTrust
SplunkTrust

Well, if you take a step back, I think the best way to address this situation is to turn the back button on in the first view.

The way that you turn on Sideview's back button support, for any view that has textfields, checkboxes pulldowns, search bars, etc... is as follows:

a) wrap all of the user-editable modules in a URLLoader module, if there isn't one in there already. (By wrap I mean nest everything inside the URLLoader module. read the framework intro docs in Sideview Utils 2.2.2 if you've never been clear on what that means or what it does)

b) set the URLLoader module's keepUrlUpdated param to True.

That's it. That view will now push little tokens up into the URL whenever you make any change to a TextField, Pulldown, Checkbox, SearchBar, TimeRangePicker etc... It wont remember all things, like it wont restore clicked legend items in your charts, and it wont restore selected rows in SimpleResultsTables, but that's ok (because for some reason nobody expects it to).

And this wont actually require any changes or additions to your second view. If you change some stuff in view #1, then click a drilldown that takes you to view #2, and then use the back button to go back to view #1, well you'll go back to the 'last state of view #1', which means whatever most recent timerange you had on there, will get selected again.

I think this is the real answer to your question. However if instead you really do want a special button on view #2 that serves as a hardwired 'back' button to take the user back to view #1, that's not that hard to do either. Let me know and I can add that as an update. But I think your idea solution is that the "back button just works", and that's what I described above.

Make sure you get the latest Sideview Utils (2.2.2) from the Sideview site, because in older versions of Utils there was some unaddressed funkiness around 'all time' time ranges and some other items were fixed as well.

http://sideviewapps.com/apps/sideview-utils/

chizops
Path Finder

Thnx, this worked!! You're awesome!

0 Karma

farooq3679
Engager

Is there a way to do without using the app

0 Karma
Get Updates on the Splunk Community!

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 ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...