Hello community,
I am trying to implement a drill-down functionality to my Vega panel able to send, alongside a manually set query filter, the time range inherited from my origin dashboard.
The version that I was able to reach now successfully sets the query filter, however it fails to set the time range on the target dashboard.
{
"$schema": "https://vega.github.io/schema/vega/v5.json",
"description": "Drill-down panel",
"autosize": {
"type": "fit",
"resize": true
},
"data": [
{
"name": "source",
"url": {
"index": "logstash-*",
"%context%": true,
"%timefield%": "@timestamp",
"body": {
"size": 0,
"aggs": {
"total": { "cardinality": { "field": "log_level.keyword" } }
}
}
},
"format": {
"property": "aggregations"
}
}
],
"marks": [
{
"type": "rect",
"from": { "data": "source" },
"encode": {
"enter": {
"x": { "value": 0 },
"y": { "value": 0 },
"width": { "signal": "width" },
"height": { "signal": "height" },
"href": {
"signal": "datum.total.value > 0 ? 'kibana#/dashboard/ef819120-c89d-11ed-9e40-91687efc2428?_a=(filters:!((%27$state%27:(store:appState),exists:(field:log_level))))&_g=(time:(from:datum.timeRangeFrom,to:datum.timeRangeTo))' : null",
"target": "_self"
},
"tooltip": {"signal": "datum.total.value > 0 ? 'Click for details' : null"}
}
}
}
]
}
I'm not sure if timeRangeFrom and timeRangeTo actually hold the actual limits of the data time range, but certainly they don't work the way I use them.
Is it even possible to set the time range this way? Is there any useful resource where I can learn more regarding this topic?
Thank you, and I would appreciate any input.