[ARVADOS-WORKBENCH2] created: 1.1.4-281-g5be1434
Git user
git at public.curoverse.com
Fri Jul 13 05:35:30 EDT 2018
at 5be1434f78d6dbcf2949918f7f042cab994ab0c5 (commit)
commit 5be1434f78d6dbcf2949918f7f042cab994ab0c5
Merge: 2d35cbd 31e4c18
Author: Pawel Kowalczyk <pawel.kowalczyk at contractors.roche.com>
Date: Fri Jul 13 11:35:08 2018 +0200
refactor
Feature #13796
Arvados-DCO-1.1-Signed-off-by: Pawel Kowalczyk <pawel.kowalczyk at contractors.roche.com>
diff --cc src/components/breadcrumbs/breadcrumbs.tsx
index 4868e13,4868e13..cfcfd40
--- a/src/components/breadcrumbs/breadcrumbs.tsx
+++ b/src/components/breadcrumbs/breadcrumbs.tsx
@@@ -38,9 -38,9 +38,7 @@@ const Breadcrumbs: React.SFC<Breadcrumb
</Typography>
</Button>
</Tooltip>
-- {
-- !isLastItem && <ChevronRightIcon color="inherit" className={classes.item} />
-- }
++ {!isLastItem && <ChevronRightIcon color="inherit" className={classes.item} />}
</React.Fragment>
);
})
@@@ -51,7 -51,7 +49,6 @@@
type CssRules = "item" | "currentItem" | "label";
const styles: StyleRulesCallback<CssRules> = theme => {
-- const { unit } = theme.spacing;
return {
item: {
opacity: 0.6
diff --cc src/views-components/create-project-dialog/create-project-dialog.tsx
index 701ceee,701ceee..6b69b79
--- a/src/views-components/create-project-dialog/create-project-dialog.tsx
+++ b/src/views-components/create-project-dialog/create-project-dialog.tsx
@@@ -3,7 -3,7 +3,7 @@@
// SPDX-License-Identifier: AGPL-3.0
import { connect } from "react-redux";
--import { Dispatch } from "../../../node_modules/redux";
++import { Dispatch } from "redux";
import { RootState } from "../../store/store";
import DialogProjectCreate from "../dialog-create/dialog-project-create";
import actions, { createProject, getProjectList } from "../../store/project/project-action";
diff --cc src/views-components/dialog-create/dialog-project-create.tsx
index ef07ea2,ef07ea2..89deea6
--- a/src/views-components/dialog-create/dialog-project-create.tsx
+++ b/src/views-components/dialog-create/dialog-project-create.tsx
@@@ -87,13 -87,13 +87,13 @@@ class DialogProjectCreate extends React
});
}
-- handleProjectName(e: any) {
++ handleProjectName(e: React.ChangeEvent<HTMLInputElement>) {
this.setState({
name: e.target.value,
});
}
-- handleDescriptionValue(e: any) {
++ handleDescriptionValue(e: React.ChangeEvent<HTMLInputElement>) {
this.setState({
description: e.target.value,
});
diff --cc src/views-components/main-app-bar/main-app-bar.test.tsx
index 7bdb63b,7bdb63b..46c281c
--- a/src/views-components/main-app-bar/main-app-bar.test.tsx
+++ b/src/views-components/main-app-bar/main-app-bar.test.tsx
@@@ -28,6 -28,6 +28,7 @@@ describe("<MainAppBar />", () =>
const mainAppBar = mount(
<MainAppBar
user={user}
++ onContextMenu={jest.fn()}
onDetailsPanelToggle={jest.fn()}
{...{ searchText: "", breadcrumbs: [], menuItems: { accountMenu: [], helpMenu: [], anonymousMenu: [] }, onSearch: jest.fn(), onBreadcrumbClick: jest.fn(), onMenuItemClick: jest.fn() }}
/>
@@@ -43,6 -43,6 +44,7 @@@
<MainAppBar
menuItems={menuItems}
onDetailsPanelToggle={jest.fn()}
++ onContextMenu={jest.fn()}
{...{ searchText: "", breadcrumbs: [], onSearch: jest.fn(), onBreadcrumbClick: jest.fn(), onMenuItemClick: jest.fn() }}
/>
);
@@@ -58,6 -58,6 +60,7 @@@
<MainAppBar
searchText="search text"
searchDebounce={2000}
++ onContextMenu={jest.fn()}
onSearch={onSearch}
onDetailsPanelToggle={jest.fn()}
{...{ user, breadcrumbs: [], menuItems: { accountMenu: [], helpMenu: [], anonymousMenu: [] }, onBreadcrumbClick: jest.fn(), onMenuItemClick: jest.fn() }}
@@@ -76,6 -76,6 +79,7 @@@
const mainAppBar = mount(
<MainAppBar
breadcrumbs={items}
++ onContextMenu={jest.fn()}
onBreadcrumbClick={onBreadcrumbClick}
onDetailsPanelToggle={jest.fn()}
{...{ user, searchText: "", menuItems: { accountMenu: [], helpMenu: [], anonymousMenu: [] }, onSearch: jest.fn(), onMenuItemClick: jest.fn() }}
@@@ -93,6 -93,6 +97,7 @@@
const mainAppBar = mount(
<MainAppBar
menuItems={menuItems}
++ onContextMenu={jest.fn()}
onMenuItemClick={onMenuItemClick}
onDetailsPanelToggle={jest.fn()}
{...{ user, searchText: "", breadcrumbs: [], onSearch: jest.fn(), onBreadcrumbClick: jest.fn() }}
diff --cc src/views-components/project-list/project-list.tsx
index 88cd0f7,88cd0f7..0000000
deleted file mode 100644,100644
--- a/src/views-components/project-list/project-list.tsx
+++ /dev/null
@@@ -1,61 -1,61 +1,0 @@@
--// Copyright (C) The Arvados Authors. All rights reserved.
--//
--// SPDX-License-Identifier: AGPL-3.0
--
--import * as React from 'react';
--import { Theme } from "@material-ui/core";
--import { StyleRulesCallback, WithStyles, withStyles } from "@material-ui/core/styles";
--import Paper from "@material-ui/core/Paper/Paper";
--import Table from "@material-ui/core/Table/Table";
--import TableHead from "@material-ui/core/TableHead/TableHead";
--import TableRow from "@material-ui/core/TableRow/TableRow";
--import TableCell from "@material-ui/core/TableCell/TableCell";
--import TableBody from "@material-ui/core/TableBody/TableBody";
--
--type CssRules = 'root' | 'table';
--
--const styles: StyleRulesCallback<CssRules> = (theme: Theme) => ({
-- root: {
-- width: '100%',
-- marginTop: theme.spacing.unit * 3,
-- overflowX: 'auto',
-- },
-- table: {
-- minWidth: 700,
-- },
--});
--
--interface ProjectListProps {
--}
--
--class ProjectList extends React.Component<ProjectListProps & WithStyles<CssRules>, {}> {
-- render() {
-- const {classes} = this.props;
-- return <Paper className={classes.root}>
-- <Table className={classes.table}>
-- <TableHead>
-- <TableRow>
-- <TableCell>Name</TableCell>
-- <TableCell>Status</TableCell>
-- <TableCell>Type</TableCell>
-- <TableCell>Shared by</TableCell>
-- <TableCell>File size</TableCell>
-- <TableCell>Last modified</TableCell>
-- </TableRow>
-- </TableHead>
-- <TableBody>
-- <TableRow>
-- <TableCell>Project 1</TableCell>
-- <TableCell>Complete</TableCell>
-- <TableCell>Project</TableCell>
-- <TableCell>John Doe</TableCell>
-- <TableCell>1.5 GB</TableCell>
-- <TableCell>9:22 PM</TableCell>
-- </TableRow>
-- </TableBody>
-- </Table>
-- </Paper>;
-- }
--}
--
--export default withStyles(styles)(ProjectList);
diff --cc src/views-components/project-tree/project-tree.test.tsx
index 7725da5,7725da5..1a5e9f9
--- a/src/views-components/project-tree/project-tree.test.tsx
+++ b/src/views-components/project-tree/project-tree.test.tsx
@@@ -35,7 -35,7 +35,7 @@@ describe("ProjectTree component", () =
active: true,
status: 1
};
-- const wrapper = mount(<ProjectTree projects={[project]} toggleOpen={jest.fn()} toggleActive={jest.fn()} />);
++ const wrapper = mount(<ProjectTree projects={[project]} onContextMenu={jest.fn()} toggleOpen={jest.fn()} toggleActive={jest.fn()} />);
expect(wrapper.find(ListItemIcon)).toHaveLength(1);
});
@@@ -73,7 -73,7 +73,7 @@@
status: 1
}
];
-- const wrapper = mount(<ProjectTree projects={project} toggleOpen={jest.fn()} toggleActive={jest.fn()} />);
++ const wrapper = mount(<ProjectTree projects={project} onContextMenu={jest.fn()} toggleOpen={jest.fn()} toggleActive={jest.fn()} />);
expect(wrapper.find(ListItemIcon)).toHaveLength(2);
});
@@@ -113,7 -113,7 +113,7 @@@
]
}
];
-- const wrapper = mount(<ProjectTree projects={project} toggleOpen={jest.fn()} toggleActive={jest.fn()}/>);
++ const wrapper = mount(<ProjectTree projects={project} onContextMenu={jest.fn()} toggleOpen={jest.fn()} toggleActive={jest.fn()}/>);
expect(wrapper.find(Collapse)).toHaveLength(1);
});
@@@ -134,7 -134,7 +134,7 @@@
active: true,
status: 1
};
-- const wrapper = mount(<ProjectTree projects={[project]} toggleOpen={jest.fn()} toggleActive={jest.fn()} />);
++ const wrapper = mount(<ProjectTree projects={[project]} onContextMenu={jest.fn()} toggleOpen={jest.fn()} toggleActive={jest.fn()} />);
expect(wrapper.find(CircularProgress)).toHaveLength(1);
});
diff --cc src/views/workbench/workbench.tsx
index e8f5aed,e7a8ae3..53392dd
--- a/src/views/workbench/workbench.tsx
+++ b/src/views/workbench/workbench.tsx
@@@ -34,7 -34,49 +34,8 @@@ import { authService } from '../../serv
import detailsPanelActions, { loadDetails } from "../../store/details-panel/details-panel-action";
import { ResourceKind } from '../../models/kinds';
+ import { SidePanelIdentifiers } from '../../store/side-panel/side-panel-reducer';
-const drawerWidth = 240;
-const appBarHeight = 100;
-
-type CssRules = 'root' | 'appBar' | 'drawerPaper' | 'content' | 'contentWrapper' | 'toolbar';
-
-const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
- root: {
- flexGrow: 1,
- zIndex: 1,
- overflow: 'hidden',
- position: 'relative',
- display: 'flex',
- width: '100vw',
- height: '100vh'
- },
- appBar: {
- zIndex: theme.zIndex.drawer + 1,
- position: "absolute",
- width: "100%"
- },
- drawerPaper: {
- position: 'relative',
- width: drawerWidth,
- display: 'flex',
- flexDirection: 'column',
- },
- contentWrapper: {
- backgroundColor: theme.palette.background.default,
- display: "flex",
- flexGrow: 1,
- minWidth: 0,
- paddingTop: appBarHeight
- },
- content: {
- padding: `${theme.spacing.unit}px ${theme.spacing.unit * 3}px`,
- overflowY: "auto",
- flexGrow: 1
- },
- toolbar: theme.mixins.toolbar
-});
-
interface WorkbenchDataProps {
projects: Array<TreeItem<Project>>;
currentProjectId: string;
@@@ -177,60 -275,6 +179,61 @@@ class Workbench extends React.Component
this.props.dispatch<any>(loadDetails(item.uuid, ResourceKind.Project));
}}
{...props} />
+
- mainAppBarActions: MainAppBarActionProps = {
- onBreadcrumbClick: ({ itemId }: NavBreadcrumb) => {
- this.props.dispatch<any>(setProjectItem(itemId, ItemMode.BOTH));
- this.props.dispatch<any>(loadDetails(itemId, ResourceKind.Project));
- },
- onSearch: searchText => {
- this.setState({ searchText });
- this.props.dispatch(push(`/search?q=${searchText}`));
- },
- onMenuItemClick: (menuItem: NavMenuItem) => menuItem.action(),
- onDetailsPanelToggle: () => {
- this.props.dispatch(detailsPanelActions.TOGGLE_DETAILS_PANEL());
- },
- onContextMenu: (event: React.MouseEvent<HTMLElement>, breadcrumb: NavBreadcrumb) => {
- this.openContextMenu(event, breadcrumb.itemId);
- }
- };
-
- toggleSidePanelOpen = (itemId: string) => {
- this.props.dispatch(sidePanelActions.TOGGLE_SIDE_PANEL_ITEM_OPEN(itemId));
- }
-
- toggleSidePanelActive = (itemId: string) => {
- this.props.dispatch(sidePanelActions.TOGGLE_SIDE_PANEL_ITEM_ACTIVE(itemId));
- this.props.dispatch(projectActions.RESET_PROJECT_TREE_ACTIVITY(itemId));
- }
-
- handleCreationDialogOpen = (itemUuid: string) => {
- this.closeContextMenu();
- this.props.dispatch(projectActions.OPEN_PROJECT_CREATOR({ ownerUuid: itemUuid }));
- }
-
-
- openContextMenu = (event: React.MouseEvent<HTMLElement>, itemUuid: string) => {
- event.preventDefault();
- this.setState({
- contextMenu: {
- anchorEl: mockAnchorFromMouseEvent(event),
- itemUuid
- }
- });
- }
-
- closeContextMenu = () => {
- this.setState({ contextMenu: {} });
++ mainAppBarActions: MainAppBarActionProps = {
++ onBreadcrumbClick: ({ itemId }: NavBreadcrumb) => {
++ this.props.dispatch<any>(setProjectItem(itemId, ItemMode.BOTH));
++ this.props.dispatch<any>(loadDetails(itemId, ResourceKind.Project));
++ },
++ onSearch: searchText => {
++ this.setState({ searchText });
++ this.props.dispatch(push(`/search?q=${searchText}`));
++ },
++ onMenuItemClick: (menuItem: NavMenuItem) => menuItem.action(),
++ onDetailsPanelToggle: () => {
++ this.props.dispatch(detailsPanelActions.TOGGLE_DETAILS_PANEL());
++ },
++ onContextMenu: (event: React.MouseEvent<HTMLElement>, breadcrumb: NavBreadcrumb) => {
++ this.openContextMenu(event, breadcrumb.itemId);
+ }
-
- openCreateDialog = (item: ContextMenuAction) => {
- const { itemUuid } = this.state.contextMenu;
- if (item.openCreateDialog && itemUuid) {
- this.handleCreationDialogOpen(itemUuid);
++ };
++
++ toggleSidePanelOpen = (itemId: string) => {
++ this.props.dispatch(sidePanelActions.TOGGLE_SIDE_PANEL_ITEM_OPEN(itemId));
++ }
++
++ toggleSidePanelActive = (itemId: string) => {
++ this.props.dispatch(sidePanelActions.TOGGLE_SIDE_PANEL_ITEM_ACTIVE(itemId));
++ this.props.dispatch(projectActions.RESET_PROJECT_TREE_ACTIVITY(itemId));
++ this.props.dispatch(push("/"));
++ }
++
++ handleCreationDialogOpen = (itemUuid: string) => {
++ this.closeContextMenu();
++ this.props.dispatch(projectActions.OPEN_PROJECT_CREATOR({ ownerUuid: itemUuid }));
++ }
++
++
++ openContextMenu = (event: React.MouseEvent<HTMLElement>, itemUuid: string) => {
++ event.preventDefault();
++ this.setState({
++ contextMenu: {
++ anchorEl: mockAnchorFromMouseEvent(event),
++ itemUuid
+ }
++ });
++ }
++
++ closeContextMenu = () => {
++ this.setState({ contextMenu: {} });
++ }
++
++ openCreateDialog = (item: ContextMenuAction) => {
++ const { itemUuid } = this.state.contextMenu;
++ if (item.openCreateDialog && itemUuid) {
++ this.handleCreationDialogOpen(itemUuid);
+ }
++ }
}
const contextMenuActions = [[{
commit 2d35cbd012daca122052739564120863fefebfce
Author: Pawel Kowalczyk <pawel.kowalczyk at contractors.roche.com>
Date: Thu Jul 12 13:49:40 2018 +0200
small refactor
Feature #13796
Arvados-DCO-1.1-Signed-off-by: Pawel Kowalczyk <pawel.kowalczyk at contractors.roche.com>
diff --git a/src/views/project-panel/project-panel.tsx b/src/views/project-panel/project-panel.tsx
index 0b1be09..0c9be91 100644
--- a/src/views/project-panel/project-panel.tsx
+++ b/src/views/project-panel/project-panel.tsx
@@ -34,31 +34,32 @@ type ProjectPanelProps = {
& WithStyles<CssRules>
& RouteComponentProps<{ id: string }>;
-class ProjectPanel extends React.Component<ProjectPanelProps> {
+class ProjectPanel extends React.Component<ProjectPanelProps> {
render() {
+ const { classes, currentItemId, onItemClick, onItemDoubleClick, onContextMenu, onDialogOpen } = this.props;
return <div>
- <div className={this.props.classes.toolbar}>
- <Button color="primary" variant="raised" className={this.props.classes.button}>
+ <div className={classes.toolbar}>
+ <Button color="primary" variant="raised" className={classes.button}>
Create a collection
</Button>
- <Button color="primary" variant="raised" className={this.props.classes.button}>
+ <Button color="primary" variant="raised" className={classes.button}>
Run a process
</Button>
- <Button color="primary" onClick={() => this.props.onDialogOpen(this.props.currentItemId)} variant="raised" className={this.props.classes.button}>
+ <Button color="primary" onClick={() => onDialogOpen(currentItemId)} variant="raised" className={classes.button}>
New project
</Button>
</div>
<DataExplorer
id={PROJECT_PANEL_ID}
- onRowClick={this.props.onItemClick}
- onRowDoubleClick={this.props.onItemDoubleClick}
- onContextMenu={this.props.onContextMenu} />
+ onRowClick={onItemClick}
+ onRowDoubleClick={onItemDoubleClick}
+ onContextMenu={onContextMenu} />
</div>;
}
- componentWillReceiveProps({ match, currentItemId }: ProjectPanelProps) {
+ componentWillReceiveProps({ match, currentItemId, onItemRouteChange }: ProjectPanelProps) {
if (match.params.id !== currentItemId) {
- this.props.onItemRouteChange(match.params.id);
+ onItemRouteChange(match.params.id);
}
}
}
diff --git a/src/views/workbench/workbench.tsx b/src/views/workbench/workbench.tsx
index 6ad4d24..e8f5aed 100644
--- a/src/views/workbench/workbench.tsx
+++ b/src/views/workbench/workbench.tsx
@@ -35,47 +35,6 @@ import { authService } from '../../services/services';
import detailsPanelActions, { loadDetails } from "../../store/details-panel/details-panel-action";
import { ResourceKind } from '../../models/kinds';
-const drawerWidth = 240;
-const appBarHeight = 100;
-
-type CssRules = 'root' | 'appBar' | 'drawerPaper' | 'content' | 'contentWrapper' | 'toolbar';
-
-const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
- root: {
- flexGrow: 1,
- zIndex: 1,
- overflow: 'hidden',
- position: 'relative',
- display: 'flex',
- width: '100vw',
- height: '100vh'
- },
- appBar: {
- zIndex: theme.zIndex.drawer + 1,
- position: "absolute",
- width: "100%"
- },
- drawerPaper: {
- position: 'relative',
- width: drawerWidth,
- display: 'flex',
- flexDirection: 'column',
- },
- contentWrapper: {
- backgroundColor: theme.palette.background.default,
- display: "flex",
- flexGrow: 1,
- minWidth: 0,
- paddingTop: appBarHeight
- },
- content: {
- padding: `${theme.spacing.unit}px ${theme.spacing.unit * 3}px`,
- overflowY: "auto",
- flexGrow: 1
- },
- toolbar: theme.mixins.toolbar
-});
-
interface WorkbenchDataProps {
projects: Array<TreeItem<Project>>;
currentProjectId: string;
@@ -147,60 +106,6 @@ class Workbench extends React.Component<WorkbenchProps, WorkbenchState> {
}
};
- mainAppBarActions: MainAppBarActionProps = {
- onBreadcrumbClick: ({ itemId }: NavBreadcrumb) => {
- this.props.dispatch<any>(setProjectItem(itemId, ItemMode.BOTH));
- this.props.dispatch<any>(loadDetails(itemId, ResourceKind.Project));
- },
- onSearch: searchText => {
- this.setState({ searchText });
- this.props.dispatch(push(`/search?q=${searchText}`));
- },
- onMenuItemClick: (menuItem: NavMenuItem) => menuItem.action(),
- onDetailsPanelToggle: () => {
- this.props.dispatch(detailsPanelActions.TOGGLE_DETAILS_PANEL());
- },
- onContextMenu: (event: React.MouseEvent<HTMLElement>, breadcrumb: NavBreadcrumb) => {
- this.openContextMenu(event, breadcrumb.itemId);
- }
- };
-
- toggleSidePanelOpen = (itemId: string) => {
- this.props.dispatch(sidePanelActions.TOGGLE_SIDE_PANEL_ITEM_OPEN(itemId));
- }
-
- toggleSidePanelActive = (itemId: string) => {
- this.props.dispatch(sidePanelActions.TOGGLE_SIDE_PANEL_ITEM_ACTIVE(itemId));
- this.props.dispatch(projectActions.RESET_PROJECT_TREE_ACTIVITY(itemId));
- }
-
- handleCreationDialogOpen = (itemUuid: string) => {
- this.closeContextMenu();
- this.props.dispatch(projectActions.OPEN_PROJECT_CREATOR({ ownerUuid: itemUuid }));
- }
-
-
- openContextMenu = (event: React.MouseEvent<HTMLElement>, itemUuid: string) => {
- event.preventDefault();
- this.setState({
- contextMenu: {
- anchorEl: mockAnchorFromMouseEvent(event),
- itemUuid
- }
- });
- }
-
- closeContextMenu = () => {
- this.setState({ contextMenu: {} });
- }
-
- openCreateDialog = (item: ContextMenuAction) => {
- const { itemUuid } = this.state.contextMenu;
- if (item.openCreateDialog && itemUuid) {
- this.handleCreationDialogOpen(itemUuid);
- }
- }
-
render() {
const path = getTreePath(this.props.projects, this.props.currentProjectId);
const breadcrumbs = path.map(item => ({
@@ -272,6 +177,60 @@ class Workbench extends React.Component<WorkbenchProps, WorkbenchState> {
this.props.dispatch<any>(loadDetails(item.uuid, ResourceKind.Project));
}}
{...props} />
+
+ mainAppBarActions: MainAppBarActionProps = {
+ onBreadcrumbClick: ({ itemId }: NavBreadcrumb) => {
+ this.props.dispatch<any>(setProjectItem(itemId, ItemMode.BOTH));
+ this.props.dispatch<any>(loadDetails(itemId, ResourceKind.Project));
+ },
+ onSearch: searchText => {
+ this.setState({ searchText });
+ this.props.dispatch(push(`/search?q=${searchText}`));
+ },
+ onMenuItemClick: (menuItem: NavMenuItem) => menuItem.action(),
+ onDetailsPanelToggle: () => {
+ this.props.dispatch(detailsPanelActions.TOGGLE_DETAILS_PANEL());
+ },
+ onContextMenu: (event: React.MouseEvent<HTMLElement>, breadcrumb: NavBreadcrumb) => {
+ this.openContextMenu(event, breadcrumb.itemId);
+ }
+ };
+
+ toggleSidePanelOpen = (itemId: string) => {
+ this.props.dispatch(sidePanelActions.TOGGLE_SIDE_PANEL_ITEM_OPEN(itemId));
+ }
+
+ toggleSidePanelActive = (itemId: string) => {
+ this.props.dispatch(sidePanelActions.TOGGLE_SIDE_PANEL_ITEM_ACTIVE(itemId));
+ this.props.dispatch(projectActions.RESET_PROJECT_TREE_ACTIVITY(itemId));
+ }
+
+ handleCreationDialogOpen = (itemUuid: string) => {
+ this.closeContextMenu();
+ this.props.dispatch(projectActions.OPEN_PROJECT_CREATOR({ ownerUuid: itemUuid }));
+ }
+
+
+ openContextMenu = (event: React.MouseEvent<HTMLElement>, itemUuid: string) => {
+ event.preventDefault();
+ this.setState({
+ contextMenu: {
+ anchorEl: mockAnchorFromMouseEvent(event),
+ itemUuid
+ }
+ });
+ }
+
+ closeContextMenu = () => {
+ this.setState({ contextMenu: {} });
+ }
+
+ openCreateDialog = (item: ContextMenuAction) => {
+ const { itemUuid } = this.state.contextMenu;
+ if (item.openCreateDialog && itemUuid) {
+ this.handleCreationDialogOpen(itemUuid);
+ }
+ }
}
const contextMenuActions = [[{
@@ -302,6 +261,47 @@ const contextMenuActions = [[{
}
]];
+const drawerWidth = 240;
+const appBarHeight = 100;
+
+type CssRules = 'root' | 'appBar' | 'drawerPaper' | 'content' | 'contentWrapper' | 'toolbar';
+
+const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
+ root: {
+ flexGrow: 1,
+ zIndex: 1,
+ overflow: 'hidden',
+ position: 'relative',
+ display: 'flex',
+ width: '100vw',
+ height: '100vh'
+ },
+ appBar: {
+ zIndex: theme.zIndex.drawer + 1,
+ position: "absolute",
+ width: "100%"
+ },
+ drawerPaper: {
+ position: 'relative',
+ width: drawerWidth,
+ display: 'flex',
+ flexDirection: 'column',
+ },
+ contentWrapper: {
+ backgroundColor: theme.palette.background.default,
+ display: "flex",
+ flexGrow: 1,
+ minWidth: 0,
+ paddingTop: appBarHeight
+ },
+ content: {
+ padding: `${theme.spacing.unit}px ${theme.spacing.unit * 3}px`,
+ overflowY: "auto",
+ flexGrow: 1
+ },
+ toolbar: theme.mixins.toolbar
+});
+
export default connect<WorkbenchDataProps>(
(state: RootState) => ({
projects: state.projects.items,
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list