Make L3VPN RD/VRF filter dynamic (roadmap E4)
Both L3VPN dashboards had a static custom 'rd' variable holding only
the '-' (all) sentinel — you could not actually filter by a VRF.
Convert 'rd' to a query variable that discovers route distinguishers
from l3vpn_rib. Degrades cleanly on the (currently empty) lab table:
the query always returns '-', so behaviour is unchanged until real
L3VPN data exists, then RDs auto-populate. Existing panel SQL
('$rd' = '-' OR rd = '$rd') is untouched.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
0451b2aa87
commit
6496b60311
@ -645,27 +645,28 @@
|
|||||||
"type": "query"
|
"type": "query"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"current": {
|
|
||||||
"selected": false,
|
|
||||||
"text": "-",
|
|
||||||
"value": "-"
|
|
||||||
},
|
|
||||||
"description": "RD in the format of N:N. Set to - for all.",
|
|
||||||
"hide": 0,
|
|
||||||
"includeAll": false,
|
|
||||||
"label": "RD",
|
|
||||||
"multi": false,
|
|
||||||
"name": "rd",
|
"name": "rd",
|
||||||
"options": [
|
"type": "query",
|
||||||
{
|
"label": "RD",
|
||||||
|
"description": "Route Distinguisher (VRF). Auto-discovered from l3vpn_rib; '-' = all VRFs.",
|
||||||
|
"datasource": {
|
||||||
|
"type": "postgres",
|
||||||
|
"uid": "obmp_postgres"
|
||||||
|
},
|
||||||
|
"query": "SELECT '-' AS rd UNION SELECT DISTINCT rd FROM l3vpn_rib WHERE iswithdrawn = false ORDER BY rd",
|
||||||
|
"definition": "SELECT '-' AS rd UNION SELECT DISTINCT rd FROM l3vpn_rib WHERE iswithdrawn = false ORDER BY rd",
|
||||||
|
"refresh": 1,
|
||||||
|
"includeAll": false,
|
||||||
|
"multi": false,
|
||||||
|
"current": {
|
||||||
"selected": true,
|
"selected": true,
|
||||||
"text": "-",
|
"text": "-",
|
||||||
"value": "-"
|
"value": "-"
|
||||||
}
|
},
|
||||||
],
|
"options": [],
|
||||||
"query": "-",
|
"sort": 1,
|
||||||
"skipUrlSync": false,
|
"hide": 0,
|
||||||
"type": "custom"
|
"skipUrlSync": false
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|||||||
@ -1067,28 +1067,28 @@
|
|||||||
"useTags": false
|
"useTags": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"name": "rd",
|
||||||
|
"type": "query",
|
||||||
|
"label": "RD",
|
||||||
|
"description": "Route Distinguisher (VRF). Auto-discovered from l3vpn_rib; '-' = all VRFs.",
|
||||||
|
"datasource": {
|
||||||
|
"type": "postgres",
|
||||||
|
"uid": "obmp_postgres"
|
||||||
|
},
|
||||||
|
"query": "SELECT '-' AS rd UNION SELECT DISTINCT rd FROM l3vpn_rib WHERE iswithdrawn = false ORDER BY rd",
|
||||||
|
"definition": "SELECT '-' AS rd UNION SELECT DISTINCT rd FROM l3vpn_rib WHERE iswithdrawn = false ORDER BY rd",
|
||||||
|
"refresh": 1,
|
||||||
|
"includeAll": false,
|
||||||
|
"multi": false,
|
||||||
"current": {
|
"current": {
|
||||||
"selected": true,
|
"selected": true,
|
||||||
"text": "-",
|
"text": "-",
|
||||||
"value": "-"
|
"value": "-"
|
||||||
},
|
},
|
||||||
"description": "RD in the format of N:N. Set to - for all.",
|
"options": [],
|
||||||
|
"sort": 1,
|
||||||
"hide": 0,
|
"hide": 0,
|
||||||
"includeAll": false,
|
"skipUrlSync": false
|
||||||
"label": "RD",
|
|
||||||
"multi": false,
|
|
||||||
"name": "rd",
|
|
||||||
"options": [
|
|
||||||
{
|
|
||||||
"selected": true,
|
|
||||||
"text": "-",
|
|
||||||
"value": "-"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"query": "-",
|
|
||||||
"queryValue": "203:20",
|
|
||||||
"skipUrlSync": false,
|
|
||||||
"type": "custom"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"current": {
|
"current": {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user