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

73 lines
2.8 KiB
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/cache"
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/clusters/cluster/settings/dns"
2021-02-06 17:37:09 +08:00
firewallActions "github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/clusters/cluster/settings/firewall-actions"
2021-02-24 15:01:45 +08:00
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/clusters/cluster/settings/health"
2021-04-12 19:19:59 +08:00
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/clusters/cluster/settings/message"
2021-01-11 18:15:53 +08:00
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/clusters/cluster/settings/services"
2021-05-04 21:02:25 +08:00
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/clusters/cluster/settings/thresholds"
2020-12-02 14:25:14 +08:00
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/clusters/cluster/settings/toa"
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/clusters/cluster/settings/waf"
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)).
// 健康检查
2021-02-24 15:01:45 +08:00
GetPost("/health", new(health.IndexAction)).
GetPost("/health/runPopup", new(health.RunPopupAction)).
// 缓存
GetPost("/cache", new(cache.IndexAction)).
// WAF
GetPost("/waf", new(waf.IndexAction)).
// DNS
2020-12-02 14:25:14 +08:00
Prefix("/clusters/cluster/settings/dns").
GetPost("", new(dns.IndexAction)).
2021-04-12 19:19:59 +08:00
// 消息
Prefix("/clusters/cluster/settings/message").
GetPost("", new(message.IndexAction)).
Get("/selectReceiverPopup", new(message.SelectReceiverPopupAction)).
Post("/selectedReceivers", new(message.SelectedReceiversAction)).
2020-12-02 14:25:14 +08:00
// TOA
Prefix("/clusters/cluster/settings/toa").
GetPost("", new(toa.IndexAction)).
2021-01-11 18:15:53 +08:00
// 系统服务设置
Prefix("/clusters/cluster/settings/services").
GetPost("", new(services.IndexAction)).
GetPost("/status", new(services.StatusAction)).
2021-02-06 17:37:09 +08:00
// 防火墙动作
Prefix("/clusters/cluster/settings/firewall-actions").
Get("", new(firewallActions.IndexAction)).
GetPost("/createPopup", new(firewallActions.CreatePopupAction)).
GetPost("/updatePopup", new(firewallActions.UpdatePopupAction)).
Post("/delete", new(firewallActions.DeleteAction)).
2021-05-04 21:02:25 +08:00
// 阈值
Prefix("/clusters/cluster/settings/thresholds").
Get("", new(thresholds.IndexAction)).
GetPost("/createPopup", new(thresholds.CreatePopupAction)).
GetPost("/updatePopup", new(thresholds.UpdatePopupAction)).
Post("/delete", new(thresholds.DeleteAction)).
2020-09-06 16:19:34 +08:00
EndAll()
})
}