grafana / grafonnet

Jsonnet library for generating Grafana dashboards.
https://grafana.github.io/grafonnet/
Apache License 2.0
320 stars 18 forks source link

Allow to set the default value to "All" #166

Open Duologic opened 4 months ago

Duologic commented 4 months ago

Reverse engineered this is how it looks like for a custom query:

{
        "current": {
          "selected": true,
          "text": [
            "All"
          ],
          "value": [
            "$__all"
          ]
        },
        "hide": 0,
        "includeAll": true,
        "multi": true,
        "name": "abc",
        "options": [
          {
            "selected": true,
            "text": "All",
            "value": "$__all"
          },
          {
            "selected": false,
            "text": "'true'",
            "value": "'true'"
          },
          {
            "selected": false,
            "text": "'false'",
            "value": "'false'"
          },
          {
            "selected": false,
            "text": "'limited'",
            "value": "'limited'"
          }
        ],
        "query": "'true', 'false', 'limited'",
        "queryValue": "",
        "skipUrlSync": false,
        "type": "custom"
      }