From 1457373315c6a6e320fe12c27e5ed69a9fe229ad Mon Sep 17 00:00:00 2001 From: Luc Didry Date: Tue, 30 Apr 2024 08:36:55 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=84=F0=9F=93=AF=20=E2=80=94=20Improve?= =?UTF-8?q?=20notifications=20and=20result(s)=20pages?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 2 ++ argos/server/alerting.py | 8 ++++++-- argos/server/templates/result.html | 2 +- argos/server/templates/results.html | 2 +- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 608f214..3321d21 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## [Unreleased] +- 💄📯 — Improve notifications and result(s) pages + ## 0.1.1 Date: 2024-04-30 diff --git a/argos/server/alerting.py b/argos/server/alerting.py index 96f7965..173b4b1 100644 --- a/argos/server/alerting.py +++ b/argos/server/alerting.py @@ -52,7 +52,9 @@ Status: {severity} Time: {result.submitted_at} Previous status: {old_severity} -See results of task on {request.url_for('get_task_results_view', task_id=task.id)} +See result on {request.url_for('get_result_view', result_id={result.id})} + +See results of task on {request.url_for('get_task_results_view', task_id=task.id)}#{result.id} """ mail = f"""\ @@ -107,7 +109,9 @@ Status: {severity} Time: {result.submitted_at} Previous status: {old_severity} -See results of task on {request.url_for('get_task_results_view', task_id=task.id)} +See result on {request.url_for('get_result_view', result_id={result.id})} + +See results of task on {request.url_for('get_task_results_view', task_id=task.id)}#{result.id} """ payload = {"title": subject, "message": msg, "priority": priority} diff --git a/argos/server/templates/result.html b/argos/server/templates/result.html index 049e206..abd7d53 100644 --- a/argos/server/templates/result.html +++ b/argos/server/templates/result.html @@ -1,5 +1,5 @@ {% extends "base.html" %} -{% block title %}

{{ result }}

{% endblock title %} +{% block title %}

Result {{ result.id }} - {{ result.status }}

{% endblock title %} {% block content %}
Task
diff --git a/argos/server/templates/results.html b/argos/server/templates/results.html index 36ce6e9..821f365 100644 --- a/argos/server/templates/results.html +++ b/argos/server/templates/results.html @@ -13,7 +13,7 @@ {% for result in results %} - + {{ result.submitted_at }} {{ result.status }} {{ result.severity }}