mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-11-15 00:09:00 +01:00
admin: vector servers on the dashboard
A Vector servers count in the Cluster card and a Vector Servers table after S3 Servers, from the engines the dashboard already discovers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011UpvafvK8JpagF94MHWqwK
This commit is contained in:
1 parent
a576398662
commit
405efc2fbb
4 files changed
+424
-231
No files matched your search
@@ -64,3 +64,22 @@ func TestClusterHealthSummary(t *testing.T) {
|
||||
t.Errorf("empty cluster issues = %q", got)
|
||||
}
|
||||
}
|
||||
|
||||
func TestAdminDashboardListsVectorServers(t *testing.T) {
|
||||
var out bytes.Buffer
|
||||
data := dash.AdminData{VectorNodes: []dash.VectorNode{{Address: "10.0.0.6:18888", Kind: "engine", Version: "0.1.0", Status: "Ready"}}}
|
||||
if err := Admin(data).Render(context.Background(), &out); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
page := out.String()
|
||||
if !strings.Contains(page, "Vector servers") || !strings.Contains(page, "<td>10.0.0.6:18888</td><td>engine</td>") || strings.Contains(page, "No vector servers found") {
|
||||
t.Fatal("the dashboard does not list the vector engine")
|
||||
}
|
||||
out.Reset()
|
||||
if err := Admin(dash.AdminData{}).Render(context.Background(), &out); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if !strings.Contains(out.String(), "No vector servers found") {
|
||||
t.Fatal("no empty state without vector servers")
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user