mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-10-29 08:20:42 +01:00
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})
This commit is contained in:
1 parent
5342328836
commit
7608b8ba44
1 file changed
+6
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user