project-alert edits: fix misalignments (by asking ChatGPT)

This commit is contained in:
Klaas van Schelven
2025-07-28 22:05:50 +02:00
parent 718127fd08
commit 91b99af08d
3 changed files with 12 additions and 9 deletions

View File

@@ -47,16 +47,17 @@
<a href="{% url "project_messaging_service_edit" project_pk=project.pk service_pk=service_config.pk %}" class="text-xl text-cyan-500 dark:text-cyan-300 font-bold">{{ service_config.display_name }}</a>
{% if service_config.has_recent_failure %}
<div class="text-sm text-red-600 dark:text-red-400 mt-1">
<span class="inline-flex items-center">
<svg class="w-4 h-4 mr-1" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
<span class="inline-flex items-center leading-none">
<svg class="w-4 h-4 mr-1 align-middle" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" d="M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z" clip-rule="evenodd"></path>
</svg>
Last alert failed ({{ service_config.last_failure_timestamp|date:"M j, H:i" }})
<span>Last alert failed ({{ service_config.last_failure_timestamp|date:"M j, H:i" }})</span>
<a href="{% url "project_messaging_service_edit" project_pk=project.pk service_pk=service_config.pk %}#failure-details"
class="text-red-700 dark:text-red-300 underline ml-2">View details</a>
</span>
<a href="{% url "project_messaging_service_edit" project_pk=project.pk service_pk=service_config.pk %}#failure-details"
class="text-red-700 dark:text-red-300 underline ml-2">View details</a>
</div>
{% endif %}
</div>
</div>
</td>

View File

@@ -28,11 +28,13 @@
{% if service_config.has_recent_failure %}
<div id="failure-details" class="bg-red-50 dark:bg-red-900 border-2 border-red-200 dark:border-red-700 p-4 rounded-lg mb-6">
<h2 class="text-xl font-bold text-red-800 dark:text-red-200 mb-2 flex items-center">
<svg class="w-5 h-5 mr-2" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
{# Nudge the icon down by 1px to align visually with the text baseline (it's heavy in the bottom, light on top) #}
<svg class="w-5 h-5 mr-2 relative top-[2px] align-middle" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" d="M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z" clip-rule="evenodd"></path>
</svg>
Alert Backend Failure
Most Recent Message has Failed
</h2>
<div class="text-red-700 dark:text-red-300">
<p><strong>Last failure:</strong> {{ service_config.last_failure_timestamp|date:"F j, Y, g:i A" }}</p>
<p><strong>Error type:</strong> {{ service_config.last_failure_error_type }}</p>
@@ -43,7 +45,7 @@
{% if service_config.last_failure_response_text %}
<div class="mt-2">
<p><strong>Response{% if service_config.last_failure_is_json %} (JSON){% endif %}:</strong></p>
<pre class="bg-red-100 dark:bg-red-800 p-2 rounded text-sm mt-1 overflow-x-auto">{{ service_config.last_failure_response_text }}</pre>
<pre class="p-2 rounded text-sm mt-1 overflow-x-auto">{{ service_config.last_failure_response_text }}</pre>
</div>
{% endif %}
</div>

File diff suppressed because one or more lines are too long