mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-09 16:50:26 +08:00
调整界面
This commit is contained in:
@@ -1,7 +1,6 @@
|
|||||||
package clusterutils
|
package clusterutils
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
|
|
||||||
"github.com/iwind/TeaGo/actions"
|
"github.com/iwind/TeaGo/actions"
|
||||||
"net/http"
|
"net/http"
|
||||||
)
|
)
|
||||||
@@ -19,11 +18,4 @@ func (this *ClustersHelper) BeforeAction(action *actions.ActionObject) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
action.Data["teaMenu"] = "clusters"
|
action.Data["teaMenu"] = "clusters"
|
||||||
|
|
||||||
selectedTabbar, _ := action.Data["mainTab"]
|
|
||||||
|
|
||||||
tabbar := actionutils.NewTabbar()
|
|
||||||
tabbar.Add("集群", "", "/clusters", "", selectedTabbar == "cluster")
|
|
||||||
tabbar.Add("SSH认证", "", "/clusters/grants", "", selectedTabbar == "grant")
|
|
||||||
actionutils.SetTabbar(action, tabbar)
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ func init() {
|
|||||||
server.
|
server.
|
||||||
Helper(helpers.NewUserMustAuth()).
|
Helper(helpers.NewUserMustAuth()).
|
||||||
Helper(clusterutils.NewClustersHelper()).
|
Helper(clusterutils.NewClustersHelper()).
|
||||||
|
Data("teaSubMenu", "grant").
|
||||||
Prefix("/clusters/grants").
|
Prefix("/clusters/grants").
|
||||||
|
|
||||||
// 授权管理
|
// 授权管理
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
package nodes
|
package nodes
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
|
|
||||||
"github.com/iwind/TeaGo/actions"
|
"github.com/iwind/TeaGo/actions"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -10,11 +9,4 @@ type Helper struct {
|
|||||||
|
|
||||||
func (this *Helper) BeforeAction(action *actions.ActionObject) {
|
func (this *Helper) BeforeAction(action *actions.ActionObject) {
|
||||||
action.Data["teaMenu"] = "nodes"
|
action.Data["teaMenu"] = "nodes"
|
||||||
|
|
||||||
selectedTabbar, _ := action.Data["mainTab"]
|
|
||||||
|
|
||||||
tabbar := actionutils.NewTabbar()
|
|
||||||
tabbar.Add("节点", "", "/nodes", "", selectedTabbar == "node")
|
|
||||||
tabbar.Add("认证", "", "/nodes/grants", "", selectedTabbar == "grant")
|
|
||||||
actionutils.SetTabbar(action, tabbar)
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -96,6 +96,13 @@ func (this *UserMustAuth) BeforeAction(actionPtr actions.ActionWrapper, paramNam
|
|||||||
"code": "clusters",
|
"code": "clusters",
|
||||||
"name": "节点集群",
|
"name": "节点集群",
|
||||||
"icon": "cloud",
|
"icon": "cloud",
|
||||||
|
"subItems": []maps.Map{
|
||||||
|
{
|
||||||
|
"name": "SSH认证",
|
||||||
|
"url": "/clusters/grants",
|
||||||
|
"code": "grant",
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"code": "dns",
|
"code": "dns",
|
||||||
@@ -129,7 +136,9 @@ func (this *UserMustAuth) BeforeAction(actionPtr actions.ActionWrapper, paramNam
|
|||||||
action.Data["teaVersion"] = teaconst.Version
|
action.Data["teaVersion"] = teaconst.Version
|
||||||
action.Data["teaIsSuper"] = false
|
action.Data["teaIsSuper"] = false
|
||||||
action.Data["teaDemoEnabled"] = teaconst.IsDemo
|
action.Data["teaDemoEnabled"] = teaconst.IsDemo
|
||||||
|
if !action.Data.Has("teaSubMenu") {
|
||||||
action.Data["teaSubMenu"] = ""
|
action.Data["teaSubMenu"] = ""
|
||||||
|
}
|
||||||
|
|
||||||
// 菜单
|
// 菜单
|
||||||
action.Data["firstMenuItem"] = ""
|
action.Data["firstMenuItem"] = ""
|
||||||
|
|||||||
Reference in New Issue
Block a user