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
This commit is contained in:
2025-10-03 08:42:18 -03:00
parent 28a3cbbae3
commit a67c244070

View File

@@ -2554,19 +2554,6 @@
document.getElementById('workload-details-container').classList.remove('section-hidden'); document.getElementById('workload-details-container').classList.remove('section-hidden');
} }
async function loadWorkloadDetails(workloadName, namespace) {
try {
const response = await fetch(`/api/v1/historical-analysis/${namespace}/${workloadName}`);
const data = await response.json();
updateWorkloadDetails(data);
} catch (error) {
console.error('Error loading workload details:', error);
document.getElementById('workload-details-content').innerHTML =
'<div style="text-align: center; padding: 40px; color: var(--pf-global--danger-color--100);">Failed to load workload details</div>';
}
}
function toggleWorkloadDetails(index) { function toggleWorkloadDetails(index) {
const detailsRow = document.getElementById(`details-${index}`); const detailsRow = document.getElementById(`details-${index}`);