优化界面显示

This commit is contained in:
刘祥超
2021-02-24 15:01:45 +08:00
parent fc714a15a3
commit a14e81a28f
8 changed files with 71 additions and 24 deletions

View File

@@ -1,4 +1,4 @@
package settings
package health
import (
"encoding/json"
@@ -9,16 +9,16 @@ import (
"github.com/iwind/TeaGo/actions"
)
type HealthAction struct {
type IndexAction struct {
actionutils.ParentAction
}
func (this *HealthAction) Init() {
func (this *IndexAction) Init() {
this.Nav("", "setting", "")
this.SecondMenu("health")
}
func (this *HealthAction) RunGet(params struct {
func (this *IndexAction) RunGet(params struct {
ClusterId int64
}) {
configResp, err := this.RPC().NodeClusterRPC().FindNodeClusterHealthCheckConfig(this.AdminContext(), &pb.FindNodeClusterHealthCheckConfigRequest{NodeClusterId: params.ClusterId})
@@ -40,7 +40,7 @@ func (this *HealthAction) RunGet(params struct {
this.Show()
}
func (this *HealthAction) RunPost(params struct {
func (this *IndexAction) RunPost(params struct {
ClusterId int64
HealthCheckJSON []byte
Must *actions.Must

View File

@@ -1,4 +1,4 @@
package settings
package health
import (
"github.com/TeaOSLab/EdgeAdmin/internal/oplogs"
@@ -7,20 +7,19 @@ import (
"github.com/iwind/TeaGo/actions"
)
type HealthRunPopupAction struct {
type RunPopupAction struct {
actionutils.ParentAction
}
func (this *HealthRunPopupAction) Init() {
func (this *RunPopupAction) Init() {
this.Nav("", "", "")
}
func (this *HealthRunPopupAction) RunGet(params struct{}) {
func (this *RunPopupAction) RunGet(params struct{}) {
this.Show()
}
func (this *HealthRunPopupAction) RunPost(params struct {
func (this *RunPopupAction) RunPost(params struct {
ClusterId int64
Must *actions.Must

View File

@@ -5,6 +5,7 @@ import (
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/clusters/cluster/settings/cache"
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/clusters/cluster/settings/dns"
firewallActions "github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/clusters/cluster/settings/firewall-actions"
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/clusters/cluster/settings/health"
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/clusters/cluster/settings/services"
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/clusters/cluster/settings/toa"
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/clusters/cluster/settings/waf"
@@ -22,8 +23,8 @@ func init() {
GetPost("", new(IndexAction)).
// 健康检查
GetPost("/health", new(HealthAction)).
GetPost("/healthRunPopup", new(HealthRunPopupAction)).
GetPost("/health", new(health.IndexAction)).
GetPost("/health/runPopup", new(health.RunPopupAction)).
// 缓存
GetPost("/cache", new(cache.IndexAction)).