From 7744ea9889007ca1268cd790487c3453ae141e59 Mon Sep 17 00:00:00 2001 From: andersonid Date: Fri, 3 Oct 2025 09:00:01 -0300 Subject: [PATCH] improve: remove redundant Load Details button and auto-load accordion data - Remove Load Details button from workload table - Replace with simple 'Click to expand' text - Auto-load data when accordion is expanded - Simplify user experience by removing redundant action - Data loads automatically on accordion toggle --- app/static/index.html | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/app/static/index.html b/app/static/index.html index ee36161..060bb7c 100644 --- a/app/static/index.html +++ b/app/static/index.html @@ -2519,10 +2519,9 @@ ${workload.memory_usage || 'N/A'} ${workload.last_updated ? new Date(workload.last_updated).toLocaleString() : 'N/A'} - + + Click to expand + @@ -2561,10 +2560,21 @@ const icon = expandBtn.querySelector('i'); if (detailsRow.style.display === 'none') { + // Expand the accordion detailsRow.style.display = 'table-row'; icon.classList.remove('fa-chevron-right'); icon.classList.add('fa-chevron-down'); + + // Load data automatically when expanding + const workloadRow = expandBtn.closest('.workload-row'); + const workloadName = workloadRow.dataset.workload; + const namespace = workloadRow.dataset.namespace; + + if (workloadName && namespace) { + loadWorkloadDetails(workloadName, namespace, index); + } } else { + // Collapse the accordion detailsRow.style.display = 'none'; icon.classList.remove('fa-chevron-down'); icon.classList.add('fa-chevron-right'); @@ -2599,9 +2609,6 @@ updateWorkloadDetailsAccordion(data, index); - // Expand the accordion after loading - toggleWorkloadDetails(index); - } catch (error) { console.error('Error loading workload details:', error); container.innerHTML = `