管理端全部功能跑通

This commit is contained in:
robin
2026-02-27 10:35:22 +08:00
parent 4d275c921d
commit 150799f41d
263 changed files with 22664 additions and 4053 deletions

View File

@@ -13,8 +13,27 @@ func (this *IndexAction) Init() {
this.Nav("httpdns", "cluster", "")
}
func (this *IndexAction) RunGet(params struct{}) {
func (this *IndexAction) RunGet(params struct {
Keyword string
}) {
httpdnsutils.AddLeftMenu(this.Parent())
this.Data["clusters"] = mockClusters()
this.Data["keyword"] = params.Keyword
clusters, err := listClusterMaps(this.Parent(), params.Keyword)
if err != nil {
this.ErrorPage(err)
return
}
this.Data["clusters"] = clusters
hasErrorLogs := false
for _, cluster := range clusters {
if cluster.GetInt("countAllNodes") > cluster.GetInt("countActiveNodes") {
hasErrorLogs = true
break
}
}
this.Data["hasErrorLogs"] = hasErrorLogs
this.Data["page"] = ""
this.Show()
}