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!

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