diff --git a/devenv/dev-dashboards/panel-barchart/barchart-autosizing.json b/devenv/dev-dashboards/panel-barchart/barchart-autosizing.json index cf261ba8052..d484fabcc11 100644 --- a/devenv/dev-dashboards/panel-barchart/barchart-autosizing.json +++ b/devenv/dev-dashboards/panel-barchart/barchart-autosizing.json @@ -29,10 +29,7 @@ "liveNow": false, "panels": [ { - "datasource": { - "type": "testdata", - "uid": "PD8C576611E62080A" - }, + "datasource": { "type": "testdata" }, "fieldConfig": { "defaults": { "color": { @@ -110,10 +107,7 @@ "type": "barchart" }, { - "datasource": { - "type": "testdata", - "uid": "PD8C576611E62080A" - }, + "datasource": { "type": "testdata" }, "description": "Should be smaller given the longer value", "fieldConfig": { "defaults": { @@ -193,10 +187,7 @@ "type": "barchart" }, { - "datasource": { - "type": "testdata", - "uid": "PD8C576611E62080A" - }, + "datasource": { "type": "testdata" }, "fieldConfig": { "defaults": { "color": { @@ -274,10 +265,7 @@ "type": "barchart" }, { - "datasource": { - "type": "testdata", - "uid": "PD8C576611E62080A" - }, + "datasource": { "type": "testdata" }, "fieldConfig": { "defaults": { "color": { @@ -436,10 +424,7 @@ "type": "barchart" }, { - "datasource": { - "type": "testdata", - "uid": "PD8C576611E62080A" - }, + "datasource": { "type": "testdata" }, "fieldConfig": { "defaults": { "color": { @@ -518,10 +503,7 @@ "type": "barchart" }, { - "datasource": { - "type": "testdata", - "uid": "PD8C576611E62080A" - }, + "datasource": { "type": "testdata" }, "description": "", "fieldConfig": { "defaults": { diff --git a/public/app/features/plugins/datasource_srv.ts b/public/app/features/plugins/datasource_srv.ts index 15b0fe15bd0..4b5bcda96b8 100644 --- a/public/app/features/plugins/datasource_srv.ts +++ b/public/app/features/plugins/datasource_srv.ts @@ -259,8 +259,14 @@ export class DatasourceSrv implements DataSourceService { if (filters.filter && !filters.filter(x)) { return false; } - if (filters.type && (Array.isArray(filters.type) ? !filters.type.includes(x.type) : filters.type !== x.type)) { - return false; + if (filters.type) { + if (Array.isArray(filters.type)) { + if (!filters.type.includes(x.type)) { + return false; + } + } else if (!(x.type === filters.type || x.meta.aliasIDs?.includes(filters.type!))) { + return false; + } } if ( !filters.all &&