DataSourceSrv: Filter out non queryable data sources by default (#31144)

This commit is contained in:
Torkel Ödegaard
2021-02-15 11:27:16 +01:00
committed by GitHub
parent 0c3c17592e
commit 50faeb3078
3 changed files with 41 additions and 0 deletions

View File

@ -157,6 +157,15 @@ export class DatasourceSrv implements DataSourceService {
if (filters.pluginId && x.meta.id !== filters.pluginId) {
return false;
}
if (
!filters.all &&
x.meta.metrics !== true &&
x.meta.annotations !== true &&
x.meta.tracing !== true &&
x.meta.logs !== true
) {
return false;
}
return true;
});