databuild/databuild/web/templates/partitions/list.html
Stuart Axelbrooke ce8bb92cdb
Some checks are pending
/ setup (push) Waiting to run
add want create page
2025-11-26 22:01:47 +08:00

62 lines
1.8 KiB
HTML

{% import "base.html" as base %}
{% call base::head("Partitions - DataBuild") %}
{% call base::nav("partitions", base.graph_label) %}
<h1>Partitions</h1>
<table>
<thead>
<tr>
<th>Partition Ref</th>
<th>Status</th>
<th>Last Updated</th>
</tr>
</thead>
<tbody>
{% for p in partitions %}
<tr style="view-transition-name: partition-{{ loop.index }}">
<td>
{% if p.has_partition_ref %}
<a href="/partitions/{{ p.partition_ref_encoded }}" class="partition-ref">{{ p.partition_ref }}</a>
{% else %}
<span style="color:var(--color-text-muted)">-</span>
{% endif %}
</td>
<td>
{% match p.status %}
{% when Some with (s) %}<span class="status status-{{ s.name_lowercase }}">{{ s.name }}</span>
{% when None %}<span class="status">Unknown</span>
{% endmatch %}
</td>
<td>
{% match p.last_updated_timestamp %}
{% when Some with (ts) %}{{ ts }}
{% when None %}-
{% endmatch %}
</td>
</tr>
{% endfor %}
{% if partitions.is_empty() %}
<tr>
<td colspan="3" style="text-align:center;color:var(--color-text-muted)">No partitions found</td>
</tr>
{% endif %}
</tbody>
</table>
<div class="pagination">
{% if self.has_prev() %}
<a href="?page={{ self.prev_page() }}">Previous</a>
{% else %}
<span class="disabled">Previous</span>
{% endif %}
<span>Page {{ page + 1 }} of {{ (total_count + page_size - 1) / page_size }}</span>
{% if self.has_next() %}
<a href="?page={{ self.next_page() }}">Next</a>
{% else %}
<span class="disabled">Next</span>
{% endif %}
</div>
{% call base::footer() %}