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"
|
2020-11-15 16:28:25 +08:00
|
|
|
"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)).
|
2020-10-17 21:15:22 +08:00
|
|
|
GetPost("/health", new(HealthAction)).
|
2020-10-20 16:45:10 +08:00
|
|
|
GetPost("/healthRunPopup", new(HealthRunPopupAction)).
|
2020-11-15 16:28:25 +08:00
|
|
|
|
|
|
|
|
// 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-11-15 16:28:25 +08:00
|
|
|
|
2020-09-06 16:19:34 +08:00
|
|
|
EndAll()
|
|
|
|
|
})
|
|
|
|
|
}
|