From 2de0489868005809979814406cd14ce64361f2ee Mon Sep 17 00:00:00 2001 From: Johannes Schill Date: Wed, 17 Jan 2018 16:11:34 +0100 Subject: [PATCH] dashfolders: Send down backendSrv to the react components #10275 --- public/app/containers/IContainerProps.ts | 1 + .../app/containers/ManageDashboards/FolderPermissions.tsx | 2 +- public/app/routes/ReactContainer.tsx | 6 ++++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/public/app/containers/IContainerProps.ts b/public/app/containers/IContainerProps.ts index a5629184864..c3eb2d80dee 100644 --- a/public/app/containers/IContainerProps.ts +++ b/public/app/containers/IContainerProps.ts @@ -12,6 +12,7 @@ interface IContainerProps { alertList: typeof AlertListStore.Type; view: typeof ViewStore.Type; folder: typeof FolderStore.Type; + backendSrv: any; } export default IContainerProps; diff --git a/public/app/containers/ManageDashboards/FolderPermissions.tsx b/public/app/containers/ManageDashboards/FolderPermissions.tsx index b5d5129878a..afb96eea4b9 100644 --- a/public/app/containers/ManageDashboards/FolderPermissions.tsx +++ b/public/app/containers/ManageDashboards/FolderPermissions.tsx @@ -33,7 +33,7 @@ export class FolderPermissions extends Component { return (
- +
); } diff --git a/public/app/routes/ReactContainer.tsx b/public/app/routes/ReactContainer.tsx index 72993661ec4..b7613d9474d 100644 --- a/public/app/routes/ReactContainer.tsx +++ b/public/app/routes/ReactContainer.tsx @@ -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]);