develop #4

Merged
Arnike merged 10 commits from develop into main 2026-02-12 20:32:19 +03:00
Owner
No description provided.
Arnike added 10 commits 2026-02-12 20:31:40 +03:00
Add dashboard statistics module and refactor views for metrics handling
All checks were successful
CI / ci (push) Successful in 14s
6a27fecb13
- 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.
Update dashboard metrics and enhance CPU statistics visualization
Some checks failed
CI / ci (push) Has been cancelled
263379c072
- 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.
- 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.
Refactor CPU statistics formatting for improved precision
Some checks failed
CI / ci (push) Has been cancelled
37cea90b4e
- 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.
Refactor mock data formatting for improved readability
Some checks failed
CI / ci (push) Has been cancelled
09136a28e3
- Reformatted the host_labels list in mock_data.py for better visual clarity and consistency in code style.
Refactor source status fetching logic for improved error handling
Some checks failed
CI / ci (push) Has been cancelled
572274333c
- Enhanced the JavaScript fetch logic in base.html to better handle API responses, including improved error messaging and structured data handling.
- Updated the way source status is processed, ensuring clearer differentiation between successful and error states for Prometheus and OpenStack metrics.
Enhance tooltip for CPU standard deviation display in dashboard
Some checks failed
CI / ci (push) Has been cancelled
3491ed168d
- Added a tooltip to the CPU standard deviation metric in the dashboard to provide a clearer explanation of the calculation formula, improving user understanding of the displayed data.
Enhance tooltip functionality for CPU standard deviation in dashboard
Some checks failed
CI / ci (push) Has been cancelled
76eae52d2a
- Updated the tooltip for the CPU standard deviation metric to include a detailed explanation of the calculation, preserving newlines for better readability.
- Added CSS styles to support multi-line tooltips, improving user comprehension of the displayed data.
- 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.
Refactor code formatting for improved readability in flavor and math filter utilities
All checks were successful
CI / ci (push) Successful in 17s
CI / ci (pull_request) Successful in 17s
d4fc2e920f
- Standardized code formatting in `flavor.py` and `mathfilters.py` for better visual clarity and consistency.
- Ensured proper indentation and spacing to enhance maintainability and readability of the utility functions.
Arnike merged commit 1c61b70fb9 into main 2026-02-12 20:32:19 +03:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Arnike/watcher-visio#4
No description provided.