All Apps and Add-ons

TimeRangePicker not retain(sticky) selected value on dashboard

phoenixdigital
Builder

Using Splunk 5.0.1

I have been having an issue with TimeRangePicker not remembering its setting when you either

  1. Leave the dashboard and return
  2. Change the pulldown just before the TimeRangePicker

In both instances the TimeRangePicker resets back to 'in the last hour'.

<module name="Search" layoutPanel="panel_row1_col1" autoRun="True">
    <param name="search">| inputlookup stations.csv | search REGIONID="SA1" OR REGIONID="NSW1" | fields REGIONID station</param>
    <param name="earliest">-1hour</param>
    <param name="latest">now</param>
    <module name="Pulldown">
        <param name="name">station</param>
        <param name="label">Station</param>
        <param name="template">station="$value$"</param>
        <param name="float">left</param>
        <param name="valueField">$name$</param>
        <module name="TimeRangePicker" autoRun="True">
            <param name="searchWhenChanged">True</param>
            <module name="SubmitButton">
                <param name="label">Search</param>
                <param name="updatePermalink">True</param>
                <param name="allowSoftSubmit">True</param>
                <param name="visible">False</param>
                <module name="Search" layoutPanel="panel_row2_col1" autoRun="True" group="Proposal triggers">

I also tried adding a default and selected as well but these had no effect either.

<param name="default">Last 24 hours</param>
<param name="selected">Last 24 hours</param>

Lastly my view description also contains the isSticky value as well.

<view autoCancelInterval="90" isVisible="true" objectMode="SimpleForm" onunloadCancelJobs="true" template="dashboard.html" isSticky="true">

Any ideas what is going wrong here?

Is there a way to have TimeRangePicker remember what it was set to when other form elements are changed or when the page is returned to?

0 Karma
1 Solution

phoenixdigital
Builder

Its funny how verbalising or putting a question down on paper/forum can let you see the resolution.

The culprit is the earliest and latest in the first Pulldown

<param name="earliest">-1hour</param>
<param name="latest">now</param>

I removed these and it works perfectly now.

Thanks me!

View solution in original post

0 Karma

phoenixdigital
Builder

Its funny how verbalising or putting a question down on paper/forum can let you see the resolution.

The culprit is the earliest and latest in the first Pulldown

<param name="earliest">-1hour</param>
<param name="latest">now</param>

I removed these and it works perfectly now.

Thanks me!

0 Karma
Get Updates on the Splunk Community!

Shape the Future of Splunk: Join the Product Research Lab!

Join the Splunk Product Research Lab and connect with us in the Slack channel #product-research-lab to get ...

Auto-Injector for Everything Else: Making OpenTelemetry Truly Universal

You might have seen Splunk’s recent announcement about donating the OpenTelemetry Injector to the ...

[Puzzles] Solve, Learn, Repeat: Character substitutions with Regular Expressions

This challenge was first posted on Slack #puzzles channelFor BORE at .conf23, we had a puzzle question which ...