2020-09-06 16:19:34 +08:00
|
|
|
package clusters
|
|
|
|
|
|
|
|
|
|
import (
|
2020-12-03 11:03:12 +08:00
|
|
|
"github.com/TeaOSLab/EdgeAdmin/internal/configloaders"
|
2020-10-25 21:27:28 +08:00
|
|
|
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/clusters/clusterutils"
|
2020-09-06 16:19:34 +08:00
|
|
|
"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-10-25 21:27:28 +08:00
|
|
|
Helper(clusterutils.NewClustersHelper()).
|
2021-10-15 12:54:23 +08:00
|
|
|
Data("teaMenu", "clusters").
|
2020-09-06 16:19:34 +08:00
|
|
|
Prefix("/clusters").
|
|
|
|
|
Get("", new(IndexAction)).
|
|
|
|
|
GetPost("/create", new(CreateAction)).
|
2022-03-17 11:12:24 +08:00
|
|
|
Post("/pin", new(PinAction)).
|
2020-12-16 15:49:15 +08:00
|
|
|
|
|
|
|
|
// 只要登录即可访问的Action
|
|
|
|
|
EndHelpers().
|
|
|
|
|
Helper(helpers.NewUserMustAuth(configloaders.AdminModuleCodeCommon)).
|
|
|
|
|
Post("/options", new(OptionsAction)).
|
2022-01-11 14:59:19 +08:00
|
|
|
Post("/nodeOptions", new(NodeOptionsAction)).
|
2021-07-31 22:23:07 +08:00
|
|
|
GetPost("/selectPopup", new(SelectPopupAction)).
|
2020-09-06 16:19:34 +08:00
|
|
|
EndAll()
|
|
|
|
|
})
|
|
|
|
|
}
|