dashfolders: Send down backendSrv to the react components #10275

This commit is contained in:
Johannes Schill
2018-01-25 15:30:15 +01:00
committed by Daniel Lee
parent b79a15b057
commit 2de0489868
3 changed files with 6 additions and 3 deletions
+1
View File
@@ -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>
);
}
+4 -2
View File
@@ -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]);