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

This commit is contained in:
Johannes Schill 2018-01-18 20:46:01 +01:00 committed by Daniel Lee
parent 02a3951f95
commit 4ea9f3027a
2 changed files with 4 additions and 6 deletions

View File

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

View File

@ -23,7 +23,6 @@ export interface DashboardAcl {
}
export interface IProps {
error: string;
dashboardId: number;
permissions?: any;
isFolder: boolean;