Use a table for instance display

This commit is contained in:
Tobias Kunze 2025-04-04 16:32:56 +02:00
parent ab04d9174c
commit 23ad1c809b

View file

@ -6,13 +6,40 @@
{% endblock page_title %} {% endblock page_title %}
{% endblock html_title %} {% endblock html_title %}
{% block card_content %} {% block card_content %}
<ul> <table class="table table-striped">
{% for instance in instances %} <thead>
<li> <tr>
<a href="{{ instance.urls.base }}">{{ instance.name }}</a> <th>{% translate "Name" %}</th>
</li> <th>{% translate "Service" %}</th>
{% empty %} <th>{% translate "Service Provider" %}</th>
<li>No service instances found.</li> <th>{% translate "Service Provider Zone" %}</th>
{% endfor %} <th>{% translate "Created At" %}</th>
</ul> <th>{% translate "Status" %}</th>
</tr>
</thead>
<tbody>
{% for instance in instances %}
<tr>
<td>
<a href="{{ instance.urls.base }}">{{ instance.name }}</a>
</td>
<td>{{ instance.context.service_definition.service.name }}</td>
<td>{{ instance.context.service_offering.provider.name }}</td>
<td>{{ instance.context.control_plane.name }}</td>
<td>{{ instance.created_at|date:"SHORT_DATETIME_FORMAT" }}</td>
<td>
{% if instance.is_deleted %}
<span class="badge text-bg-secondary">{% translate "Deleted" %}</span>
{% else %}
<span class="badge text-bg-success">{% translate "Active" %}</span>
{% endif %}
</td>
</tr>
{% empty %}
<tr>
<td colspan="6">{% translate "No service instances found." %}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endblock %} {% endblock %}