feat(05-02): printer detail page with export buttons and command preview

- Update printer_detail() to pass install_cmd, uninstall_cmd, has_driver, has_icon to template
- Rewrite printer_detail.html with Intune Commands, Export, and Icon sections
- Show command strings with Alpine.js copy-to-clipboard buttons (install-cmd, uninstall-cmd)
- Show NinjaRMM ZIP and .intunewin download links when driver assigned
- Add HTMX icon upload form with #icon-status swap target
- Remove disabled placeholder Regenerate Package button
- Add TestCommandPreview class (4 tests) to test_packages.py
- All 94 tests pass
This commit is contained in:
2026-04-10 15:06:45 +02:00
parent f9e13ba96f
commit f96ea6fec9
7 changed files with 210 additions and 19 deletions
+10 -6
View File
@@ -3,14 +3,14 @@ gsd_state_version: 1.0
milestone: v1.0
milestone_name: milestone
status: executing
stopped_at: Completed 04-02-PLAN.md
last_updated: "2026-04-10T11:40:40.706Z"
stopped_at: Completed 05-01-PLAN.md
last_updated: "2026-04-10T13:06:29.301Z"
last_activity: "2026-04-10 — Plan 04-02 complete: uninstall/detect templates, render_uninstall/render_detect, 3 script API endpoints, 75 tests green"
progress:
total_phases: 5
completed_phases: 4
total_plans: 9
completed_plans: 9
total_plans: 11
completed_plans: 10
---
---
@@ -72,6 +72,7 @@ Progress: [█████████░] 89%
| Phase 03-printer-configuration P02 | 2 | 2 tasks | 4 files |
| Phase 04-script-generation P01 | 2 | 1 tasks | 3 files |
| Phase 04-script-generation P02 | 2 | 2 tasks | 6 files |
| Phase 05-package-export P01 | 2 | 1 tasks | 3 files |
## Accumulated Context
@@ -104,6 +105,9 @@ Recent decisions affecting current work:
- [Phase 04-02]: _get_printer_and_driver() private helper centralises 404/422 validation for all 3 script endpoints
- [Phase 04-02]: PlainTextResponse with Content-Disposition attachment header on all script endpoints
- [Phase 04-02]: Integration tests create ORM records directly (Driver.create/Printer.create)
- [Phase 05-package-export]: _get_printer_and_driver() copied (not imported) from scripts.py for module self-containment in packages.py
- [Phase 05-package-export]: NinjaRMM ZIP uses DEFLATE compression with {printer_name}/install.ps1 + {printer_name}/drivers/* structure
- [Phase 05-package-export]: intunewin endpoint uses TemporaryDirectory for auto-cleanup; driver ZIP existence validated before processing (422 if missing)
### Pending Todos
@@ -116,6 +120,6 @@ None yet.
## Session Continuity
Last session: 2026-04-10T11:37:48.305Z
Stopped at: Completed 04-02-PLAN.md
Last session: 2026-04-10T13:06:29.293Z
Stopped at: Completed 05-01-PLAN.md
Resume file: None