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?
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.
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.
Perfect! Thanks.