Implement command dialog, update code snippet styles
[arvados.git] / src / views / workbench / workbench.tsx
index 94ef7db1c8cd70189fd7d822f00ae81adda1a713..5c4648b6d35810e63520943c7b922fc9205792d1 100644 (file)
@@ -30,16 +30,19 @@ import { ProcessLogPanel } from '~/views/process-log-panel/process-log-panel';
 import { CreateProjectDialog } from '~/views-components/dialog-forms/create-project-dialog';
 import { CreateCollectionDialog } from '~/views-components/dialog-forms/create-collection-dialog';
 import { CopyCollectionDialog } from '~/views-components/dialog-forms/copy-collection-dialog';
+import { CopyProcessDialog } from '~/views-components/dialog-forms/copy-process-dialog';
 import { UpdateCollectionDialog } from '~/views-components/dialog-forms/update-collection-dialog';
+import { UpdateProcessDialog } from '~/views-components/dialog-forms/update-process-dialog';
 import { UpdateProjectDialog } from '~/views-components/dialog-forms/update-project-dialog';
+import { MoveProcessDialog } from '~/views-components/dialog-forms/move-process-dialog';
 import { MoveProjectDialog } from '~/views-components/dialog-forms/move-project-dialog';
 import { MoveCollectionDialog } from '~/views-components/dialog-forms/move-collection-dialog';
 import { FilesUploadCollectionDialog } from '~/views-components/dialog-forms/files-upload-collection-dialog';
 import { PartialCopyCollectionDialog } from '~/views-components/dialog-forms/partial-copy-collection-dialog';
-
 import { TrashPanel } from "~/views/trash-panel/trash-panel";
-import { MainContentBar } from '../../views-components/main-content-bar/main-content-bar';
+import { MainContentBar } from '~/views-components/main-content-bar/main-content-bar';
 import { Grid } from '@material-ui/core';
+import { ProcessCommandDialog } from '~/views-components/process-command-dialog/process-command-dialog';
 
 type CssRules = 'root' | 'contentWrapper' | 'content' | 'appBar';
 
@@ -77,8 +80,6 @@ interface WorkbenchGeneralProps {
 type WorkbenchProps = WorkbenchDataProps & WorkbenchGeneralProps & DispatchProp<any> & WithStyles<CssRules>;
 
 interface WorkbenchState {
-    isCurrentTokenDialogOpen: boolean;
-    anchorEl: any;
     searchText: string;
 }
 
@@ -91,8 +92,6 @@ export const Workbench = withStyles(styles)(
     )(
         class extends React.Component<WorkbenchProps, WorkbenchState> {
             state = {
-                isCurrentTokenDialogOpen: false,
-                anchorEl: null,
                 searchText: "",
             };
 
@@ -106,7 +105,8 @@ export const Workbench = withStyles(styles)(
                             <MainAppBar
                                 searchText={this.state.searchText}
                                 user={this.props.user}
-                                onSearch={this.onSearch} />
+                                onSearch={this.onSearch}
+                                buildInfo={this.props.buildInfo} />
                         </Grid>
                         {this.props.user &&
                             <Grid
@@ -128,7 +128,7 @@ export const Workbench = withStyles(styles)(
                                     <Grid item>
                                         <MainContentBar />
                                     </Grid>
-                                    <Grid xs className={this.props.classes.content}>
+                                    <Grid item xs className={this.props.classes.content}>
                                         <Switch>
                                             <Route path={Routes.PROJECTS} component={ProjectPanel} />
                                             <Route path={Routes.COLLECTIONS} component={CollectionPanel} />
@@ -145,24 +145,25 @@ export const Workbench = withStyles(styles)(
                             </Grid>}
                     </Grid>
                     <ContextMenu />
-                    <Snackbar />
-                    <CreateProjectDialog />
+                    <CopyCollectionDialog />
+                    <CopyProcessDialog />
                     <CreateCollectionDialog />
-                    <RenameFileDialog />
-                    <PartialCopyCollectionDialog />
+                    <CreateProjectDialog />
+                    <CurrentTokenDialog />
                     <FileRemoveDialog />
-                    <CopyCollectionDialog />
                     <FileRemoveDialog />
-                    <MultipleFilesRemoveDialog />
-                    <UpdateCollectionDialog />
                     <FilesUploadCollectionDialog />
-                    <UpdateProjectDialog />
                     <MoveCollectionDialog />
+                    <MoveProcessDialog />
                     <MoveProjectDialog />
-                    <CurrentTokenDialog
-                        currentToken={this.props.currentToken}
-                        open={this.state.isCurrentTokenDialogOpen}
-                        handleClose={this.toggleCurrentTokenModal} />
+                    <MultipleFilesRemoveDialog />
+                    <PartialCopyCollectionDialog />
+                    <ProcessCommandDialog />
+                    <RenameFileDialog />
+                    <Snackbar />
+                    <UpdateCollectionDialog />
+                    <UpdateProcessDialog />
+                    <UpdateProjectDialog />
                 </>;
             }
 
@@ -175,9 +176,6 @@ export const Workbench = withStyles(styles)(
                 this.props.dispatch(detailsPanelActions.TOGGLE_DETAILS_PANEL());
             }
 
-            toggleCurrentTokenModal = () => {
-                this.setState({ isCurrentTokenDialogOpen: !this.state.isCurrentTokenDialogOpen });
-            }
         }
     )
 );