mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
only push default datasources to the list if they're not undefined (#43966)
This commit is contained in:
parent
bf417be2e0
commit
8f1468df6a
@ -268,15 +268,24 @@ export class DatasourceSrv implements DataSourceService {
|
||||
|
||||
if (!filters.pluginId && !filters.alerting) {
|
||||
if (filters.mixed) {
|
||||
base.push(this.getInstanceSettings('-- Mixed --')!);
|
||||
const mixedInstanceSettings = this.getInstanceSettings('-- Mixed --');
|
||||
if (mixedInstanceSettings) {
|
||||
base.push(mixedInstanceSettings);
|
||||
}
|
||||
}
|
||||
|
||||
if (filters.dashboard) {
|
||||
base.push(this.getInstanceSettings('-- Dashboard --')!);
|
||||
const dashboardInstanceSettings = this.getInstanceSettings('-- Dashboard --');
|
||||
if (dashboardInstanceSettings) {
|
||||
base.push(dashboardInstanceSettings);
|
||||
}
|
||||
}
|
||||
|
||||
if (!filters.tracing) {
|
||||
base.push(this.getInstanceSettings('-- Grafana --')!);
|
||||
const grafanaInstanceSettings = this.getInstanceSettings('-- Grafana --');
|
||||
if (grafanaInstanceSettings) {
|
||||
base.push(grafanaInstanceSettings);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user