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!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...