2020-07-22 22:19:39 +08:00
|
|
|
package nodes
|
|
|
|
|
|
2020-07-29 19:34:54 +08:00
|
|
|
import (
|
|
|
|
|
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
|
|
|
|
|
"github.com/iwind/TeaGo/actions"
|
|
|
|
|
)
|
2020-07-22 22:19:39 +08:00
|
|
|
|
|
|
|
|
type Helper struct {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (this *Helper) BeforeAction(action *actions.ActionObject) {
|
|
|
|
|
action.Data["teaMenu"] = "nodes"
|
2020-07-29 19:34:54 +08:00
|
|
|
|
|
|
|
|
selectedTabbar, _ := action.Data["mainTab"]
|
|
|
|
|
|
|
|
|
|
tabbar := actionutils.NewTabbar()
|
2020-08-21 21:09:42 +08:00
|
|
|
tabbar.Add("节点", "", "/nodes", "", selectedTabbar == "node")
|
|
|
|
|
tabbar.Add("认证", "", "/nodes/grants", "", selectedTabbar == "grant")
|
2020-07-29 19:34:54 +08:00
|
|
|
actionutils.SetTabbar(action, tabbar)
|
2020-07-22 22:19:39 +08:00
|
|
|
}
|