* TimeRangePicker: allow to customize quick ranges per dashboard
* TimeRangePicker: show selected custom time range using its name
* rangeutil: add tests for describeTextRange + quickRanges
* Fix up tests, and add an extra case for hidden time ranges
* Don't construct an object to find options, add findRangeInOptions util
* fix type errors detected by TypeScript
---------
Co-authored-by: joshhunt <josh@trtr.co>
@ -136,6 +136,18 @@ The grid has a negative gravity that moves panels up if there is empty space abo
"now": true,
"hidden": false,
"nowDelay": "",
"quick_ranges": [
{
"display": "Last 6 hours"
"from": "now-6h",
"to": "now"
},
{
"display": "Last 7 days"
"from": "now-7d",
"to": "now"
}
],
"refresh_intervals": [
"5s",
"10s",
@ -163,6 +175,7 @@ Usage of the fields is explained below:
| **now** | |
| **hidden** | whether timepicker is hidden or not |
| **nowDelay** | override the now time by entering a time delay. Use this option to accommodate known delays in data aggregation to avoid null values. |
| **quick_ranges** | custom quick ranges |
| **refresh_intervals** | interval options available in the refresh picker dropdown |