AppPlugins: Options to disable showing config page in nav (#31354)

* AppPlugins: Options to disable showing config page in nav

* rename

* Added autoEnabled

* updated

* Things are working sort of

* Simplify
This commit is contained in:
Torkel Ödegaard
2021-02-25 10:00:21 +01:00
committed by GitHub
parent df3d84f161
commit 584886fa46
8 changed files with 19 additions and 13 deletions

View File

@@ -400,7 +400,7 @@ function getPluginTabsNav(
if (plugin.angularConfigCtrl) {
pages.push({
text: 'Config',
icon: 'gicon gicon-cog',
icon: 'cog',
url: `${appSubUrl}${path}?page=${PAGE_ID_CONFIG_CTRL}`,
id: PAGE_ID_CONFIG_CTRL,
});
@@ -426,7 +426,7 @@ function getPluginTabsNav(
if (find(meta.includes, { type: PluginIncludeType.dashboard })) {
pages.push({
text: 'Dashboards',
icon: 'gicon gicon-dashboard',
icon: 'apps',
url: `${appSubUrl}${path}?page=${PAGE_ID_DASHBOARDS}`,
id: PAGE_ID_DASHBOARDS,
});

View File

@@ -38,6 +38,7 @@ export class AppPageCtrl {
this.navModel = this.navModelSrv.getNotFoundNav();
return;
}
if (app.type !== 'app' || !app.enabled) {
this.$rootScope.appEvent(AppEvents.alertError, ['Application Not Enabled']);
this.navModel = this.navModelSrv.getNotFoundNav();