ANIALLATOR114 / SimplyTransport

SimplyTransport - API - Website - Ingesting and presenting Transport Information
https://simplytransport.ie
Apache License 2.0
2 stars 3 forks source link

Statistics Web pages #133

Closed ANIALLATOR114 closed 2 months ago

ANIALLATOR114 commented 2 months ago

image image

Expandable sections for statistics tables

Summary by Sourcery

This pull request introduces new statistics web pages with sortable tables for operator route data, operator trip data, and stop features data. It also adds expandable sections on the statistics index page and updates the API documentation links.

sourcery-ai[bot] commented 2 months ago

Reviewer's Guide by Sourcery

This pull request implements new statistics web pages for the SimplyTransport application. The changes include the addition of expandable sections for statistics tables, new templates for displaying operator data, static data, and stop features data, and updates to the routing and service layers to support these new pages. Additionally, some refactoring and cleanup were done in the controllers and OpenAPI configuration.

File-Level Changes

Files Changes
SimplyTransport/templates/stats/operator_data.html
SimplyTransport/templates/stats/static_data.html
SimplyTransport/templates/stats/stop_features_data.html
Replaced placeholder text with tables displaying relevant statistics and added JavaScript for table sorting functionality.
SimplyTransport/templates/stats/index.html
SimplyTransport/templates/widgets/toggle_visibility.html
Added expandable sections for different statistics categories and updated the toggle visibility script.
SimplyTransport/controllers/__init__.py
SimplyTransport/controllers/stats.py
Added new route handlers and a new controller for statistics endpoints.
SimplyTransport/domain/services/statistics_service.py
SimplyTransport/domain/database_statistics/model.py
Added new methods and models to support the calculation and representation of statistics with percentage values.
SimplyTransport/lib/openapi/openapiconfig.py
SimplyTransport/templates/api_docs.html
Updated OpenAPI configuration and API documentation links.
SimplyTransport/templates/base.html Moved script tags for better loading performance and added a new script for charts.

Tips - Trigger a new Sourcery review by commenting `@sourcery-ai review` on the pull request. - Continue your discussion with Sourcery by replying directly to review comments. - You can change your review settings at any time by accessing your [dashboard](https://app.sourcery.ai): - Enable or disable the Sourcery-generated pull request summary or reviewer's guide; - Change the review language; - You can always [contact us](mailto:support@sourcery.ai) if you have any questions or feedback.