mirror of
https://github.com/grafana/grafana.git
synced 2026-07-30 00:08:10 -05:00
dashfolders: Send down backendSrv to the react components #10275
This commit is contained in:
committed by
Daniel Lee
parent
b79a15b057
commit
2de0489868
@@ -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]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user