前端页面
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
package clusters
|
||||
|
||||
import (
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/httpdns/httpdnsutils"
|
||||
)
|
||||
|
||||
type ClusterAction struct {
|
||||
actionutils.ParentAction
|
||||
}
|
||||
|
||||
func (this *ClusterAction) Init() {
|
||||
this.Nav("httpdns", "cluster", "index")
|
||||
}
|
||||
|
||||
func (this *ClusterAction) RunGet(params struct {
|
||||
ClusterId int64
|
||||
InstalledState int
|
||||
ActiveState int
|
||||
Keyword string
|
||||
}) {
|
||||
httpdnsutils.AddLeftMenu(this.Parent())
|
||||
cluster := pickCluster(params.ClusterId)
|
||||
this.Data["clusterId"] = params.ClusterId
|
||||
this.Data["cluster"] = cluster
|
||||
this.Data["installState"] = params.InstalledState
|
||||
this.Data["activeState"] = params.ActiveState
|
||||
this.Data["keyword"] = params.Keyword
|
||||
nodes := mockNodes(params.ClusterId, params.InstalledState, params.ActiveState, params.Keyword)
|
||||
this.Data["nodes"] = nodes
|
||||
this.Data["hasNodes"] = len(nodes) > 0
|
||||
this.Data["page"] = ""
|
||||
this.Show()
|
||||
}
|
||||
Reference in New Issue
Block a user