mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-12-16 05:36:36 +08:00
阶段性提交
This commit is contained in:
24
internal/web/actions/default/db/helper.go
Normal file
24
internal/web/actions/default/db/helper.go
Normal file
@@ -0,0 +1,24 @@
|
||||
package db
|
||||
|
||||
import (
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
|
||||
"github.com/iwind/TeaGo/actions"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
type Helper struct {
|
||||
}
|
||||
|
||||
func (this *Helper) BeforeAction(action *actions.ActionObject) {
|
||||
if action.Request.Method != http.MethodGet {
|
||||
return
|
||||
}
|
||||
|
||||
action.Data["teaMenu"] = "db"
|
||||
|
||||
selectedTabbar, _ := action.Data["mainTab"]
|
||||
|
||||
tabbar := actionutils.NewTabbar()
|
||||
tabbar.Add("数据库节点", "", "/db", "", selectedTabbar == "db")
|
||||
actionutils.SetTabbar(action, tabbar)
|
||||
}
|
||||
Reference in New Issue
Block a user