From 7608b8ba440d7d4d82ce2677f897f6954b88b17c Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Tue, 17 Feb 2026 11:12:11 -0800 Subject: [PATCH] fix: Sort plugins by ID in admin UI - Add sort package to imports - Sort plugins list by ID before rendering - Ensures consistent display order regardless of connection order - Plugin IDs are properly used in action link URLs (/plugins/jobs/{id}, /plugins/config/{id}) --- weed/admin/handlers/admin_handlers.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/weed/admin/handlers/admin_handlers.go b/weed/admin/handlers/admin_handlers.go index ff86a9c0ef..7c411c8c17 100644 --- a/weed/admin/handlers/admin_handlers.go +++ b/weed/admin/handlers/admin_handlers.go @@ -3,6 +3,7 @@ package handlers import ( "net/http" "net/url" + "sort" "time" "github.com/gin-gonic/gin" @@ -760,6 +761,11 @@ func (h *AdminHandlers) ShowPlugins(c *gin.Context) { } } + // Sort plugins by ID + sort.Slice(plugins, func(i, j int) bool { + return plugins[i]["id"].(string) < plugins[j]["id"].(string) + }) + component := app.PluginsOverview(app.PluginsPageData{ Plugins: plugins, JobTypes: jobTypes,