fix(prometheus): word the template audit actions; keep the list verdict's apostrophe out of an autoescaped expression (#5692)
Run 9093: test_every_logged_action_is_worded wanted the three prometheus.template_* actions in ACTIONS, and the list's verdict wrote "doesn't" as a Jinja string literal, which autoescape turns into '. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -17,7 +17,8 @@
|
||||
{% endcall %}
|
||||
|
||||
<p class="page-verdict">
|
||||
{%- if broken %}<span class="tone-warn">{{ broken|length }} template{{ "s don't" if broken|length != 1 else " doesn't" }} pass the checker; widgets drawn with {{ "them" if broken|length != 1 else "it" }} say so.</span>
|
||||
{%- if broken|length == 1 %}<span class="tone-warn">1 template doesn't pass the checker; widgets drawn with it say so.</span>
|
||||
{%- elif broken %}<span class="tone-warn">{{ broken|length }} templates don't pass the checker; widgets drawn with them say so.</span>
|
||||
{%- else %}{{ templates|length }} template{{ "s" if templates|length != 1 }}: {{ templates|length - own|length }} built in, {{ own|length }} of your own.{% endif %}
|
||||
</p>
|
||||
<p class="field-hint">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.</p>
|
||||
|
||||
@@ -190,6 +190,9 @@ ACTIONS = {
|
||||
"prometheus.target_created": "added Prometheus target",
|
||||
"prometheus.target_updated": "changed Prometheus target",
|
||||
"prometheus.target_deleted": "deleted Prometheus target",
|
||||
"prometheus.template_created": "added Prometheus widget template",
|
||||
"prometheus.template_updated": "changed Prometheus widget template",
|
||||
"prometheus.template_deleted": "deleted Prometheus widget template",
|
||||
"backup.made": "sent a backup",
|
||||
"backup.failed": "tried to send a backup, which failed:",
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user