Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support "include All" option for custom template #149

Open
manueligno78 opened this issue Jun 11, 2019 · 2 comments · May be fixed by #161
Open

Support "include All" option for custom template #149

manueligno78 opened this issue Jun 11, 2019 · 2 comments · May be fixed by #161
Labels

Comments

@manueligno78
Copy link
Contributor

includeAll flag is not working properly.
YAML snippet:

...
    - custom-template:
        name: service
        options: 
          - option 1
          - option 2
        includeAll: true
        multi: true
        current: All
...

This is the output:

...
      {
        "current": {
          "text": "All",
          "value": "All"
        },
        "datasource": null,
        "includeAll": true,
        "multi": true,
        "name": "service",
        "options": [
          {
            "text": "option 1",
            "value": "option 1"
          },
          {
            "text": "option 2",
            "value": "option 2"
          }
        ],
        "query": "option 1,option 2",
        "refresh": 0,
        "refresh_on_load": false,
        "type": "custom"
      }
...

Output should be:

...
        "current": {
          "tags": [],
          "text": "All",
          "value": "$__all"
        },
        "datasource": null,
        "hide": 0,
        "includeAll": true,
        "label": "",
        "multi": false,
        "name": "service",
        "options": [
          {
            "selected": true,
            "text": "All",
            "value": "$__all"
          },
...
@jakubplichta
Copy link
Owner

@manueligno78 which grafana version are you using? I'm pretty sure that this worked well in the past..

@manueligno78
Copy link
Contributor Author

5.3.2 and 5.1.3. I dont know if it works on 6.x versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants