mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-11 18:30:25 +08:00
增加刷新、预热缓存任务管理
This commit is contained in:
24
internal/web/actions/default/servers/components/cache/batch/init.go
vendored
Normal file
24
internal/web/actions/default/servers/components/cache/batch/init.go
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
package cache
|
||||
|
||||
import (
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/configloaders"
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/web/helpers"
|
||||
"github.com/iwind/TeaGo"
|
||||
)
|
||||
|
||||
func init() {
|
||||
TeaGo.BeforeStart(func(server *TeaGo.Server) {
|
||||
server.
|
||||
Helper(helpers.NewUserMustAuth(configloaders.AdminModuleCodeServer)).
|
||||
Data("teaMenu", "servers").
|
||||
Data("teaSubMenu", "cacheBatch").
|
||||
Prefix("/servers/components/cache/batch").
|
||||
GetPost("", new(IndexAction)).
|
||||
GetPost("/fetch", new(FetchAction)).
|
||||
Get("/tasks", new(TasksAction)).
|
||||
Get("/task", new(TaskAction)).
|
||||
Post("/deleteTask", new(DeleteTaskAction)).
|
||||
Post("/resetTask", new(ResetTaskAction)).
|
||||
EndAll()
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user