Commit Graph

150 Commits

Author SHA1 Message Date
ff932a56f0 fix: update loadWorkloadDetails to use PatternFly dropdown
- Fix timeRange selection in loadWorkloadDetails function
- Replace timeRangeSelect with timeRangeText from PatternFly dropdown
- Add proper time range mapping for 1h, 6h, 24h, 7d, 30d
- Fix Historical Analysis workload details loading with different time ranges
2025-10-03 08:56:45 -03:00
a67c244070 fix: remove duplicate loadWorkloadDetails function
- Remove duplicate loadWorkloadDetails function that was causing accordion loading issues
- Keep only the version with index parameter for accordion functionality
- Fix Historical Analysis workload details loading in accordions
2025-10-03 08:42:18 -03:00
28a3cbbae3 fix: resolve Historical Analysis loading and implement PatternFly dropdown
- Fix Historical Analysis loading issue by updating loadHistoricalAnalysis function
- Replace native HTML select with PatternFly dropdown for time range selector
- Add PatternFly-compliant CSS styling for dropdown component
- Implement proper dropdown functionality with toggle, selection, and outside click
- Add accessibility features with ARIA attributes
- Integrate dropdown with existing API calls
- Improve user experience with consistent PatternFly design
2025-10-03 08:35:42 -03:00
6bb678ca41 ui: reorganize sidebar with new structure and sections
- Reorganize sidebar: Home, Analysis, Recommendations, Settings
- Move Analysis section to second position (after Home)
- Create new Recommendations section with Historical Based and VPA Management
- Integrate Smart Recommendations into VPA Management section
- Remove Observe section (Metrics/Logs - available in OpenShift console)
- Add Settings section for future configuration options
- Update navigation logic for all new sections
- Improve interface focus on app's core purpose
2025-10-03 08:26:27 -03:00
1595370720 ui: reorganize dashboard and sidebar navigation
- Remove 'Workloads with Issues' table from main dashboard
- Create new 'Requests & Limits' section in sidebar under 'Analysis'
- Replace empty 'Workloads' section (Pods, Deployments, Services) with 'Requests & Limits'
- Move workloads table functionality to dedicated 'Requests & Limits' page
- Update navigation logic to handle new section
- Improve dashboard focus on metrics and cluster overview
- Clean up sidebar by removing non-functional menu items
2025-10-03 08:06:17 -03:00
2e9ed3e7b3 fix: format Resource Utilization to show only 1 decimal place
- Update resource utilization display to use .toFixed(1) for better readability
- Apply formatting to both main dashboard and modal details
- Change from 266.04049998033537% to 266.0% for human readability
- Improve user experience with cleaner number formatting
2025-10-03 07:18:45 -03:00
b1c1a952d1 update: change app title to ORU Scanner and update home page title
- Change browser title to 'ORU Scanner - OpenShift Resource Usage Scanner'
- Update header logo to 'ORU Scanner'
- Change home page title to 'OpenShift Resource Usage Scanner - Dashboard'
- Simplify page description for better clarity
2025-10-03 07:11:57 -03:00
c2338eefae fix: create individual cards per workload instead of aggregated card
- Use data.categories instead of data.recommendations for individual workloads
- Create separate ServiceCard for each workload with specific recommendations
- Add priority scoring based on workload priority_score
- Add detailed metadata: score, impact, age, VPA readiness
- Generate specific titles and descriptions per workload type
- Support different recommendation types: vpa_activation, resource_config, ratio_adjustment
2025-10-02 19:23:51 -03:00
0a0d3e1f43 feat: implement Smart Recommendations gallery with ServiceCard and BulkSelect
- Replace table layout with PatternFly ServiceCard gallery
- Add BulkSelect toolbar with select all/page/none options
- Implement individual VPA application per workload
- Add checkbox selection for each recommendation card
- Support bulk apply and preview operations
- Improve UX with card-based interface following PatternFly design
- Add responsive grid layout for recommendation cards
- Implement proper state management for selections
2025-10-02 19:16:22 -03:00
74f579050c feat: implement real Resource Utilization with Prometheus
- Add get_cluster_resource_utilization() method to PrometheusClient
- Use real CPU and memory usage vs requests data from Prometheus
- Replace placeholder 75% with actual cluster resource utilization
- Update modal to show production-ready status instead of placeholder
- Add automatic fallback to simulated data if Prometheus unavailable
- Calculate overall utilization as average of CPU and memory efficiency
2025-10-02 18:57:10 -03:00
64e17eb521 feat: implement VPA CRD support
- Add CustomObjectsApi integration for VPA resources
- Implement VPA CRUD operations (list, create, delete)
- Add VPA recommendation collection via CRD
- Add API endpoints for VPA management
- Handle VPA installation detection gracefully
- Complete TODO #1: CRD para VPA implementation
2025-10-02 18:50:56 -03:00
213359b18f Fix undefined values in workload analysis modal 2025-10-02 17:55:19 -03:00
a1a70bae45 Implement smart recommendations application and improve VPA modal contrast 2025-10-02 17:30:05 -03:00
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
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