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
Get Updates on the Splunk Community!

.conf24 | Day 0

Hello Splunk Community! My name is Chris, and I'm based in Canberra, Australia's capital, and I travelled for ...

Enhance Security Visibility with Splunk Enterprise Security 7.1 through Threat ...

(view in My Videos)Struggling with alert fatigue, lack of context, and prioritization around security ...

Troubleshooting the OpenTelemetry Collector

  In this tech talk, you’ll learn how to troubleshoot the OpenTelemetry collector - from checking the ...