Initial commit (code only without large binaries)
This commit is contained in:
119
EdgeAdmin/internal/web/actions/default/ns/init.go
Normal file
119
EdgeAdmin/internal/web/actions/default/ns/init.go
Normal file
@@ -0,0 +1,119 @@
|
||||
//go:build plus
|
||||
|
||||
package ns
|
||||
|
||||
import (
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/configloaders"
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/plus"
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/ns/domains"
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/ns/domains/batch"
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/ns/domains/domain"
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/ns/domains/groups"
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/ns/domains/groups/group"
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/ns/domains/keys"
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/ns/domains/records"
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/ns/plans"
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/ns/plans/plan"
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/ns/settings"
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/ns/userPlans"
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/ns/userPlans/userPlan"
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/web/helpers"
|
||||
"github.com/iwind/TeaGo"
|
||||
)
|
||||
|
||||
func init() {
|
||||
TeaGo.BeforeStart(func(server *TeaGo.Server) {
|
||||
server.
|
||||
Helper(plus.NewHelper(plus.ComponentCodeNS)).
|
||||
Helper(helpers.NewUserMustAuth(configloaders.AdminModuleCodeNS)).
|
||||
Data("teaMenu", "ns").
|
||||
Prefix("/ns").
|
||||
GetPost("", new(IndexAction)).
|
||||
GetPost("/addPortPopup", new(AddPortPopupAction)).
|
||||
|
||||
// 域名列表
|
||||
Prefix("/ns/domains").
|
||||
Data("teaSubMenu", "domain").
|
||||
Get("", new(domains.IndexAction)).
|
||||
GetPost("/create", new(domains.CreateAction)).
|
||||
Post("/delete", new(domains.DeleteAction)).
|
||||
Post("/deletePage", new(domains.DeletePageAction)).
|
||||
GetPost("/update", new(domains.UpdateAction)).
|
||||
GetPost("/tsig", new(domains.TsigAction)).
|
||||
GetPost("/healthCheck", new(domains.HealthCheckAction)).
|
||||
|
||||
// 单个域名
|
||||
Prefix("/ns/domains/domain").
|
||||
Data("teaSubMenu", "domain").
|
||||
Get("", new(domain.IndexAction)).
|
||||
GetPost("/updateStatusPopup", new(domain.UpdateStatusPopupAction)).
|
||||
|
||||
// 域名批量操作
|
||||
Prefix("/ns/domains/batch").
|
||||
Data("teaSubMenu", "domainBatch").
|
||||
GetPost("", new(batch.IndexAction)).
|
||||
GetPost("/createRecords", new(batch.CreateRecordsAction)).
|
||||
GetPost("/deleteDomains", new(batch.DeleteDomainsAction)).
|
||||
GetPost("/updateRecords", new(batch.UpdateRecordsAction)).
|
||||
GetPost("/enableRecords", new(batch.EnableRecordsAction)).
|
||||
GetPost("/importRecords", new(batch.ImportRecordsAction)).
|
||||
GetPost("/deleteRecords", new(batch.DeleteRecordsAction)).
|
||||
|
||||
// 域名密钥
|
||||
Prefix("/ns/domains/keys").
|
||||
Data("teaSubMenu", "domain").
|
||||
Get("", new(keys.IndexAction)).
|
||||
GetPost("/createPopup", new(keys.CreatePopupAction)).
|
||||
GetPost("/updatePopup", new(keys.UpdatePopupAction)).
|
||||
Post("/delete", new(keys.DeleteAction)).
|
||||
Post("/generateSecret", new(keys.GenerateSecretAction)).
|
||||
|
||||
// 记录相关
|
||||
Prefix("/ns/domains/records").
|
||||
Get("", new(records.IndexAction)).
|
||||
GetPost("/createPopup", new(records.CreatePopupAction)).
|
||||
GetPost("/updatePopup", new(records.UpdatePopupAction)).
|
||||
Post("/delete", new(records.DeleteAction)).
|
||||
GetPost("/statPopup", new(records.StatPopupAction)).
|
||||
GetPost("/healthCheckPopup", new(records.HealthCheckPopupAction)).
|
||||
Post("/updateUp", new(records.UpdateUpAction)).
|
||||
|
||||
// 域名分组列表
|
||||
Prefix("/ns/domains/groups").
|
||||
Data("teaSubMenu", "domainGroup").
|
||||
Get("", new(groups.IndexAction)).
|
||||
GetPost("/createPopup", new(groups.CreatePopupAction)).
|
||||
Post("/options", new(groups.OptionsAction)).
|
||||
|
||||
// 域名分组
|
||||
Prefix("/ns/domains/groups/group").
|
||||
Data("teaSubMenu", "domainGroup").
|
||||
Get("", new(group.IndexAction)).
|
||||
GetPost("/updatePopup", new(group.UpdatePopupAction)).
|
||||
Post("/delete", new(group.DeleteAction)).
|
||||
|
||||
// 设置
|
||||
Prefix("/ns/settings").
|
||||
Get("", new(settings.IndexAction)).
|
||||
|
||||
// 套餐管理
|
||||
Prefix("/ns/plans").
|
||||
Data("teaSubMenu", "plan").
|
||||
Get("", new(plans.IndexAction)).
|
||||
Post("/sort", new(plans.SortAction)).
|
||||
GetPost("/createPopup", new(plans.CreatePopupAction)).
|
||||
GetPost("/plan/updatePopup", new(plan.UpdatePopupAction)).
|
||||
Post("/plan/delete", new(plan.DeleteAction)).
|
||||
|
||||
// 用户套餐
|
||||
Prefix("/ns/userPlans").
|
||||
Data("teaSubMenu", "userPlan").
|
||||
Get("", new(userPlans.IndexAction)).
|
||||
GetPost("/createPopup", new(userPlans.CreatePopupAction)).
|
||||
GetPost("/userPlan/updatePopup", new(userPlan.UpdatePopupAction)).
|
||||
Post("/userPlan/delete", new(userPlan.DeleteAction)).
|
||||
|
||||
//
|
||||
EndAll()
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user