X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/e0effe9fd43b8d7c0d7fcb9aade9b718cf5dddda..215016dc53873f311b5eb3e7e86f2d967ec447fe:/src/views/user-panel/user-panel.tsx?ds=sidebyside

diff --git a/src/views/user-panel/user-panel.tsx b/src/views/user-panel/user-panel.tsx
index f28cca3b..6c2fdafe 100644
--- a/src/views/user-panel/user-panel.tsx
+++ b/src/views/user-panel/user-panel.tsx
@@ -3,7 +3,7 @@
 // SPDX-License-Identifier: AGPL-3.0
 
 import * as React from 'react';
-import { WithStyles, withStyles, Typography, Tabs, Tab, Paper, Button } from '@material-ui/core';
+import { WithStyles, withStyles, Typography, Tabs, Tab, Paper, Button, Grid } from '@material-ui/core';
 import { DataExplorer } from "~/views-components/data-explorer/data-explorer";
 import { connect, DispatchProp } from 'react-redux';
 import { DataColumns } from '~/components/data-table/data-table';
@@ -28,6 +28,7 @@ import { compose, Dispatch } from 'redux';
 import { UserResource } from '~/models/user';
 import { ShareMeIcon, AddIcon } from '~/components/icon/icon';
 import { USERS_PANEL_ID, openUserCreateDialog } from '~/store/users/users-actions';
+import { noop } from 'lodash';
 
 type UserPanelRules = "button";
 
@@ -100,14 +101,6 @@ export const userPanelColumns: DataColumns<string> = [
         filters: createTree(),
         render: uuid => <ResourceIsAdmin uuid={uuid} />
     },
-    {
-        name: UserPanelColumnNames.REDIRECT_TO_USER,
-        selected: true,
-        configurable: false,
-        sortDirection: SortDirection.NONE,
-        filters: createTree(),
-        render: () => <Typography noWrap>(none)</Typography>
-    },
     {
         name: UserPanelColumnNames.USERNAME,
         selected: true,
@@ -163,18 +156,23 @@ export const UserPanel = compose(
                     </Tabs>
                     {value === 0 &&
                         <span>
-                            <div className={this.props.classes.button}>
-                                <Button variant="contained" color="primary" onClick={this.props.openUserCreateDialog}>
-                                    <AddIcon /> NEW USER
-                                </Button>
-                            </div>
                             <DataExplorer
                                 id={USERS_PANEL_ID}
-                                onRowClick={this.handleRowClick}
-                                onRowDoubleClick={this.handleRowDoubleClick}
+                                onRowClick={noop}
+                                onRowDoubleClick={noop}
                                 onContextMenu={this.handleContextMenu}
                                 contextMenuColumn={true}
-                                isUserPanel={true}
+                                hideColumnSelector
+                                actions={
+                                    <Grid container justify='flex-end'>
+                                        <Button variant="contained" color="primary" onClick={this.props.openUserCreateDialog}>
+                                            <AddIcon /> NEW USER
+                                        </Button>
+                                    </Grid>
+                                }
+                                paperProps={{
+                                    elevation: 0,
+                                }}
                                 dataTableDefaultView={
                                     <DataTableDefaultView
                                         icon={ShareMeIcon}
@@ -200,13 +198,5 @@ export const UserPanel = compose(
                     });
                 }
             }
-
-            handleRowDoubleClick = (uuid: string) => {
-                this.props.handleRowDoubleClick(uuid);
-            }
-
-            handleRowClick = () => {
-                return;
-            }
         }
     );
