mirror of https://github.com/grafana/grafana
frontend for trim/apply defaults and some bug fixing (#33561)
* remove empty object and workaround on list * frontend * add toggle on frontendpull/33639/head
parent
7ccc0e838e
commit
22b2d3c38a
@ -0,0 +1,73 @@ |
||||
Verifies common usecases for trimdefault/applydefault functions: |
||||
* open structure should be kept when fields not present |
||||
|
||||
-- CUE -- |
||||
{ |
||||
templating?: list: [...{...}] |
||||
} |
||||
|
||||
-- Full -- |
||||
{ |
||||
"templating": { |
||||
"list": [ |
||||
{ |
||||
"allValue": null, |
||||
"current": { |
||||
"text": "America", |
||||
"value": "America" |
||||
}, |
||||
"datasource": "gdev-postgres", |
||||
"definition": "", |
||||
"hide": 0, |
||||
"includeAll": false, |
||||
"label": "Datacenter", |
||||
"multi": false, |
||||
"name": "datacenter", |
||||
"options": [], |
||||
"query": "SELECT DISTINCT datacenter FROM grafana_metric", |
||||
"refresh": 1, |
||||
"regex": "", |
||||
"skipUrlSync": false, |
||||
"sort": 1, |
||||
"tagValuesQuery": "", |
||||
"tags": [], |
||||
"tagsQuery": "", |
||||
"type": "query", |
||||
"useTags": false |
||||
} |
||||
] |
||||
} |
||||
} |
||||
|
||||
-- Trimed -- |
||||
{ |
||||
"templating": { |
||||
"list": [ |
||||
{ |
||||
"allValue": null, |
||||
"current": { |
||||
"text": "America", |
||||
"value": "America" |
||||
}, |
||||
"datasource": "gdev-postgres", |
||||
"definition": "", |
||||
"hide": 0, |
||||
"includeAll": false, |
||||
"label": "Datacenter", |
||||
"multi": false, |
||||
"name": "datacenter", |
||||
"options": [], |
||||
"query": "SELECT DISTINCT datacenter FROM grafana_metric", |
||||
"refresh": 1, |
||||
"regex": "", |
||||
"skipUrlSync": false, |
||||
"sort": 1, |
||||
"tagValuesQuery": "", |
||||
"tags": [], |
||||
"tagsQuery": "", |
||||
"type": "query", |
||||
"useTags": false |
||||
} |
||||
] |
||||
} |
||||
} |
||||
Loading…
Reference in new issue