Commit 2de04898 by Johannes Schill Committed by Daniel Lee

dashfolders: Send down backendSrv to the react components #10275

parent b79a15b0
......@@ -12,6 +12,7 @@ interface IContainerProps {
alertList: typeof AlertListStore.Type;
view: typeof ViewStore.Type;
folder: typeof FolderStore.Type;
backendSrv: any;
}
export default IContainerProps;
......@@ -33,7 +33,7 @@ export class FolderPermissions extends Component<IContainerProps, any> {
return (
<div>
<PageHeader model={nav as any} />
<Permissions isFolder={true} error="" newType="" dashboardId={1} />
<Permissions isFolder={true} error="" newType="" dashboardId={1} backendSrv={this.props.backendSrv} />
</div>
);
}
......
......@@ -13,13 +13,15 @@ function WrapInProvider(store, Component, props) {
}
/** @ngInject */
export function reactContainer($route, $location) {
export function reactContainer($route, $location, backendSrv) {
return {
restrict: 'E',
template: '',
link(scope, elem) {
let component = $route.current.locals.component;
let props = {};
let props = {
backendSrv: backendSrv,
};
ReactDOM.render(WrapInProvider(store, component, props), elem[0]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment