Commit Graph

1 Commits

Author SHA1 Message Date
minecraft1024a
6ef1829072 refactor(statistic): decouple statistics collection from report generation
Introduces a dedicated `HTMLReportGenerator` class in `report_generator.py` to handle all aspects of HTML and chart rendering. This decouples the report presentation logic from the data collection process within `StatisticOutputTask`.

Key changes include:
- Migrated all HTML and JavaScript generation into the new `HTMLReportGenerator`.
- Extracted all statistic key constants into a separate `statistic_keys.py` file for improved organization.
- Renamed `_generate_chart_data` to `_collect_chart_data` to better reflect its purpose.
- Improved data handling robustness by using `.get()` for dictionary access and safely handling database query results.
2025-11-12 20:34:36 +08:00