DataSourceSrv: Look up data source by uid and name transparently (#29449)

* Datasources: Look up data source by uid or name transparently

* comment tweak

* Removed config

* fixed type issues

* Initialize datasource srv

* Added deprecation notice

* Renamed getSettingsFor to getInstanceSettings

* fixed ts issue
This commit is contained in:
Torkel Ödegaard
2020-12-01 15:17:33 +01:00
committed by GitHub
parent b7aa6fed1d
commit 38caa80acd
9 changed files with 177 additions and 112 deletions

View File

@@ -214,7 +214,7 @@ function updateFrontendSettings() {
.then((settings: any) => {
config.datasources = settings.datasources;
config.defaultDatasource = settings.defaultDatasource;
getDatasourceSrv().init();
getDatasourceSrv().init(config.datasources, settings.defaultDatasource);
});
}