Commit d2eca2fa by Torkel Ödegaard

ux: new navbar fixes, restored delete option in dashboard dropdown, fixes #8521

parent d47c4785
...@@ -43,8 +43,8 @@ export class NavModelSrv { ...@@ -43,8 +43,8 @@ export class NavModelSrv {
icon: 'icon-gf icon-gf-datasources' icon: 'icon-gf icon-gf-datasources'
}, },
menu: [ menu: [
{title: 'List view', active: subPage === 0, url: '/datasources', icon: 'fa fa-list-ul'}, {title: 'List view', active: subPage === 0, url: 'datasources', icon: 'fa fa-list-ul'},
{title: 'Add data source', active: subPage === 1, url: '/datasources/new', icon: 'fa fa-plus'}, {title: 'Add data source', active: subPage === 1, url: 'datasources/new', icon: 'fa fa-plus'},
] ]
}; };
} }
...@@ -57,8 +57,8 @@ export class NavModelSrv { ...@@ -57,8 +57,8 @@ export class NavModelSrv {
icon: 'fa fa-fw fa-film' icon: 'fa fa-fw fa-film'
}, },
menu: [ menu: [
{title: 'List view', active: subPage === 0, url: '/playlists', icon: 'fa fa-list-ul'}, {title: 'List view', active: subPage === 0, url: 'playlists', icon: 'fa fa-list-ul'},
{title: 'Add Playlist', active: subPage === 1, url: '/playlists/create', icon: 'fa fa-plus'}, {title: 'Add Playlist', active: subPage === 1, url: 'playlists/create', icon: 'fa fa-plus'},
] ]
}; };
} }
...@@ -93,9 +93,9 @@ export class NavModelSrv { ...@@ -93,9 +93,9 @@ export class NavModelSrv {
icon: 'icon-gf icon-gf-users' icon: 'icon-gf icon-gf-users'
}, },
menu: [ menu: [
{title: 'Preferences', active: subPage === 0, url: '/org', icon: 'fa fa-fw fa-cog'}, {title: 'Preferences', active: subPage === 0, url: 'org', icon: 'fa fa-fw fa-cog'},
{title: 'Org Users', active: subPage === 1, url: '/org/users', icon: 'fa fa-fw fa-users'}, {title: 'Org Users', active: subPage === 1, url: 'org/users', icon: 'fa fa-fw fa-users'},
{title: 'API Keys', active: subPage === 2, url: '/org/apikeys', icon: 'fa fa-fw fa-key'}, {title: 'API Keys', active: subPage === 2, url: 'org/apikeys', icon: 'fa fa-fw fa-key'},
] ]
}; };
} }
...@@ -108,11 +108,11 @@ export class NavModelSrv { ...@@ -108,11 +108,11 @@ export class NavModelSrv {
icon: 'fa fa-fw fa-cogs' icon: 'fa fa-fw fa-cogs'
}, },
menu: [ menu: [
{title: 'Users', active: subPage === 0, url: '/admin/users', icon: 'fa fa-fw fa-user'}, {title: 'Users', active: subPage === 0, url: 'admin/users', icon: 'fa fa-fw fa-user'},
{title: 'Orgs', active: subPage === 1, url: '/admin/orgs', icon: 'fa fa-fw fa-users'}, {title: 'Orgs', active: subPage === 1, url: 'admin/orgs', icon: 'fa fa-fw fa-users'},
{title: 'Server Settings', active: subPage === 2, url: '/admin/settings', icon: 'fa fa-fw fa-cogs'}, {title: 'Server Settings', active: subPage === 2, url: 'admin/settings', icon: 'fa fa-fw fa-cogs'},
{title: 'Server Stats', active: subPage === 2, url: '/admin/stats', icon: 'fa fa-fw fa-line-chart'}, {title: 'Server Stats', active: subPage === 2, url: 'admin/stats', icon: 'fa fa-fw fa-line-chart'},
{title: 'Style Guide', active: subPage === 2, url: '/styleguide', icon: 'fa fa-fw fa-key'}, {title: 'Style Guide', active: subPage === 2, url: 'styleguide', icon: 'fa fa-fw fa-key'},
] ]
}; };
} }
...@@ -196,6 +196,15 @@ export class NavModelSrv { ...@@ -196,6 +196,15 @@ export class NavModelSrv {
}); });
} }
if (dashboard.meta.canSave) {
menu.push({
title: 'Delete',
icon: 'fa fa-fw fa-trash',
clickHandler: () => dashNavCtrl.deleteDashboard()
});
}
return { return {
section: { section: {
title: dashboard.title, title: dashboard.title,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment