From 94ecc305a2b493463a2e8c2ea9f2bde51eb82204 Mon Sep 17 00:00:00 2001 From: Ivo Oskamp Date: Sat, 3 Jan 2026 15:17:01 +0100 Subject: [PATCH] Auto-commit local changes before build (2026-01-03 15:17:01) --- .last-branch | 2 +- .../backend/app/main/routes_reporting_api.py | 15 +- docs/changelog.md | 9 ++ docs/reporting-proposal.md | 136 ++++++++++++++++++ 4 files changed, 160 insertions(+), 2 deletions(-) create mode 100644 docs/reporting-proposal.md diff --git a/.last-branch b/.last-branch index 7818126..0304ea5 100644 --- a/.last-branch +++ b/.last-branch @@ -1 +1 @@ -v20260103-09-reports-column-selection-ui +v20260103-10-reports-summary-columns-metadata diff --git a/containers/backupchecks/src/backend/app/main/routes_reporting_api.py b/containers/backupchecks/src/backend/app/main/routes_reporting_api.py index 8ee5b24..db5714c 100644 --- a/containers/backupchecks/src/backend/app/main/routes_reporting_api.py +++ b/containers/backupchecks/src/backend/app/main/routes_reporting_api.py @@ -232,6 +232,19 @@ def api_reports_columns(): ], }, "groups": [ + { + "name": "Summary metrics", + "items": [ + {"key": "object_name", "label": "Object", "views": ["summary"]}, + {"key": "total_runs", "label": "Total runs", "views": ["summary"]}, + {"key": "success_count", "label": "Success", "views": ["summary"]}, + {"key": "success_override_count", "label": "Success (override)", "views": ["summary"]}, + {"key": "warning_count", "label": "Warning", "views": ["summary"]}, + {"key": "failed_count", "label": "Failed", "views": ["summary"]}, + {"key": "missed_count", "label": "Missed", "views": ["summary"]}, + {"key": "success_rate", "label": "Success rate", "views": ["summary"]}, + ], + }, { "name": "Job Information", "items": [ @@ -246,7 +259,7 @@ def api_reports_columns(): "name": "Status", "items": [ {"key": "status", "label": "Last run status", "views": ["snapshot"]}, - {"key": "missed", "label": "Missed", "views": ["snapshot", "summary"]}, + {"key": "missed", "label": "Missed", "views": ["snapshot"]}, {"key": "override_applied", "label": "Override applied", "views": ["snapshot"]}, {"key": "ticket_number", "label": "Ticket number", "views": ["snapshot"]}, ], diff --git a/docs/changelog.md b/docs/changelog.md index 62084c1..747fae2 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -81,6 +81,15 @@ - Updated report rendering to dynamically display data based on the configured columns instead of fixed defaults. - Extended reports columns metadata endpoint to support configurable and future report metrics. +--- + +## v20260103-10-reports-summary-columns-metadata + +- Added missing column definitions for **Summary** reports to the reports columns metadata endpoint. +- Enabled column selection in the **Report content** UI for Summary-based reports. +- Corrected the **Missed** column mapping to use `missed_count` for Summary views instead of snapshot-specific fields. +- Ensured column metadata is consistent between backend and frontend to allow future graphical output. + ================================================================================================================================================ ## v0.1.15 diff --git a/docs/reporting-proposal.md b/docs/reporting-proposal.md new file mode 100644 index 0000000..54a720e --- /dev/null +++ b/docs/reporting-proposal.md @@ -0,0 +1,136 @@ +# Proposal – Advanced Reporting & Visualization + +## Goal +Make reports more flexible through column selection and more insightful by adding graphical visualizations. +All reports are displayed online first, with a clear path towards future PDF export. + +--- + +## 1. Column Selection When Creating Reports + +### 1.1 Report Configuration +Add an extra step **“Report Content”** when creating a report: + +- Checkbox list of available columns +- Drag & drop to define column order +- Option to **save as template** for reuse + +### 1.2 Column Groups +Columns are grouped for clarity: + +**Job Information** +- Job name +- Job type +- Repository / Target + +**Status** +- Last run status +- Result (Success / Warning / Failed) +- Exit code + +**Time & Performance** +- Start time +- Duration +- Average duration + +**Data** +- Data processed +- Data size +- Change rate + +**Reliability** +- Consecutive failures +- Last successful run + +--- + +## 2. Graphical Reports (Online Dashboard) + +### 2.1 Summary View +Always shown at the top of a report: + +**KPI Cards** +- Total jobs +- Successful jobs +- Failed jobs +- Warning jobs +- Success rate (%) + +--- + +### 2.2 Chart Proposals + +**Status Distribution** +- Donut / pie chart: Success vs Warning vs Failed + +**Trends Over Time** +- Line chart: success rate per day +- Line chart: number of failures per day + +**Performance** +- Bar chart: average runtime per job +- Bar chart: largest data volumes per job + +**Reliability** +- Heatmap: failures per job per day +- Bar chart: top N jobs with most failures + +--- + +### 2.3 Interaction +- Hover tooltips with detailed values +- Clicking a chart filters the table view +- Time range selector: + - Last 24 hours + - Last 7 days + - Last 30 days + - Custom range + +--- + +## 3. Raw Data vs Graphical View + +### 3.1 Tabs per Report +- **Overview** – KPIs and charts only +- **Details** – table with selected columns +- **History** – long-term trends + +### 3.2 Filtering & Sorting +- Filter by status +- Filter by job +- Sort by duration, date, or failures + +--- + +## 4. Preparation for PDF Export (Future) + +### 4.1 Layout Guidelines +- Fixed A4-friendly layout +- Maximum two charts per row +- Dark text on light background +- Non-interactive chart rendering in PDF mode + +### 4.2 PDF-Ready Structure +1. Title and period +2. Executive summary (KPIs) +3. Status overview +4. Trend analysis +5. Optional detail tables + +--- + +## 5. Technical Principles (High-Level) + +- Store report definitions as JSON: + - Selected columns + - Chart types + - Filters +- Client-side chart rendering +- Same report definition reusable for PDF rendering later + +--- + +## Result +- Flexible, audience-focused reports +- Faster insight through visual summaries +- Clean transition to professional PDF reports without redesign