Datasources: add new tab and feature toggle (#25663)

* Datasources: add insights tab

* Config: add feature flag
This commit is contained in:
Agnès Toulet 2020-06-18 09:37:13 +02:00 committed by GitHub
parent 1479786fb8
commit 4853770db3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 0 deletions

View File

@ -39,6 +39,7 @@ export interface FeatureToggles {
* Available only in Grafana Enterprise
*/
meta: boolean;
datasourceInsights: boolean;
}
/**

View File

@ -53,6 +53,7 @@ export class GrafanaBootConfig implements GrafanaConfig {
expressions: false,
newEdit: false,
meta: false,
datasourceInsights: false,
};
licenseInfo: LicenseInfo = {} as LicenseInfo;
rendererAvailable = false;

View File

@ -53,6 +53,16 @@ export function buildNavModel(dataSource: DataSourceSettings, plugin: GenericDat
text: 'Permissions',
url: `datasources/edit/${dataSource.id}/permissions`,
});
if (config.featureToggles.datasourceInsights) {
navModel.children.push({
active: false,
icon: 'info-circle',
id: `datasource-insights-${dataSource.id}`,
text: 'Insights',
url: `datasources/edit/${dataSource.id}/insights`,
});
}
}
return navModel;