Nav: Split Admin into three sections for new IA (#58229)
* start to split admin into two sections * most of new admin nav implemented * landing pages * hide admin for non-admins * update admin redirects if not topnav * clean up * updated IA for admin (still WIP) * move plugin pages into correct admin sections * fix backend unit test * move correlations into the correct section * add translations for admin sections Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
This commit is contained in:
co-authored by
Ashley Harrison
parent
8c72d19bcc
commit
5978dc138e
@@ -33,18 +33,20 @@ func TestNavTreeRoot(t *testing.T) {
|
||||
require.Equal(t, 2, len(treeRoot.Children))
|
||||
})
|
||||
|
||||
t.Run("Should move admin section into cfg and rename when topnav is enabled", func(t *testing.T) {
|
||||
t.Run("Should create 3 new sections in the Admin node when topnav is enabled", func(t *testing.T) {
|
||||
treeRoot := NavTreeRoot{
|
||||
Children: []*NavLink{
|
||||
{Id: NavIDCfg},
|
||||
{Id: NavIDAdmin, Children: []*NavLink{{Id: "child"}}},
|
||||
{Id: NavIDAdmin, Children: []*NavLink{{Id: "upgrading"}, {Id: "plugins"}, {Id: "teams"}}},
|
||||
},
|
||||
}
|
||||
|
||||
treeRoot.RemoveEmptySectionsAndApplyNewInformationArchitecture(true)
|
||||
|
||||
require.Equal(t, "Administration", treeRoot.Children[0].Text)
|
||||
require.Equal(t, NavIDAdmin, treeRoot.Children[0].Children[0].Id)
|
||||
require.Equal(t, NavIDAdminGeneral, treeRoot.Children[0].Children[0].Id)
|
||||
require.Equal(t, NavIDAdminPlugins, treeRoot.Children[0].Children[1].Id)
|
||||
require.Equal(t, NavIDAdminAccess, treeRoot.Children[0].Children[2].Id)
|
||||
})
|
||||
|
||||
t.Run("Should move reports into Dashboards", func(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user