Sunil Mohan Adapa 4d71e80b1e
ui: Drop use of badge-* utility classes for newer replacements
- Keep the badge-{severity} classes as they are meant for convenience of mapping
severity to style.

- Match bootstrap colors to maintain consistency and contrast.

Tests:

- Visually confirm that all the changes effective.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-12-12 12:30:28 +02:00

59 lines
1.6 KiB
HTML

{% extends "app.html" %}
{% comment %}
# SPDX-License-Identifier: AGPL-3.0-or-later
{% endcomment %}
{% load bootstrap %}
{% load i18n %}
{% load static %}
{% block extra_content %}
<h3>{% trans "Status" %}</h3>
{% if domains_status %}
<div class="table-responsive">
<table class="table">
<thead>
<tr>
<th>{% trans "Domain" %}</th>
<th>{% trans "Last update" %}</th>
<th>{% trans "Result" %}</th>
<th>{% trans "IP Address" %}</th>
</tr>
</thead>
<tbody>
{% for domain in domains_status.values %}
<tr>
<td>{{ domain.domain }}</td>
<td>{{ domain.timestamp|timesince }}</td>
<td>
{% if domain.result %}
<span class="badge text-bg-success">
{% trans "Success" %}
</span>
{% else %}
<span class="badge text-bg-warning">
{% trans "Failed" %}
</span>
{% endif %}
{% if domain.error_message %}
({{ domain.error_message }})
{% elif domain.error_code %}
({{ domain.error_code }})
{% endif %}
</td>
<td>{{ domain.ip_address|default_if_none:'-' }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% else %}
{% trans "No status available." %}
{% endif %}
{% endblock %}
{% block page_js %}
<script type="text/javascript" src="{% static 'dynamicdns/dynamicdns.js' %}"></script>
{% endblock %}