diff --git a/CHANGELOG.md b/CHANGELOG.md index 80ad852..9d84fea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ - ✨ — Add new check type: http-to-https (#61) - 👷 — Remove Unreleased section from CHANGELOG when publishing documentation - 🩹 — Severity of ssl-certificate-expiration’s errors is now UNKNOWN (#60) +- 💄 — Better display of results’ error details ## 0.4.1 diff --git a/argos/server/routes/views.py b/argos/server/routes/views.py index fe48566..6dc5ace 100644 --- a/argos/server/routes/views.py +++ b/argos/server/routes/views.py @@ -14,6 +14,7 @@ from passlib.context import CryptContext from sqlalchemy import func from sqlalchemy.orm import Session +from argos.checks.base import Status from argos.schemas import Config from argos.server import queries from argos.server.models import Result, Task, User @@ -190,7 +191,7 @@ async def get_result_view( """Show the details of a result""" result = db.query(Result).get(result_id) return templates.TemplateResponse( - "result.html", {"request": request, "result": result} + "result.html", {"request": request, "result": result, "error": Status.ERROR} ) @@ -220,6 +221,7 @@ async def get_task_results_view( "results": results, "task": task, "description": description, + "error": Status.ERROR, }, ) diff --git a/argos/server/templates/result.html b/argos/server/templates/result.html index abd7d53..634c0e4 100644 --- a/argos/server/templates/result.html +++ b/argos/server/templates/result.html @@ -3,7 +3,11 @@ {% block content %}
{{ result.context['error_details'] | replace('\n', '
') | safe }}
+ {{ result.context["error_details"] | replace("\n", "
") | safe }}
+