va2dim
1
Hi, what a the options to extend predefined timepicker variable (influxDB OSS v2.7) with extra values for long periods - 3mo, 6mo, 1y?
Dont like idea to have extra custom variable.
I would like to add these values specifically for one particular dashboard (if not - globally for all dashboards).
(Calendar precision (e.g., exact month match) is not critical, so approximate durations in days (90, 180, 365d) are acceptable.)
Anaisdg
2
Hello @va2dim,
I tried to create a custom query variable with:
import "array"
import "date"
time90 = date.sub(from: now(), d: 90d)
rows = [{_value: time90}]
array.from(rows: rows)
and named as time90
And here you can use it in a query:
import "array"
import "date"
rows = [{_value: v.time90}]
array.from(rows: rows)
but I’m not sure why it isn’t returning any results.
When this example works:
setting listbuckets variable
buckets()
|> rename(columns: {"name": "_value"})
|> keep(columns: ["_value"])
and this query works:
import "array"
import "date"
rows = [{_value: v.listbuckets}]
array.from(rows: rows)
Anaisdg
3
So in theory theres a way to get these variables to work i just don’t know exactly what that is. But maybe play around with them some more?
va2dim
4
I can put “14d”, “90d”, “365d” in custom variable, but not understand howto to update with this values component timepicker?
dont catch how this help
buckets()
|> rename(columns: {“name”: “_value”})
|> keep(columns: [“_value”])