Commit Graph

9 Commits

Author SHA1 Message Date
656a6bfac4 Refactor dashboard data serialization and mock context for improved clarity
Some checks failed
CI / ci (push) Has been cancelled
- Introduced `serialize_audit_for_response` and `serialize_current_cluster_for_template` functions to handle JSON serialization of audit and cluster data, enhancing data consistency for API responses and template rendering.
- Updated `get_mock_context` in `mock_data.py` to utilize the new serialization functions, simplifying the mock data structure and improving readability.
- Refactored `collect_context` and `collect_audits` in `views.py` to leverage the new serialization methods, ensuring a cleaner and more maintainable codebase.
- Added unit tests for the new serialization functions to ensure correctness and reliability of data formatting.
2026-02-12 20:10:09 +03:00
37cea90b4e Refactor CPU statistics formatting for improved precision
Some checks failed
CI / ci (push) Has been cancelled
- Updated JavaScript to ensure CPU total, free, and usage values are formatted as numbers with one decimal place for consistency.
- Modified HTML template to apply float formatting to the displayed free CPU value, enhancing clarity in metrics presentation.
2026-02-12 14:38:40 +03:00
99f8cb2dec Refactor print styles and enhance chart configuration for better visualization
Some checks failed
CI / ci (push) Has been cancelled
- Adjusted chart grid color for improved contrast in visualizations.
- Implemented print-specific styles to ensure proper layout and formatting on A4 paper.
- Enhanced chart configuration in JavaScript to include grid line width and tick border dash for clearer data representation.
- Updated HTML to streamline print functionality, replacing the PDF export button with a direct print command.
2026-02-12 14:23:23 +03:00
263379c072 Update dashboard metrics and enhance CPU statistics visualization
Some checks failed
CI / ci (push) Has been cancelled
- Expanded mock data to include additional host labels and updated CPU current and projected values for better representation.
- Modified JavaScript to conditionally display projected CPU statistics and standard deviation, improving user experience.
- Refactored chart configuration to dynamically handle datasets based on the presence of projected data.
- Updated HTML to include a new block for displaying standard deviation, enhancing clarity in CPU metrics presentation.
2026-02-12 13:56:05 +03:00
6a27fecb13 Add dashboard statistics module and refactor views for metrics handling
All checks were successful
CI / ci (push) Successful in 14s
- Introduced a new `stats.py` module to encapsulate dashboard statistics building and cache key constants.
- Refactored `views.py` to utilize the new `build_stats` function for constructing metrics context, improving code organization and readability.
- Updated Prometheus query handling to streamline metrics fetching with a new `fetch_dashboard_metrics` function.
- Enhanced test cases to reflect changes in metrics fetching and context building, ensuring accurate functionality.
- Added new HTML templates for displaying detailed resource allocation and flavor statistics on the dashboard.
2026-02-07 18:39:28 +03:00
9f3946a0bc Add PDF export functionality and favicon support
- Introduced a new script for exporting the dashboard as a PDF using html2canvas and jsPDF.
- Added a favicon.ico file and linked it in the base template.
- Updated the base template to include the new PDF export script and modified the button for PDF export functionality.
- Enhanced the index template to include an ID for the dashboard content for PDF generation.
2026-02-07 13:46:50 +03:00
30c08d497f Add API endpoints for stats and audits, implement data collection functions, and enhance index view with skeleton context 2026-02-06 17:21:00 +03:00
57a2933f28 Refactor Docker setup and add mock data support
- Updated .dockerignore and .gitignore for better file management.
- Introduced .env.example for environment variable configuration.
- Added docker-compose.dev.yml for development with mock data and live reload.
- Enhanced Dockerfile to include necessary dependencies and entrypoint script.
- Created mock_data.py to provide sample data for testing without OpenStack/Prometheus.
- Added unit tests for template filters in dashboard.
- Cleaned up various files for consistency and improved readability.
2026-02-06 16:12:21 +03:00
4e37cd1ef8 Stitching things up 2025-12-03 12:04:48 +03:00