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!

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