Dashboards & Visualizations

Influence TimeRangePicker from Upstream Module

David
Splunk Employee
Splunk Employee

I'm trying to custom-set a couple of TimeRangePickers on a view. I'd like to have an upstream module add a variable containing an epoch time to the context that the TimeRangePicker would then read and use, allowing me to pass multiple time ranges from the URL parameters via sideview_utils. I tried a couple of possible variations, but without luck. How could I do this?

Tags (1)
1 Solution

sideview
SplunkTrust
SplunkTrust

By an odd coincidence the next version of Sideview Utils that I'm working on now is applying a patch to TimeRangePicker such that it will set itself to any TimeRange value that comes down from above. You'll probably still need a CustomBehavior to turn your raw earliest/latest keys into an instance of Splunk.TimeRange, and to put that TimeRange instance inside the Search instance etc..

As to why I'm putting a patch like this in at all, it is part of a much broader system that can give all of the views in an app a sort of "passive permalinking" feature as well as full back/forward button support from search to search. ie, even in a very complex form search view, as you change elements and resubmit the search, you can use the back and forward buttons to go back and forth through your search history and the UI will restore to the previous values, even though you never have to reload the page.

I'll ping you when it's up.

View solution in original post

sideview
SplunkTrust
SplunkTrust

By an odd coincidence the next version of Sideview Utils that I'm working on now is applying a patch to TimeRangePicker such that it will set itself to any TimeRange value that comes down from above. You'll probably still need a CustomBehavior to turn your raw earliest/latest keys into an instance of Splunk.TimeRange, and to put that TimeRange instance inside the Search instance etc..

As to why I'm putting a patch like this in at all, it is part of a much broader system that can give all of the views in an app a sort of "passive permalinking" feature as well as full back/forward button support from search to search. ie, even in a very complex form search view, as you change elements and resubmit the search, you can use the back and forward buttons to go back and forth through your search history and the UI will restore to the previous values, even though you never have to reload the page.

I'll ping you when it's up.

David
Splunk Employee
Splunk Employee

Perfect! Thanks.

0 Karma
Get Updates on the Splunk Community!

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...