{# plugins/prometheus/templates/prometheus/template.html — one widget template (#5692): its YAML beside a live preview over a chosen target, drawn as the dashboard widget draws it. An admin edits their own here, or starts one by pasting or uploading; a built-in one is read-only and can be duplicated. The preview saves nothing. #} {% extends "base.html" %} {% from "_macros.html" import crumbs, page_header %} {% from "prometheus/_tabs.html" import prometheus_tabs %} {% block title %}{{ title }} — Widget templates — Steward{% endblock %} {% block section_tabs %}{{ prometheus_tabs("templates") }}{% endblock %} {% block breadcrumb %}{{ crumbs([("Prometheus", "/plugins/prometheus/"), ("Widget templates", "/plugins/prometheus/templates/"), (title, "")]) }}{% endblock %} {% block content %} {% set admin = session.user_role == 'admin' %} {% call page_header(title, ("Built in, read-only" if entry.bundled else "Your own") if entry else none) %} {% if entry %} Export {% if admin %}Duplicate{% endif %} {% endif %} {% endcall %} {% if problems %}
{{ note }}
{% endif %} {% if entry and entry.bundled %}Ships with Steward and changes with it. To change it, duplicate it and edit the copy.
{% endif %} {% if used %}{{ used }} dashboard widget{{ "s draw" if used != 1 else " draws" }} with it{{ "; saving changes them too" if editable }}.
{% endif %}Loading…
{% if used %}{{ used }} widget{{ "s" if used != 1 }} using it will say the template is gone.{% else %}No widget uses it.{% endif %} Export it first to keep a copy.