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 { ...@@ -12,6 +12,7 @@ interface IContainerProps {
alertList: typeof AlertListStore.Type; alertList: typeof AlertListStore.Type;
view: typeof ViewStore.Type; view: typeof ViewStore.Type;
folder: typeof FolderStore.Type; folder: typeof FolderStore.Type;
backendSrv: any;
} }
export default IContainerProps; export default IContainerProps;
...@@ -33,7 +33,7 @@ export class FolderPermissions extends Component<IContainerProps, any> { ...@@ -33,7 +33,7 @@ export class FolderPermissions extends Component<IContainerProps, any> {
return ( return (
<div> <div>
<PageHeader model={nav as any} /> <PageHeader model={nav as any} />
<Permissions isFolder={true} error="" newType="" dashboardId={1} /> <Permissions isFolder={true} error="" newType="" dashboardId={1} backendSrv={this.props.backendSrv} />
</div> </div>
); );
} }
......
...@@ -13,13 +13,15 @@ function WrapInProvider(store, Component, props) { ...@@ -13,13 +13,15 @@ function WrapInProvider(store, Component, props) {
} }
/** @ngInject */ /** @ngInject */
export function reactContainer($route, $location) { export function reactContainer($route, $location, backendSrv) {
return { return {
restrict: 'E', restrict: 'E',
template: '', template: '',
link(scope, elem) { link(scope, elem) {
let component = $route.current.locals.component; let component = $route.current.locals.component;
let props = {}; let props = {
backendSrv: backendSrv,
};
ReactDOM.render(WrapInProvider(store, component, props), elem[0]); 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