{# plugins/prometheus/templates/prometheus/templates.html — the widget templates the Prometheus dashboard widget can draw with (#5692): the ones built in and the ones copied in here. One that no longer passes the checker comes first, saying why: its widgets say so too. #} {% extends "base.html" %} {% from "_macros.html" import crumbs, page_header %} {% from "prometheus/_tabs.html" import prometheus_tabs %} {% block title %}Widget templates — Prometheus — Steward{% endblock %} {% block section_tabs %}{{ prometheus_tabs("templates") }}{% endblock %} {% block breadcrumb %}{{ crumbs([("Prometheus", "/plugins/prometheus/"), ("Widget templates", "")]) }}{% endblock %} {% block content %} {% set admin = session.user_role == 'admin' %} {% set broken = templates|selectattr("problem")|list %} {% set own = templates|rejectattr("bundled")|list %} {% call page_header("Widget templates") %} {% if admin %}New template{% endif %} {% endcall %}

{%- if broken|length == 1 %}1 template doesn't pass the checker; widgets drawn with it say so. {%- elif broken %}{{ broken|length }} templates don't pass the checker; widgets drawn with them say so. {%- else %}{{ templates|length }} template{{ "s" if templates|length != 1 }}: {{ templates|length - own|length }} built in, {{ own|length }} of your own.{% endif %}

A template says which of a target's series the Prometheus dashboard widget shows, and how. Built-in ones can be copied and changed; your own you write here, or paste or upload one someone shared.

{% for t in templates %} {% endfor %}
TemplateVersionUsed byChangedActions
{{ t.name }} {% if t.bundled %} built in{% endif %} {%- if t.problem %}
{{ t.problem }}
{%- elif t.description %}
{{ t.description }}
{% endif %}
{{ t.version if t.version is not none else "—" }} {% if t.used %}{{ t.used }} widget{{ "s" if t.used != 1 }}{% else %}none{% endif %} {% if t.updated_at %}{{ t.updated_at|ago }}{% else %}with Steward{% endif %} Export {% if admin %}Duplicate{% endif %}
{% endblock %}