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()).
|
2020-09-06 16:19:34 +08:00
|
|
|
Prefix("/clusters").
|
|
|
|
|
Get("", new(IndexAction)).
|
|
|
|
|
GetPost("/create", new(CreateAction)).
|
2020-10-09 12:03:32 +08:00
|
|
|
Post("/sync", new(SyncAction)).
|
|
|
|
|
Post("/checkChange", new(CheckChangeAction)).
|
2020-09-06 16:19:34 +08:00
|
|
|
EndAll()
|
|
|
|
|
})
|
|
|
|
|
}
|