Commit 4853770d by Agnès Toulet Committed by GitHub

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

* Datasources: add insights tab

* Config: add feature flag
parent 1479786f
...@@ -39,6 +39,7 @@ export interface FeatureToggles { ...@@ -39,6 +39,7 @@ export interface FeatureToggles {
* Available only in Grafana Enterprise * Available only in Grafana Enterprise
*/ */
meta: boolean; meta: boolean;
datasourceInsights: boolean;
} }
/** /**
......
...@@ -53,6 +53,7 @@ export class GrafanaBootConfig implements GrafanaConfig { ...@@ -53,6 +53,7 @@ export class GrafanaBootConfig implements GrafanaConfig {
expressions: false, expressions: false,
newEdit: false, newEdit: false,
meta: false, meta: false,
datasourceInsights: false,
}; };
licenseInfo: LicenseInfo = {} as LicenseInfo; licenseInfo: LicenseInfo = {} as LicenseInfo;
rendererAvailable = false; rendererAvailable = false;
......
...@@ -53,6 +53,16 @@ export function buildNavModel(dataSource: DataSourceSettings, plugin: GenericDat ...@@ -53,6 +53,16 @@ export function buildNavModel(dataSource: DataSourceSettings, plugin: GenericDat
text: 'Permissions', text: 'Permissions',
url: `datasources/edit/${dataSource.id}/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; return navModel;
......
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