From 302e62d4805c60f3fdb6620b01e85859d68078ed Mon Sep 17 00:00:00 2001 From: chrislu Date: Fri, 4 Jul 2025 14:45:13 -0700 Subject: [PATCH] link to volume details --- weed/admin/view/app/cluster_volumes.templ | 6 +++--- weed/admin/view/app/cluster_volumes_templ.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/weed/admin/view/app/cluster_volumes.templ b/weed/admin/view/app/cluster_volumes.templ index e25b0da32..b4e1b8fd3 100644 --- a/weed/admin/view/app/cluster_volumes.templ +++ b/weed/admin/view/app/cluster_volumes.templ @@ -593,9 +593,9 @@ templ ClusterVolumes(data dash.ClusterVolumesData) { } function viewVolumeDetails(volumeId) { - // Get the server from the current row - const button = event.target.closest('button'); - const row = button.closest('tr'); + // Get the server from the current row - works for both buttons and volume ID links + const clickedElement = event.target; + const row = clickedElement.closest('tr'); const serverCell = row.querySelector('td:nth-child(2) a'); const server = serverCell ? serverCell.textContent.trim() : 'unknown'; diff --git a/weed/admin/view/app/cluster_volumes_templ.go b/weed/admin/view/app/cluster_volumes_templ.go index 21c595468..d2a82c704 100644 --- a/weed/admin/view/app/cluster_volumes_templ.go +++ b/weed/admin/view/app/cluster_volumes_templ.go @@ -1025,7 +1025,7 @@ func ClusterVolumes(data dash.ClusterVolumesData) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 111, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 111, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err }