Commit 4ea9f302 by Johannes Schill Committed by Daniel Lee

dashfolders: Remove variables not used and pass in the real dashboardId #10275

parent 02a3951f
...@@ -8,8 +8,6 @@ import Permissions from 'app/core/components/Permissions/Permissions'; ...@@ -8,8 +8,6 @@ import Permissions from 'app/core/components/Permissions/Permissions';
@inject('nav', 'folder', 'view', 'permissions') @inject('nav', 'folder', 'view', 'permissions')
@observer @observer
export class FolderPermissions extends Component<IContainerProps, any> { export class FolderPermissions extends Component<IContainerProps, any> {
dashboard: any;
constructor(props) { constructor(props) {
super(props); super(props);
this.loadStore(); this.loadStore();
...@@ -18,7 +16,6 @@ export class FolderPermissions extends Component<IContainerProps, any> { ...@@ -18,7 +16,6 @@ export class FolderPermissions extends Component<IContainerProps, any> {
loadStore() { loadStore() {
const { nav, folder, view } = this.props; const { nav, folder, view } = this.props;
return folder.load(view.routeParams.get('slug') as string).then(res => { return folder.load(view.routeParams.get('slug') as string).then(res => {
this.dashboard = res.dashboard;
return nav.initFolderNav(toJS(folder.folder), 'manage-folder-permissions'); return nav.initFolderNav(toJS(folder.folder), 'manage-folder-permissions');
}); });
} }
...@@ -30,15 +27,17 @@ export class FolderPermissions extends Component<IContainerProps, any> { ...@@ -30,15 +27,17 @@ export class FolderPermissions extends Component<IContainerProps, any> {
return <h2>Loading</h2>; return <h2>Loading</h2>;
} }
const dashboardId = folder.folder.id;
return ( return (
<div> <div>
<PageHeader model={nav as any} /> <PageHeader model={nav as any} />
<div className="page-container page-body"> <div className="page-container page-body">
<h2 className="page-sub-heading">Folder Permissions</h2>
<Permissions <Permissions
permissions={permissions} permissions={permissions}
isFolder={true} isFolder={true}
error="" dashboardId={dashboardId}
dashboardId={1}
backendSrv={this.props.backendSrv} backendSrv={this.props.backendSrv}
/> />
</div> </div>
......
...@@ -23,7 +23,6 @@ export interface DashboardAcl { ...@@ -23,7 +23,6 @@ export interface DashboardAcl {
} }
export interface IProps { export interface IProps {
error: string;
dashboardId: number; dashboardId: number;
permissions?: any; permissions?: any;
isFolder: boolean; isFolder: boolean;
......
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