All Apps and Add-ons

TimeRangePicker goes back to the default value when upstream values change

joebensimo
Path Finder

I've noticed that when I change values upstream of TimeRangePicker, the TimeRangePicker's selected time range goes back to the default.

Is there a way to prevent TimeRangePicker from going back to the default value when upstream values change? Or, do I have to put TimeRangePicker at the top of my XML hierarchy?

0 Karma

sideview
SplunkTrust
SplunkTrust

It will do this only if something upstream from the TimeRangePicker is actually setting a timerange.

In general the rule is that if a module provides some key "foo" downstream, and it sees that same key "foo" arrive from upstream, it tries to prepopulate itself to that value. This simple rule applies to basically all Sideview modules.

So for instance if you have a Search module up there, and that module defines "earliest" and "latest" params that define a "last 24 hours" search, then whenever the TimeRangePicker receives a push from upstream, TimeRangePicker will obediently set itself to "last 24 hours".

Often you can rework this by reordering the modules. Sometimes but not always the necessary reordering ends up with the view being a bit cleaner as well. Feel free to post XML or email support@sideviewapps.com and I'll provide feedback on how the view xml can be improved.

And as a last resort, assuming you have a current version of Sideview Utils, you can put this right upstream from the TimeRangePicker:

<module name="ValueSetter">
  <param name="arg.search.timeRange.earliest"></param>
  <param name="arg.search.timeRange.latest"></param>

and that will effectively blind the TimeRangePicker to the timerange coming from the upstream Search module.

But post or email your XML. It's common for folks to end up with a weird blend of core-splunk modules mixed in with sideview-style stuff and I can help you see how to clean it all up.

0 Karma
Get Updates on the Splunk Community!

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...