mirror of
https://github.com/grafana/grafana.git
synced 2025-01-08 15:13:30 -06:00
Plugins: Make datasource instances live targets for the sandbox (#71472)
This commit is contained in:
parent
a42bab9c97
commit
0db1d16c09
@ -1,5 +1,6 @@
|
||||
import { isNearMembraneProxy, ProxyTarget } from '@locker/near-membrane-shared';
|
||||
|
||||
import { DataSourceApi } from '@grafana/data';
|
||||
import { config } from '@grafana/runtime';
|
||||
|
||||
import { forbiddenElements } from './constants';
|
||||
@ -107,7 +108,7 @@ export function patchObjectAsLiveTarget(obj: unknown) {
|
||||
!(obj instanceof Function) &&
|
||||
// conditions for allowed objects
|
||||
// react class components
|
||||
isReactClassComponent(obj)
|
||||
(isReactClassComponent(obj) || obj instanceof DataSourceApi)
|
||||
) {
|
||||
Reflect.defineProperty(obj, SANDBOX_LIVE_VALUE, {});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user