Dashboards & Visualizations

Time picker inherit from another time picker

PavelNed
Explorer

Hello,

I have two time pickers that I use in a dashboard. One of them sets time for whole dashboard, second one should set time for one table. Usage should be something like this:

  1. On page load, second time picker initializes with same time as the first one.
  2. On main time picker change, second time picker gets the value of main.
  3. When second time picker is changed, that one table gets it's value, other panels remain with main time picker.

My code looks like this:

 

<input type="time" token="time_picker" searchWhenChanged="true">
   <label></label>
   <default>
      <earliest>0</earliest>
      <latest></latest>
   </default>
   <change>
      <set token="time_picker_2.earliest">$time_picker.earliest$</set>
      <set token="time_picker_2.latest">$time_picker.latest$</set>
   </change>
</input>
<input type="time" token="time_picker_2" searchWhenChanged="true">
   <label></label>
   <default>
     <earliest>$time_picker.earliest$</earliest>
     <latest>$time_picker.latest$</latest>
   </default>
</input>

 

This code somehow works. If I change main time range, token for second time range updates and recreates the table. But - UI time range remains unchanged, so when main picker is changed from All time to Last 30 days, table data are from that time range, but second time picker shows from still as 1/1/1970.

Any ideas how to make time picker UI update?

Thank you.

Labels (1)
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!

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

Data Persistence in the OpenTelemetry Collector

This blog post is part of an ongoing series on OpenTelemetry. What happens if the OpenTelemetry collector ...