Merge branch 'master'
authorMichal Klobukowski <michal.klobukowski@contractors.roche.com>
Mon, 10 Sep 2018 07:39:14 +0000 (09:39 +0200)
committerMichal Klobukowski <michal.klobukowski@contractors.roche.com>
Mon, 10 Sep 2018 07:39:14 +0000 (09:39 +0200)
Feature #14149

Arvados-DCO-1.1-Signed-off-by: Michal Klobukowski <michal.klobukowski@contractors.roche.com>

1  2 
src/index.tsx
src/views/workbench/workbench.tsx

diff --cc src/index.tsx
index e982b454ecf5192e22615941e0dcf161df341f05,8ab089a89fcb3ff9ede3026c509c8de09d611dca..a76a86ac7d70213a6dad83a030f3f0e523164ac0
@@@ -35,7 -35,7 +35,8 @@@ import { ServiceRepository } from '~/se
  import { initWebSocket } from '~/websocket/websocket';
  import { Config } from '~/common/config';
  import { addRouteChangeHandlers } from './routes/route-change-handlers';
 +import { setCurrentTokenDialogApiHost } from '~/store/current-token-dialog/current-token-dialog-actions';
+ import { processResourceActionSet } from './views-components/context-menu/action-sets/process-resource-action-set';
  
  const getBuildNumber = () => "BN-" + (process.env.REACT_APP_BUILD_NUMBER || "dev");
  const getGitCommit = () => "GIT-" + (process.env.REACT_APP_GIT_COMMIT || "latest").substr(0, 7);
index a166473e93e99dbfbfb12c7a55238ef07fa7e430,f202b6983359642fd7eadf1c667d880a1855fac6..4d231a0cc1134602d1ebdf56fe053e1c22f64039
@@@ -36,12 -39,11 +37,11 @@@ import { MoveProjectDialog } from '~/vi
  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 { Grid } from '@material-ui/core';
  
 -const APP_BAR_HEIGHT = 100;
 -
 -type CssRules = 'root' | 'appBar' | 'content' | 'contentWrapper';
 +type CssRules = 'root' | 'contentWrapper' | 'content' | 'appBar';
  
  const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
      root: {
@@@ -93,82 -120,99 +93,83 @@@ export const Workbench = withStyles(sty
              };
  
              render() {
 -                const { classes, user } = this.props;
 -                return (
 -                    <div className={classes.root}>
 -                        <div className={classes.appBar}>
 +                return <>
 +                    <Grid
 +                        container
 +                        direction="column"
 +                        className={this.props.classes.root}>
 +                        <Grid className={this.props.classes.appBar}>
                              <MainAppBar
 -                                breadcrumbs={Breadcrumbs}
                                  searchText={this.state.searchText}
                                  user={this.props.user}
 -                                menuItems={this.state.menuItems}
 -                                buildInfo={this.props.buildInfo}
 -                                {...this.mainAppBarActions} />
 -                        </div>
 -                        {user && <SidePanel />}
 -                        <main className={classes.contentWrapper}>
 -                            <div className={classes.content}>
 -                                <Switch>
 -                                    <Route path={Routes.PROJECTS} component={ProjectPanel} />
 -                                    <Route path={Routes.COLLECTIONS} component={CollectionPanel} />
 -                                    <Route path={Routes.FAVORITES} component={FavoritePanel} />
 -                                    <Route path={Routes.PROCESSES} component={ProcessPanel} />
 -                                    <Route path={Routes.TRASH} component={TrashPanel} />
 -                                    <Route path={Routes.PROCESS_LOGS} component={ProcessLogPanel} />
 -                                </Switch>
 -                            </div>
 -                            {user && <DetailsPanel />}
 -                        </main>
 -                        <ContextMenu />
 -                        <Snackbar />
 -                        <CreateProjectDialog />
 -                        <CreateCollectionDialog />
 -                        <RenameFileDialog />
 -                        <PartialCopyCollectionDialog />
 -                        <FileRemoveDialog />
 -                        <CopyCollectionDialog />
 -                        <FileRemoveDialog />
 -                        <MultipleFilesRemoveDialog />
 -                        <UpdateCollectionDialog />
 -                        <FilesUploadCollectionDialog />
 -                        <UpdateProjectDialog />
 -                        <MoveCollectionDialog />
 -                        <MoveProcessDialog />
 -                        <MoveProjectDialog />
 -                        <CurrentTokenDialog
 -                            currentToken={this.props.currentToken}
 -                            open={this.state.isCurrentTokenDialogOpen}
 -                            handleClose={this.toggleCurrentTokenModal} />
 -                    </div>
 -                );
 +                                onSearch={this.onSearch}
 +                                buildInfo={this.props.buildInfo} />
 +                        </Grid>
 +                        {this.props.user &&
 +                            <Grid
 +                                container
 +                                item
 +                                xs
 +                                alignItems="stretch"
 +                                wrap="nowrap">
 +                                <Grid item>
 +                                    <SidePanel />
 +                                </Grid>
 +                                <Grid
 +                                    container
 +                                    item
 +                                    xs
 +                                    component="main"
 +                                    direction="column"
 +                                    className={this.props.classes.contentWrapper}>
 +                                    <Grid item>
 +                                        <MainContentBar />
 +                                    </Grid>
 +                                    <Grid item xs className={this.props.classes.content}>
 +                                        <Switch>
 +                                            <Route path={Routes.PROJECTS} component={ProjectPanel} />
 +                                            <Route path={Routes.COLLECTIONS} component={CollectionPanel} />
 +                                            <Route path={Routes.FAVORITES} component={FavoritePanel} />
 +                                            <Route path={Routes.PROCESSES} component={ProcessPanel} />
 +                                            <Route path={Routes.TRASH} component={TrashPanel} />
 +                                            <Route path={Routes.PROCESS_LOGS} component={ProcessLogPanel} />
 +                                        </Switch>
 +                                    </Grid>
 +                                </Grid>
 +                                <Grid item>
 +                                    <DetailsPanel />
 +                                </Grid>
 +                            </Grid>}
 +                    </Grid>
 +                    <ContextMenu />
 +                    <Snackbar />
 +                    <CreateProjectDialog />
 +                    <CreateCollectionDialog />
 +                    <RenameFileDialog />
 +                    <PartialCopyCollectionDialog />
 +                    <FileRemoveDialog />
 +                    <CopyCollectionDialog />
 +                    <FileRemoveDialog />
 +                    <MultipleFilesRemoveDialog />
 +                    <UpdateCollectionDialog />
 +                    <FilesUploadCollectionDialog />
 +                    <UpdateProjectDialog />
 +                    <MoveCollectionDialog />
++                    <MoveProcessDialog />
 +                    <MoveProjectDialog />
 +                    <CurrentTokenDialog />
 +                </>;
              }
  
 -            mainAppBarActions: MainAppBarActionProps = {
 -                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());
 -                },
 -            };
 +            onSearch = (searchText: string) => {
 +                this.setState({ searchText });
 +                this.props.dispatch(push(`/search?q=${searchText}`));
 +            }
  
 -            toggleCurrentTokenModal = () => {
 -                this.setState({ isCurrentTokenDialogOpen: !this.state.isCurrentTokenDialogOpen });
 +            toggleDetailsPanel = () => {
 +                this.props.dispatch(detailsPanelActions.TOGGLE_DETAILS_PANEL());
              }
 +
          }
      )
  );