mirror of
https://github.com/grafana/grafana.git
synced 2025-01-17 04:02:50 -06:00
Datasources: add new tab and feature toggle (#25663)
* Datasources: add insights tab * Config: add feature flag
This commit is contained in:
parent
1479786fb8
commit
4853770db3
@ -39,6 +39,7 @@ export interface FeatureToggles {
|
||||
* Available only in Grafana Enterprise
|
||||
*/
|
||||
meta: boolean;
|
||||
datasourceInsights: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -53,6 +53,7 @@ export class GrafanaBootConfig implements GrafanaConfig {
|
||||
expressions: false,
|
||||
newEdit: false,
|
||||
meta: false,
|
||||
datasourceInsights: false,
|
||||
};
|
||||
licenseInfo: LicenseInfo = {} as LicenseInfo;
|
||||
rendererAvailable = false;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user