Dashboards & Visualizations

Bug in changing time picker values for last 7 days?

lsy9891
Engager

Hi, I managed to get the time picker label value like this:

<fieldset autoRun="true" submitButton="false">
    <input type="time" token="time_token" searchWhenChanged="true">
      <label>Select time</label>
      <default>
        <earliest>-24h@h</earliest>
        <latest>now</latest>
      </default>
      <change>
         <eval token="displayTime">$label$</eval>

       </change>
    </input>
  </fieldset>

But I realized if I change the timepicker value to last 7 days from presets then it says "Custom time' instead? How do I write an if loop to check if "Last 7 days" is chosen so I can set the label manually instead of forcing the user to choose from relative time?

0 Karma

woodcock
Esteemed Legend

The file that controls this is times.conf and you can modify the entries as well as the labels and values:
https://docs.splunk.com/Documentation/Splunk/latest/Admin/Timesconf

0 Karma

arjunpkishore5
Motivator

Could you post the sample of where displayTime is being used ? is it just in the panel headers ?

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Tech Talk Recap | Mastering Threat Hunting

Mastering Threat HuntingDive into the world of threat hunting, exploring the key differences between ...

Observability for AI Applications: Troubleshooting Latency

If you’re working with proprietary company data, you’re probably going to have a locally hosted LLM or many ...

Splunk AI Assistant for SPL vs. ChatGPT: Which One is Better?

In the age of AI, every tool promises to make our lives easier. From summarizing content to writing code, ...