mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Navigation: Fix some missing pages in admin section (#60143)
* add stats and licensing under admin -> general when topnav is enabled * add ldap to users and access * use ID instead of Id * add enterprise licensing node
This commit is contained in:
parent
be57419540
commit
39a4ba4396
@ -59,7 +59,15 @@ func ProvideService(cfg *setting.Cfg, hooksService *hooks.HooksService) *OSSLice
|
||||
return
|
||||
}
|
||||
|
||||
if adminNode := indexData.NavTree.FindById(navtree.NavIDAdmin); adminNode != nil {
|
||||
var adminNodeID string
|
||||
|
||||
if cfg.IsFeatureToggleEnabled("topnav") {
|
||||
adminNodeID = navtree.NavIDCfg
|
||||
} else {
|
||||
adminNodeID = navtree.NavIDAdmin
|
||||
}
|
||||
|
||||
if adminNode := indexData.NavTree.FindById(adminNodeID); adminNode != nil {
|
||||
adminNode.Children = append(adminNode.Children, &navtree.NavLink{
|
||||
Text: "Stats and license",
|
||||
Id: "upgrading",
|
||||
|
@ -185,6 +185,7 @@ func ApplyAdminIA(root *NavTreeRoot) {
|
||||
accessNodeLinks := []*NavLink{}
|
||||
|
||||
generalNodeLinks = AppendIfNotNil(generalNodeLinks, root.FindById("upgrading"))
|
||||
generalNodeLinks = AppendIfNotNil(generalNodeLinks, root.FindById("licensing"))
|
||||
if orgSettings := root.FindById("org-settings"); orgSettings != nil {
|
||||
orgSettings.Text = "Default preferences"
|
||||
generalNodeLinks = append(generalNodeLinks, orgSettings)
|
||||
@ -205,6 +206,7 @@ func ApplyAdminIA(root *NavTreeRoot) {
|
||||
accessNodeLinks = AppendIfNotNil(accessNodeLinks, root.FindById("teams"))
|
||||
accessNodeLinks = AppendIfNotNil(accessNodeLinks, root.FindById("serviceaccounts"))
|
||||
accessNodeLinks = AppendIfNotNil(accessNodeLinks, root.FindById("apikeys"))
|
||||
accessNodeLinks = AppendIfNotNil(accessNodeLinks, root.FindById("ldap"))
|
||||
accessNodeLinks = AppendIfNotNil(accessNodeLinks, root.FindById("standalone-plugin-page-/a/grafana-auth-app")) // Cloud Access Policies
|
||||
|
||||
generalNode := &NavLink{
|
||||
|
Loading…
Reference in New Issue
Block a user