aboutsummaryrefslogtreecommitdiff
path: root/weed/command/admin.go
diff options
context:
space:
mode:
authorChris Lu <chrislusf@users.noreply.github.com>2025-07-11 10:19:27 -0700
committerGitHub <noreply@github.com>2025-07-11 10:19:27 -0700
commit51543bbb872161b7fa1c6ae30998981d4c55bc89 (patch)
treed7b7d646575bc534423d8ad8fe444765829b7c58 /weed/command/admin.go
parenta9e1f006739d397087ba8e7c632de223be40707d (diff)
downloadseaweedfs-51543bbb872161b7fa1c6ae30998981d4c55bc89.tar.xz
seaweedfs-51543bbb872161b7fa1c6ae30998981d4c55bc89.zip
Admin UI: Add message queue to admin UI (#6958)
* add a menu item "Message Queue" * add a menu item "Message Queue" * move the "brokers" link under it. * add "topics", "subscribers". Add pages for them. * refactor * show topic details * admin display publisher and subscriber info * remove publisher and subscribers from the topic row pull down * collecting more stats from publishers and subscribers * fix layout * fix publisher name * add local listeners for mq broker and agent * render consumer group offsets * remove subscribers from left menu * topic with retention * support editing topic retention * show retention when listing topics * create bucket * Update s3_buckets_templ.go * embed the static assets into the binary fix https://github.com/seaweedfs/seaweedfs/issues/6964
Diffstat (limited to 'weed/command/admin.go')
-rw-r--r--weed/command/admin.go11
1 files changed, 6 insertions, 5 deletions
diff --git a/weed/command/admin.go b/weed/command/admin.go
index 027fbec68..f88ca0514 100644
--- a/weed/command/admin.go
+++ b/weed/command/admin.go
@@ -19,6 +19,7 @@ import (
"github.com/gin-gonic/gin"
"github.com/spf13/viper"
+ "github.com/seaweedfs/seaweedfs/weed/admin"
"github.com/seaweedfs/seaweedfs/weed/admin/dash"
"github.com/seaweedfs/seaweedfs/weed/admin/handlers"
"github.com/seaweedfs/seaweedfs/weed/security"
@@ -181,12 +182,12 @@ func startAdminServer(ctx context.Context, options AdminOptions) error {
store := cookie.NewStore(sessionKeyBytes)
r.Use(sessions.Sessions("admin-session", store))
- // Static files - serve from filesystem
- staticPath := filepath.Join("weed", "admin", "static")
- if _, err := os.Stat(staticPath); err == nil {
- r.Static("/static", staticPath)
+ // Static files - serve from embedded filesystem
+ staticFS, err := admin.GetStaticFS()
+ if err != nil {
+ log.Printf("Warning: Failed to load embedded static files: %v", err)
} else {
- log.Printf("Warning: Static files not found at %s", staticPath)
+ r.StaticFS("/static", http.FS(staticFS))
}
// Create data directory if specified