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

expose yaml context above panels: to jinja #48

Open
maxheld83 opened this issue May 14, 2024 · 0 comments
Open

expose yaml context above panels: to jinja #48

maxheld83 opened this issue May 14, 2024 · 0 comments

Comments

@maxheld83
Copy link
Contributor

maxheld83 commented May 14, 2024

dashboards:
  foo: 1
  - name: Lorem
    bar: 2
    panels:
      baz: 3
      - title: Ipsum
    type: jinja2
    template: {{ dashboards.foo }} {{ dashboards.lorem.bar }} {{ panel.baz }}

Currently (as documented), from the above template, only panel.baz is available to jinja2.

For greater DRY it'd be great to be able to use variables from higher up in the YAML.

(My use case: reusing query components).

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

No branches or pull requests

1 participant