Commit Graph

163 Commits

Author SHA1 Message Date
f69da283c1 fix: downgrade Chart.js to version 3.9.1 for compatibility
- Use Chart.js 3.9.1 instead of 4.4.0 for better compatibility
- Use chartjs-adapter-date-fns 2.0.0 for Chart.js 3.x compatibility
- Fix Chart is not defined error in Historical Analysis
2025-10-02 15:50:39 -03:00
fad4d422b7 fix: add missing getSeverityColor function for Historical Analysis
- Add getSeverityColor function to handle recommendation severity colors
- Fix ReferenceError when loading workload details in Historical Analysis
- Ensure proper color coding for recommendation severity levels
2025-10-02 15:48:55 -03:00
c6f69f85c9 fix: correct historical analysis endpoint and Chart.js loading
- Fix endpoint to use get_all_pods() instead of non-existent get_pods_by_selector()
- Move Chart.js scripts to end of body for proper loading order
- Add proper error handling for workload not found cases
- Ensure Chart.js is available before creating graphs
2025-10-02 15:47:13 -03:00
e1dae22e98 feat: implement Chart.js graphs for Historical Analysis
- Add Chart.js 4.4.0 and date adapter for time series graphs
- Implement createCPUChart and createMemoryChart functions
- Update updateWorkloadDetailsAccordion to show interactive graphs
- Add getCurrentValue, getAverageValue, getPeakValue helper functions
- Display CPU and Memory usage over 24h with real-time data
- Show current, average, and peak values below graphs
- Use working Prometheus queries from metrics endpoint
2025-10-02 15:45:09 -03:00
8e6dc0df9b fix: correct total issues count in modal
- Fix modal to show correct total issues count from validations array
- Use namespace.validations.length instead of namespace.total_validations
- Ensure consistency between table and modal data display
2025-10-02 15:31:53 -03:00
6d5da374e6 fix: adapt interface to work with current API format
- Update updateWorkloadsTable to group validations by namespace
- Fix analyzeNamespace to work with validation array format
- Group validations by namespace and pod for proper display
- Show actual validation data instead of 'No Issues Found'
- Maintain compatibility with existing modal functionality
2025-10-02 14:01:44 -03:00
187b67e86a feat: restore workload validation analysis functionality
- Add analyzeNamespace function with detailed pod analysis
- Implement modal for showing requests/limits validation details
- Add container resource analysis with requests/limits display
- Show validation issues with severity indicators
- Add proper modal styling with OpenShift theme
- Restore functionality to view detailed workload configurations
2025-10-02 13:59:17 -03:00
05a54b7855 feat: implement accordion for historical analysis with real data
- Add expandable rows in historical analysis table
- Implement accordion functionality with chevron icons
- Load real CPU and memory data from API endpoint
- Display current, average, and peak usage with progress bars
- Show recommendations based on historical data
- Improve UX with inline details instead of separate cards
2025-10-02 11:54:07 -03:00
53ea070957 feat: remove sidebar toggle button and ensure data loading
- Remove hamburger menu button from header
- Remove sidebar toggle JavaScript functionality
- Keep data loading functionality intact
- Maintain OpenShift Console visual identity
2025-10-02 11:46:10 -03:00
b2b47c4f1c feat: rebrand application to UWRU Scanner
- Change application name to UWRU Scanner (User Workloads and Resource Usage Scanner)
- Update title, header logo, and all references
- Update FastAPI app metadata and health check
- Update README.md with new branding
- Maintain OpenShift Console visual identity
2025-10-02 11:31:47 -03:00
a7c502d643 feat: implement OpenShift Console-like interface with dark mode
- Complete visual redesign to match OpenShift Console
- Dark mode by default with official OpenShift colors
- Red Hat typography (Red Hat Display, Red Hat Text)
- Sophisticated card-based layout
- OpenShift-style header with logo and navigation
- Professional sidebar with proper navigation structure
- Metrics cards with status indicators
- Enhanced visual effects and animations
- Responsive design for mobile devices
2025-10-02 11:12:17 -03:00
fa48e1de06 fix: remove self reference from function call 2025-10-02 10:56:14 -03:00
d35b637ba7 fix: use pod name extraction instead of labels for workload grouping 2025-10-02 10:55:12 -03:00
5168311e74 fix: correct PodResource attribute access in historical analysis endpoint 2025-10-02 10:53:20 -03:00
43c618cbc4 fix: add historical analysis endpoints and fix FontAwesome
- Add /api/v1/historical-analysis endpoint for workload list
- Add /api/v1/historical-analysis/{namespace}/{workload} for details
- Fix FontAwesome CDN to use working version
- Update todo list with progress
2025-10-02 10:51:33 -03:00
a2e0a73b14 feat: implement PatternFly 6.3.1 UI revolution
- Replace Bootstrap with PatternFly 6.3.1 components
- Create Workload Scanner as initial screen
- Implement Historical Analysis with breadcrumb navigation
- Add proper PatternFly styling and components
- Maintain all existing functionality with new UI
2025-10-02 10:49:32 -03:00
78c72d6815 UI: reorder elements - show Generate VPA YAML button before OpenShift commands 2025-10-02 10:23:02 -03:00
943fe4fcac Refactor: group smart recommendations by type and remove redundant View Details button 2025-10-02 10:15:51 -03:00
91e68b79c7 Fix kubernetes import: move to top level with try/except 2025-10-02 09:50:11 -03:00
086b42dd6c Improve modal design: remove gradient, fix kubectl to oc, add YAML note 2025-10-02 08:53:52 -03:00
22385af77e Improve modal design: centered dialog with better styling 2025-10-02 08:43:32 -03:00
6156ec8a90 Update: use oc commands instead of kubectl in recommendations 2025-10-02 08:31:38 -03:00
0db0457f84 Fix: implement missing showModal function 2025-10-02 08:29:15 -03:00
d3c57f6bba Add debug log to updateSmartRecommendations 2025-10-02 08:27:34 -03:00
43ccce80cd Fix: correct section ID for smart recommendations 2025-10-02 08:25:44 -03:00
4eb9b30e36 Fix summary data structure for smart recommendations 2025-10-02 08:23:33 -03:00
4c66565521 Add debug logging for smart recommendations 2025-10-02 08:22:13 -03:00
260d8114c5 Fix container data structure access in SmartRecommendationsService 2025-10-02 08:20:44 -03:00
b10515fe43 Fix JavaScript error in showSection function 2025-10-02 08:18:54 -03:00
e39668e480 Implement Smart Recommendations Engine with dashboard and modals 2025-10-02 08:17:22 -03:00
f5ef2132e5 Update documentation with PromQL query display and latest features 2025-10-02 07:53:07 -03:00
f6de5a5f30 Add PromQL queries display in historical analysis
- Include PromQL queries in API response for workload metrics
- Display queries in historical analysis modal with copy functionality
- Add professional styling for query display sections
- Enable users to copy and validate queries in OpenShift Console
- Organize queries by category: cluster totals, usage, requests, limits
- Add copy-to-clipboard functionality with visual feedback
2025-10-02 07:34:02 -03:00
cf92f0121b Fix conflicting insufficient_historical_data and historical_analysis
- Check both CPU and Memory data availability before historical analysis
- If either CPU or Memory has insufficient data, add warning and skip analysis
- Prevent conflicting insufficient_historical_data and historical_analysis
- Ensure consistent data availability requirements for workload analysis
- Only proceed with P95/P99 calculations when both resources have sufficient data
2025-10-01 16:36:42 -03:00
4721a1ef37 Fix historical analysis contradictions and implement workload-based analysis
- Fix insufficient_historical_data vs historical_analysis contradiction
- Add return statement when insufficient data to prevent P99 calculation
- Implement workload-based historical analysis instead of pod-based
- Add _extract_workload_name() to identify workload from pod names
- Add analyze_workload_historical_usage() for workload-level analysis
- Add _analyze_workload_metrics() with Prometheus workload queries
- Add validate_workload_resources_with_historical_analysis() method
- Update /cluster/status endpoint to use workload analysis by namespace
- Improve reliability by analyzing workloads instead of individual pods
- Maintain fallback to pod-level analysis if workload analysis fails
2025-10-01 16:32:12 -03:00
6f5c8b0cac Fix duplicate validations in cluster status
- Remove duplicate static validations from /cluster/status endpoint
- Use only historical analysis which includes static validations
- Add fallback to static validations only if historical analysis fails
- Eliminate duplicate invalid_ratio and container_metrics validations
- Improve validation efficiency and reduce redundancy
2025-10-01 16:25:38 -03:00
0686749aa8 Fix validation field name in namespace analysis
- Change validation.validation_type to validation.rule_name
- API returns rule_name field, not validation_type
- Fix undefined display in namespace analysis modal
- Ensure proper validation type display in detailed view
2025-10-01 16:17:09 -03:00
162af739e4 Fix Namespace Analysis code duplication
- Remove duplicate createNamespaceDetails() function
- Fix validation.rule_name to validation.validation_type
- Keep only showNamespaceDetailsSimple() function
- Eliminate redundant code in namespace analysis modal
- Improve code maintainability and reduce duplication
2025-10-01 16:12:21 -03:00
560fa69a3b Add Resource Utilization explanation modal
- Add info icon next to Resource Utilization metric
- Create showResourceUtilizationDetails() function
- Explain placeholder implementation status
- Show formula and purpose of Resource Utilization
- Indicate Phase 2 implementation plan
- Provide clear next steps for development
2025-10-01 15:58:43 -03:00
e0bb80865d Update documentation with current project state
- Update README.md with Cluster Overcommit Analysis features
- Add Podman preference over Docker in requirements
- Update DOCUMENTATION.md with Phase 1 completion status
- Update AIAgents-Support.md with Phase 1.3 completion
- Add Cluster Overcommit Analysis to completed features
- Update version to 1.2.0 and dates to 2025-10-01
- Reflect current implementation status across all docs
2025-10-01 15:49:38 -03:00
0ea86ef22f Fix modal close functionality
- Add proper closeModal() function
- Fix close button (X) click handler
- Fix click outside modal to close
- Remove modal from DOM instead of just hiding
- Improve modal user experience
2025-10-01 15:44:50 -03:00
2bb5266753 Improve overcommit UI with info icons and modals
- Replace tooltips with info icons (ℹ️) next to CPU/Memory Overcommit
- Add modal dialogs showing detailed overcommit calculations
- Change Resource Quota Coverage to Resource Utilization
- Add CSS styling for overcommit details modals
- Improve UX with clickable info icons instead of hover tooltips
- Show capacity, requests, overcommit percentage, and available resources
2025-10-01 15:41:43 -03:00
8984701bf3 Add detailed tooltips for overcommit metrics
- Add tooltips showing capacity, requests, and calculation details
- Include CPU and Memory capacity/requests in API response
- Add CSS styling for tooltip hover effects
- Show detailed breakdown: Capacity Total, Requests Total, and calculation formula
- Improve user experience with transparent overcommit information
2025-10-01 15:33:39 -03:00
b7bfd33a28 Add debug logging for overcommit calculation 2025-10-01 15:29:43 -03:00
b83c55bf08 Fix Cluster Overcommit Summary display
- Add overcommit data processing in /cluster/status endpoint
- Extract CPU/Memory capacity and requests from Prometheus
- Calculate overcommit percentages and resource quota coverage
- Update frontend to use new overcommit data structure
- Fix issue where Cluster Overcommit Summary was showing all zeros
2025-10-01 15:13:04 -03:00
fae1d6fb18 Fix workload metrics API pod name matching
- Use regex pattern pod=~"{workload}.*" in workload metrics API
- This matches the fix applied to historical analysis
- Should resolve issue where resource-governance workload data was not being retrieved
- Both historical analysis and workload metrics now use consistent pod name matching
2025-10-01 14:57:27 -03:00
35fed5eb01 Fix Prometheus queries for pod name matching
- Use regex pattern pod=~"{pod.name}.*" instead of exact match
- This allows matching pods with suffixes like resource-governance-78b77cc868-gchx7
- Apply fix to both CPU and Memory queries for usage, requests, and limits
- Should resolve issue where resource-governance pod data was not being retrieved
2025-10-01 14:53:40 -03:00
3df8d6bd42 Fix historical data retrieval
- Revert step calculation to 60s for better data retrieval
- Reduce threshold to 3 data points for insufficient data detection
- Add detailed logging for Prometheus query debugging
- Ensure historical data is properly retrieved from Prometheus
2025-10-01 14:51:37 -03:00
9e4f66052c Fix insufficient historical data detection
- Adjust Prometheus query step based on time range (5min for 24h)
- Reduce threshold from 10 to 5 data points for insufficient data detection
- Add debug logging to understand data point counts
- Improve step calculation: 30s for 1h, 5min for 24h, 30min for 7d
2025-10-01 14:48:05 -03:00
ee20a09147 Fix data unification and efficiency calculations
- Unify Prometheus queries between namespace analysis and historical analysis
- Fix efficiency calculations to prevent division by zero
- Remove duplicate validations in validation service
- Improve frontend data display with clear numerical values
- Add proper error handling for missing data
2025-10-01 14:43:43 -03:00
6ad1997afd Remove simulated data and enable real Prometheus metrics 2025-09-30 21:13:46 -03:00