Files
EdgeAdmin/internal/web/actions/default/clusters/cluster/settings/init.go

33 lines
1008 B
Go
Raw Normal View History

2020-09-06 16:19:34 +08:00
package settings
import (
2020-12-03 11:03:12 +08:00
"github.com/TeaOSLab/EdgeAdmin/internal/configloaders"
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/clusters/cluster/settings/dns"
2020-12-02 14:25:14 +08:00
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/clusters/cluster/settings/toa"
2020-09-06 16:19:34 +08:00
clusters "github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/clusters/clusterutils"
"github.com/TeaOSLab/EdgeAdmin/internal/web/helpers"
"github.com/iwind/TeaGo"
)
func init() {
TeaGo.BeforeStart(func(server *TeaGo.Server) {
server.
2020-12-03 11:03:12 +08:00
Helper(helpers.NewUserMustAuth(configloaders.AdminModuleCodeNode)).
2020-09-06 16:19:34 +08:00
Helper(clusters.NewClusterHelper()).
Prefix("/clusters/cluster/settings").
GetPost("", new(IndexAction)).
GetPost("/health", new(HealthAction)).
GetPost("/healthRunPopup", new(HealthRunPopupAction)).
// DNS
2020-12-02 14:25:14 +08:00
Prefix("/clusters/cluster/settings/dns").
GetPost("", new(dns.IndexAction)).
// TOA
Prefix("/clusters/cluster/settings/toa").
GetPost("", new(toa.IndexAction)).
2020-09-06 16:19:34 +08:00
EndAll()
})
}