Auto-commit local changes before build (2026-01-04 01:33:56)

This commit is contained in:
Ivo Oskamp 2026-01-04 01:33:56 +01:00
parent 22a2e7146b
commit 8fbf452018
3 changed files with 11 additions and 3 deletions

View File

@ -1 +1 @@
v20260103-19-reports-output-format-html
v20260103-20-reports-export-html-open-new-tab

View File

@ -53,7 +53,7 @@
<a class="btn btn-sm btn-outline-secondary" href="{{ url_for('main.reports_edit', report_id=item.id) }}">Edit</a>
<button type="button" class="btn btn-sm btn-outline-primary rep-generate-btn" data-id="{{ item.id }}">Generate</button>
<button type="button" class="btn btn-sm btn-outline-secondary ms-1 rep-view-btn" data-id="{{ item.id }}">View raw</button>
<a class="btn btn-sm btn-outline-success rep-download-btn ms-1" href="/api/reports/{{ item.id }}/export" target="_blank" rel="noopener">Download</a>
<a class="btn btn-sm btn-outline-success rep-download-btn ms-1" href="/api/reports/{{ item.id }}/export?format={{ (item.output_format or 'csv')|lower }}" target="_blank" rel="noopener">Download</a>
{% if active_role in ('admin','operator','reporter') %}
<button type="button" class="btn btn-sm btn-outline-danger rep-delete-btn ms-1" data-id="{{ item.id }}">Delete</button>
{% endif %}
@ -394,7 +394,7 @@ function loadRawData() {
'<a class="btn btn-sm btn-outline-secondary me-1" href="/reports/' + item.id + '/edit">Edit</a>' +
'<button type="button" class="btn btn-sm btn-outline-primary me-1 rep-generate-btn" data-id="' + item.id + '">Generate</button>' +
'<button type="button" class="btn btn-sm btn-outline-secondary me-1 rep-view-btn" data-id="' + item.id + '">View raw</button>' +
'<a class="btn btn-sm btn-outline-success rep-download-btn" href="/api/reports/' + item.id + '/export" target="_blank" rel="noopener">Download</a>' +
'<a class="btn btn-sm btn-outline-success rep-download-btn" href="/api/reports/' + item.id + '/export?format=' + encodeURIComponent((item.output_format || 'csv').toLowerCase()) + '" target="_blank" rel="noopener">Download</a>' +
(canDeleteReports ? '<button type="button" class="btn btn-sm btn-outline-danger ms-1 rep-delete-btn" data-id="' + item.id + '">Delete</button>' : '') +
'</td>';;

View File

@ -172,6 +172,14 @@
- Updated the Reports overview to use the new generic export endpoint (no longer hardcoded to export.csv).
- Added ReportLab dependency for PDF generation.
---
## v20260103-20-reports-export-html-open-new-tab
- Fixed report export logic so the selected output format is always respected.
- Ensured the export URL explicitly includes the chosen format parameter (CSV, PDF, HTML).
- Changed HTML report handling to open in a new browser tab instead of triggering a file download.
- Enabled proper inline rendering of HTML reports to support graphical preview and layout validation.
================================================================================================================================================