andreasgerstmayr / fava-dashboards

Custom Dashboards for Beancount in Fava
MIT License
178 stars 21 forks source link

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

Open maxheld83 opened 6 months ago

maxheld83 commented 6 months 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).