Files
EdgeAdmin/internal/web/actions/default/dns/helper.go
2020-09-13 20:37:07 +08:00

25 lines
500 B
Go

package dns
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"] = "dns"
selectedTabbar, _ := action.Data["mainTab"]
tabbar := actionutils.NewTabbar()
tabbar.Add("DNS", "", "/dns", "", selectedTabbar == "dns")
actionutils.SetTabbar(action, tabbar)
}