{% extends "base.html" %} {% from "_header.html" import plugin_icon, nav_btns, title_block, settings_btn, subline %} {% block title %}Settings · Dashboard{% endblock %} {# Every field has data-f="" — dash.js collects them into the JSON settings.apply() takes ("places.0.lat" -> places[0].lat); errors come back naming the same path. Tabs only show / hide panes: one form, one Save for all of them. #} {% macro secret(path, label, is_set) %} {% endmacro %} {% macro band(key, b, label) %}
–
{% for d in v.weekdays %}{% endfor %}
{% endmacro %} {% macro glyph_input(path, value, label) %} {% endmacro %} {% set EDIT = {"nextcloud": ("✎ Nextcloud", "Saved to Nextcloud, opened there"), "google": ("↗ Google", "Opens Google Calendar's new-event page"), "local": ("✎ Dashboard", "Saved on the dashboard only")} %} {% block page %}
{{ nav_btns() }} {{ title_block("Settings") }} {{ settings_btn() }}
{{ subline("dash_config.json on this dashboard") }}
Some settings apply after a restart of the dashboard (≈ 20 s, the screen goes blank briefly).
{# .st-body: one grid of boxes for the open tab (dash.css). General also shows Sync and System, which save on their own and so sit outside the form, after it, merged into the same grid (.st-merge). #}
{# plugin panels (ctx.settings_panel): shown with their tab, above its fields and outside the form — they save on their own (e.g. Settings ▸ Work: the customers) #} {% for p in v.plugins if p.panel %} {% endfor %} {# Settings ▸ Users (auth.py): accounts + the household view; static/users.js fills it from /api/users #} {# Settings ▸ Sensors (plugins/stations): its static/sensors.js fills it from /stations/api/config #}
{# ======================= General ======================= #}

General

Units

Web address: {{ v.web.host }}:{{ v.web.port }} — Web pages (below) changes it.

Plugins

Switching one on or off needs no restart; its settings get their own tab above. Only a plugin's background work (Calendar, Weather and Stations fetch on their own) starts with the dashboard — after switching one of those on, restart it. Plugins live in plugins/<name>/ on the Pi.

{% for p in v.plugins %}
{% if p.error %}
{% if p.glyph or p.glyph_svg %}{{ plugin_icon(p.glyph, p.glyph_color, p.glyph_svg) }} {% endif %}{{ p.title }} failed to load

{{ p.error }} — details in journalctl -u dashboard.

{% else %} {% if p.description %}

{{ p.description }}

{% endif %} {% endif %}
{% else %}

None installed.

{% endfor %}
{# ======================= Weather ======================= #} {# ======================= Calendar ======================= #} {# ======================= one tab per plugin (pluginhost.settings_view) ======================= #} {% for p in v.plugins if not p.error and not p.core_tab %} {% endfor %}
{# Sync / System (sync.py, system.py): part of General; static/system.js fills them from /api/sync, /api/system #}
{# pictogram picker: glyphs the Symbola font has (drawn black-and-white, like on the screen) #} {% endblock %} {% block scripts %} {% endblock %}