mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
fix: use type
instead of uid
to get datasource metadata (#53543)
This commit is contained in:
parent
7554322327
commit
d7556bd189
@ -45,7 +45,7 @@ export function EditDataSource({ uid, pageId }: Props) {
|
||||
|
||||
const dispatch = useDispatch();
|
||||
const dataSource = useDataSource(uid);
|
||||
const dataSourceMeta = useDataSourceMeta(uid);
|
||||
const dataSourceMeta = useDataSourceMeta(dataSource.type);
|
||||
const dataSourceSettings = useDataSourceSettings();
|
||||
const dataSourceRights = useDataSourceRights(uid);
|
||||
const exploreUrl = useDataSourceExploreUrl(uid);
|
||||
|
@ -115,8 +115,8 @@ export const useDataSourceExploreUrl = (uid: string) => {
|
||||
return exploreUrl;
|
||||
};
|
||||
|
||||
export const useDataSourceMeta = (uid: string): DataSourcePluginMeta => {
|
||||
return useSelector((state: StoreState) => getDataSourceMeta(state.dataSources, uid));
|
||||
export const useDataSourceMeta = (pluginType: string): DataSourcePluginMeta => {
|
||||
return useSelector((state: StoreState) => getDataSourceMeta(state.dataSources, pluginType));
|
||||
};
|
||||
|
||||
export const useDataSourceSettings = () => {
|
||||
|
Loading…
Reference in New Issue
Block a user