Files
waf-platform/EdgeAdmin/internal/web/actions/default/clusters/anti-ddos/init.go

74 lines
2.9 KiB
Go

//go:build plus
package antiddos
import (
"github.com/TeaOSLab/EdgeAdmin/internal/configloaders"
"github.com/TeaOSLab/EdgeAdmin/internal/plus"
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/clusters/anti-ddos/instances"
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/clusters/anti-ddos/instances/instance"
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/clusters/anti-ddos/networks"
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/clusters/anti-ddos/networks/network"
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/clusters/anti-ddos/periods"
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/clusters/anti-ddos/periods/period"
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/clusters/anti-ddos/user-instances"
"github.com/TeaOSLab/EdgeAdmin/internal/web/helpers"
"github.com/iwind/TeaGo"
)
func init() {
TeaGo.BeforeStart(func(server *TeaGo.Server) {
server.
Helper(plus.NewHelper(plus.ComponentCodeAntiDDoS)).
Helper(helpers.NewUserMustAuth(configloaders.AdminModuleCodeNode)).
Data("teaMenu", "clusters").
Data("teaSubMenu", "antiDDoS").
// 高防产品
Prefix("/clusters/anti-ddos").
Get("", new(IndexAction)).
GetPost("/createPopup", new(CreatePopupAction)).
GetPost("/updatePopup", new(UpdatePopupAction)).
Post("/delete", new(DeleteAction)).
GetPost("/updatePricesPopup", new(UpdatePricesPopupAction)).
Post("/updatePrice", new(UpdatePriceAction)).
// 实例
Prefix("/clusters/anti-ddos/instances").
Get("", new(instances.IndexAction)).
GetPost("/createPopup", new(instances.CreatePopupAction)).
GetPost("/instance/updatePopup", new(instance.UpdatePopupAction)).
Post("/instance/delete", new(instance.DeleteAction)).
// 高防线路
Prefix("/clusters/anti-ddos/networks").
Get("", new(networks.IndexAction)).
GetPost("/createPopup", new(networks.CreatePopupAction)).
GetPost("/network/updatePopup", new(network.UpdatePopupAction)).
Post("/network/delete", new(network.DeleteAction)).
// 高防实例有效期
Prefix("/clusters/anti-ddos/periods").
Get("", new(periods.IndexAction)).
GetPost("/createPopup", new(periods.CreatePopupAction)).
// 高防实例有效期详情
Prefix("/clusters/anti-ddos/periods/period").
GetPost("/updatePopup", new(period.UpdatePopupAction)).
Post("/delete", new(period.DeleteAction)).
// 用户高防实例
Prefix("/clusters/anti-ddos/user-instances").
Get("", new(userinstances.IndexAction)).
GetPost("/createPopup", new(userinstances.CreatePopupAction)).
Post("/price", new(userinstances.PriceAction)).
Post("/delete", new(userinstances.DeleteAction)).
GetPost("/renewPopup", new(userinstances.RenewPopupAction)).
GetPost("/updateObjectsPopup", new(userinstances.UpdateObjectsPopupAction)).
Post("/userServers", new(userinstances.UserServersAction)).
//
EndAll()
})
}