{# Shared Jinja2 macros for the Hassette Web UI #} {# Status badge for apps/instances #} {% macro status_badge(status, size="", block_reason="") %} {% if status == "running" %} running {% elif status == "failed" %} failed {% elif status == "stopped" %} stopped {% elif status == "disabled" %} disabled {% elif status == "blocked" %} blocked {% else %} {{ status }} {% endif %} {% endmacro %} {# Action buttons for starting/stopping/reloading apps #} {% macro action_buttons(app_key, status, after_action="location.reload()", show_labels=true) %}