Explore: Change datasourceName usage to datasourceUID or datasourceRef where appropriate (#52479)

* First pass at using datasource UID when appropriate

* Fix tests

* be more lenient with lookup to accomodate different URLs

* Make test setup get mock work like real datasource get

* Fix the typing issue and remaining tests

* Fix PR feedback
This commit is contained in:
Kristina
2022-07-25 13:05:57 -05:00
committed by GitHub
parent cb35729553
commit 0e13ee345d
17 changed files with 71 additions and 58 deletions

View File

@@ -41,7 +41,7 @@ export function changeDatasource(
): ThunkResult<void> {
return async (dispatch, getState) => {
const orgId = getState().user.orgId;
const { history, instance } = await loadAndInitDatasource(orgId, datasourceUid);
const { history, instance } = await loadAndInitDatasource(orgId, { uid: datasourceUid });
const currentDataSourceInstance = getState().explore[exploreId]!.datasourceInstance;
dispatch(