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
This commit is contained in:
2025-10-03 08:56:45 -03:00
parent a67c244070
commit ff932a56f0

View File

@@ -2575,8 +2575,17 @@
const container = document.getElementById(`details-content-${index}`);
try {
// Get selected time range
const timeRange = document.getElementById('timeRangeSelect')?.value || '24h';
// Get selected time range from PatternFly dropdown
const timeRangeText = document.getElementById('timeRangeText')?.textContent || 'Last 24 Hours';
let timeRange = '24h'; // default
switch(timeRangeText) {
case 'Last 1 Hour': timeRange = '1h'; break;
case 'Last 6 Hours': timeRange = '6h'; break;
case 'Last 24 Hours': timeRange = '24h'; break;
case 'Last 7 Days': timeRange = '7d'; break;
case 'Last 30 Days': timeRange = '30d'; break;
}
container.innerHTML = `
<div class="loading-spinner">