andreasgerstmayr / fava-dashboards

Custom Dashboards for Beancount in Fava
MIT License
143 stars 17 forks source link

expose yaml context above `panels:` to jinja #48

Open maxheld83 opened 1 month ago

maxheld83 commented 1 month ago
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).