import MainAppBar, { MainAppBarActionProps, MainAppBarMenuItem } from '../../views-components/main-app-bar/main-app-bar';
import { Breadcrumb } from '../../components/breadcrumbs/breadcrumbs';
import { push } from 'react-router-redux';
-import projectActions from "../../store/project/project-action";
+import projectActions, { getProjectList } from "../../store/project/project-action";
import ProjectTree from '../../views-components/project-tree/project-tree';
import { TreeItem, TreeItemStatus } from "../../components/tree/tree";
import { Project } from "../../models/project";
-import { projectService } from '../../services/services';
import { getTreePath } from '../../store/project/project-reducer';
import DataExplorer from '../data-explorer/data-explorer';
const drawerWidth = 240;
+const appBarHeight = 102;
-type CssRules = 'root' | 'appBar' | 'drawerPaper' | 'content' | 'toolbar';
+type CssRules = 'root' | 'appBar' | 'drawerPaper' | 'content' | 'contentWrapper' | 'toolbar';
const styles: StyleRulesCallback<CssRules> = (theme: Theme) => ({
root: {
position: 'relative',
width: drawerWidth,
},
- content: {
- flexGrow: 1,
+ contentWrapper: {
backgroundColor: theme.palette.background.default,
- padding: theme.spacing.unit * 3,
- height: '100%',
+ display: "flex",
+ flexGrow: 1,
minWidth: 0,
+ paddingTop: appBarHeight
+ },
+ content: {
+ padding: theme.spacing.unit * 3,
+ overflowY: "auto",
+ flexGrow: 1
},
toolbar: theme.mixins.toolbar
});
if (status === TreeItemStatus.Loaded) {
this.openProjectItem(itemId);
} else {
- this.props.dispatch<any>(projectService.getProjectList(itemId))
+ this.props.dispatch<any>(getProjectList(itemId))
.then(() => this.openProjectItem(itemId));
}
}
projects={this.props.projects}
toggleProjectTreeItem={this.toggleProjectTreeItem} />
</Drawer>}
- <main className={classes.content}>
- <div className={classes.toolbar} />
- <div className={classes.toolbar} />
- <Switch>
- <Route path="/project/:name" component={DataExplorer} />
- </Switch>
+ <main className={classes.contentWrapper}>
+ <div className={classes.content}>
+ <Switch>
+ <Route path="/project/:name" component={DataExplorer} />
+ </Switch>
+ </div>
</main>
</div>
);