feat(07-01): wire dashboard data and add /packages listing page

- Dashboard queries 5 most recent Printer records and 5 most recent driver-assigned ones
- New /packages route lists printers with drivers, with intunewin/ninja download links
- packages.html template extends base.html with Pico grid table
- Dashboard printer/package items now link to detail pages
- Quick action buttons wired to real routes (removed aria-disabled)
This commit is contained in:
2026-04-13 08:58:13 +02:00
parent 8cf47f5c89
commit 91910ad97d
3 changed files with 74 additions and 7 deletions
+37
View File
@@ -0,0 +1,37 @@
{% extends "base.html" %}
{% block content %}
<h1>Packages</h1>
<p>Printers with drivers assigned — ready for deployment package export.</p>
{% if printers %}
<figure>
<table role="grid">
<thead>
<tr>
<th scope="col">Printer</th>
<th scope="col">Client</th>
<th scope="col">Driver</th>
<th scope="col">Downloads</th>
</tr>
</thead>
<tbody>
{% for printer in printers %}
<tr>
<td><a href="/printers/{{ printer.id }}">{{ printer.name }}</a></td>
<td>{% if printer.client_id %}{{ printer.client.name }}{% else %}—{% endif %}</td>
<td>{{ printer.driver.original_filename }}</td>
<td>
<a href="/printers/{{ printer.id }}/packages/intunewin">.intunewin</a>
&nbsp;|&nbsp;
<a href="/printers/{{ printer.id }}/packages/ninja">NinjaRMM ZIP</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</figure>
{% else %}
<p class="empty-state">No package-ready printers yet. Assign a driver to a printer to enable package export.</p>
{% endif %}
{% endblock %}