{% load i18n %} {% load static %} {% if dash_widgets %}

{% trans "Widgets" %}

{% trans "Live charts built from your models." %}

{% for item in dash_widgets %} {% with widget=item.widget payload=item.payload %}

{{ widget.title }}

{% if widget.chart_type == "number" %} {% elif widget.chart_type == "recent" %} {% elif widget.chart_type == "line" %} {% elif widget.chart_type == "pie" or widget.chart_type == "doughnut" or widget.chart_type == "polar" %} {% else %} {% endif %}
{% if payload.kind == "chart" %}
{{ payload|json_script:item.config_id }}
{% elif payload.kind == "number" %}

{{ payload.value|floatformat:"-2" }}

{% if payload.url %} {% trans "Manage" %} {% endif %} {% elif payload.kind == "recent" %} {% if payload.items %}
    {% for entry in payload.items %}
  • {% if entry.url %} {{ entry.label }} {% else %} {{ entry.label }} {% endif %}
  • {% endfor %}
{% else %}

{% trans "No items yet." %}

{% endif %} {% elif payload.kind == "error" %} {% else %}

{% trans "No data source configured yet — edit this widget to add one." %}

{% endif %}
{% endwith %} {% endfor %}
{% endif %}