From 3ea489d01305c2342491f1afbda4d8b0499804d6 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Mon, 27 Apr 2026 09:00:02 -0700 Subject: [PATCH] fix(admin): wrap plugin lane fetch URL with basePath Plugin lane page fetches API endpoints with raw absolute URLs, breaking deployments under a subdirectory. Wrap the fetch URL with basePath() so window.__BASE_PATH__ is honored, matching other admin pages. Addresses https://github.com/seaweedfs/seaweedfs/issues/9240 --- weed/admin/view/app/plugin_lane.templ | 2 +- weed/admin/view/app/plugin_lane_templ.go | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/weed/admin/view/app/plugin_lane.templ b/weed/admin/view/app/plugin_lane.templ index 20cb3bdbb..4df9379a0 100644 --- a/weed/admin/view/app/plugin_lane.templ +++ b/weed/admin/view/app/plugin_lane.templ @@ -81,7 +81,7 @@ templ PluginLane(page string, lane string) { if (!lane) return; function fetchAndRender(url, containerId, renderFn) { - fetch(url) + fetch(basePath(url)) .then(r => r.json()) .then(data => { const el = document.getElementById(containerId); diff --git a/weed/admin/view/app/plugin_lane_templ.go b/weed/admin/view/app/plugin_lane_templ.go index 76d35ff05..cdb1d8c08 100644 --- a/weed/admin/view/app/plugin_lane_templ.go +++ b/weed/admin/view/app/plugin_lane_templ.go @@ -40,7 +40,7 @@ func PluginLane(page string, lane string) templ.Component { var templ_7745c5c3_Var2 string templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(currentPage) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `weed/admin/view/app/plugin_lane.templ`, Line: 10, Col: 85} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `plugin_lane.templ`, Line: 10, Col: 85} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2)) if templ_7745c5c3_Err != nil { @@ -53,7 +53,7 @@ func PluginLane(page string, lane string) templ.Component { var templ_7745c5c3_Var3 string templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(lane) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `weed/admin/view/app/plugin_lane.templ`, Line: 10, Col: 111} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `plugin_lane.templ`, Line: 10, Col: 111} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3)) if templ_7745c5c3_Err != nil { @@ -66,7 +66,7 @@ func PluginLane(page string, lane string) templ.Component { var templ_7745c5c3_Var4 string templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(lane) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `weed/admin/view/app/plugin_lane.templ`, Line: 15, Col: 86} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `plugin_lane.templ`, Line: 15, Col: 86} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4)) if templ_7745c5c3_Err != nil { @@ -79,13 +79,13 @@ func PluginLane(page string, lane string) templ.Component { var templ_7745c5c3_Var5 string templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(lane) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `weed/admin/view/app/plugin_lane.templ`, Line: 16, Col: 94} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `plugin_lane.templ`, Line: 16, Col: 94} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 5, " scheduling lane.

All Workers
Lane Scheduler Status
Loading scheduler status...
Job Types
Loading job types...
Connected Workers
Loading workers...
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 5, " scheduling lane.

All Workers
Lane Scheduler Status
Loading scheduler status...
Job Types
Loading job types...
Connected Workers
Loading workers...
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err }