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!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...