[arvados-workbench2] created: 2.4.0-327-g50bcc12f
git repository hosting
git at public.arvados.org
Fri Oct 28 15:12:54 UTC 2022
at 50bcc12f12d1aac5c2eb06504f70f63930e8be02 (commit)
commit 50bcc12f12d1aac5c2eb06504f70f63930e8be02
Author: Peter Amstutz <peter.amstutz at curii.com>
Date: Fri Oct 28 11:11:50 2022 -0400
19627: Remove the "Add user" button, put a note in its place
Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz at curii.com>
diff --git a/src/components/data-explorer/data-explorer.tsx b/src/components/data-explorer/data-explorer.tsx
index 02532011..adccb0df 100644
--- a/src/components/data-explorer/data-explorer.tsx
+++ b/src/components/data-explorer/data-explorer.tsx
@@ -182,62 +182,62 @@ export const DataExplorer = withStyles(styles)(
columns={columns}
onColumnToggle={onColumnToggle} />}
</Grid>
- { doUnMaximizePanel && panelMaximized &&
- <Tooltip title={`Unmaximize ${panelName || 'panel'}`} disableFocusListener>
- <IconButton onClick={doUnMaximizePanel}><UnMaximizeIcon /></IconButton>
- </Tooltip> }
- { doMaximizePanel && !panelMaximized &&
+ {doUnMaximizePanel && panelMaximized &&
+ <Tooltip title={`Unmaximize ${panelName || 'panel'}`} disableFocusListener>
+ <IconButton onClick={doUnMaximizePanel}><UnMaximizeIcon /></IconButton>
+ </Tooltip>}
+ {doMaximizePanel && !panelMaximized &&
<Tooltip title={`Maximize ${panelName || 'panel'}`} disableFocusListener>
<IconButton onClick={doMaximizePanel}><MaximizeIcon /></IconButton>
- </Tooltip> }
- { doHidePanel &&
+ </Tooltip>}
+ {doHidePanel &&
<Tooltip title={`Close ${panelName || 'panel'}`} disableFocusListener>
<IconButton disabled={panelMaximized} onClick={doHidePanel}><CloseIcon /></IconButton>
- </Tooltip> }
+ </Tooltip>}
</Toolbar>
</Grid>
}
</div>
- <Grid item xs="auto" className={classes.dataTable}><DataTable
- columns={this.props.contextMenuColumn ? [...columns, this.contextMenuColumn] : columns}
- items={items}
- onRowClick={(_, item: T) => onRowClick(item)}
- onContextMenu={onContextMenu}
- onRowDoubleClick={(_, item: T) => onRowDoubleClick(item)}
- onFiltersChange={onFiltersChange}
- onSortToggle={onSortToggle}
- extractKey={extractKey}
- working={this.state.showLoading}
- defaultViewIcon={defaultViewIcon}
- defaultViewMessages={defaultViewMessages}
- currentItemUuid={currentItemUuid}
- currentRoute={paperKey} /></Grid>
- <Grid item xs><Toolbar className={classes.footer}>
- {
- elementPath &&
- <Grid container>
- <span data-cy="element-path">
- {elementPath}
- </span>
+ <Grid item xs="auto" className={classes.dataTable}><DataTable
+ columns={this.props.contextMenuColumn ? [...columns, this.contextMenuColumn] : columns}
+ items={items}
+ onRowClick={(_, item: T) => onRowClick(item)}
+ onContextMenu={onContextMenu}
+ onRowDoubleClick={(_, item: T) => onRowDoubleClick(item)}
+ onFiltersChange={onFiltersChange}
+ onSortToggle={onSortToggle}
+ extractKey={extractKey}
+ working={this.state.showLoading}
+ defaultViewIcon={defaultViewIcon}
+ defaultViewMessages={defaultViewMessages}
+ currentItemUuid={currentItemUuid}
+ currentRoute={paperKey} /></Grid>
+ <Grid item xs><Toolbar className={classes.footer}>
+ {
+ elementPath &&
+ <Grid container>
+ <span data-cy="element-path">
+ {elementPath}
+ </span>
+ </Grid>
+ }
+ <Grid container={!elementPath} justify="flex-end">
+ {fetchMode === DataTableFetchMode.PAGINATED ? <TablePagination
+ count={itemsAvailable}
+ rowsPerPage={rowsPerPage}
+ rowsPerPageOptions={rowsPerPageOptions}
+ page={this.props.page}
+ onChangePage={this.changePage}
+ onChangeRowsPerPage={this.changeRowsPerPage}
+ // Disable next button on empty lists since that's not default behavior
+ nextIconButtonProps={(itemsAvailable > 0) ? {} : { disabled: true }}
+ component="div" /> : <Button
+ variant="text"
+ size="medium"
+ onClick={this.loadMore}
+ >Load more</Button>}
</Grid>
- }
- <Grid container={!elementPath} justify="flex-end">
- {fetchMode === DataTableFetchMode.PAGINATED ? <TablePagination
- count={itemsAvailable}
- rowsPerPage={rowsPerPage}
- rowsPerPageOptions={rowsPerPageOptions}
- page={this.props.page}
- onChangePage={this.changePage}
- onChangeRowsPerPage={this.changeRowsPerPage}
- // Disable next button on empty lists since that's not default behavior
- nextIconButtonProps={(itemsAvailable > 0) ? {} : {disabled: true}}
- component="div" /> : <Button
- variant="text"
- size="medium"
- onClick={this.loadMore}
- >Load more</Button>}
- </Grid>
- </Toolbar></Grid>
+ </Toolbar></Grid>
</Grid>
</Paper>;
}
diff --git a/src/views/user-panel/user-panel.tsx b/src/views/user-panel/user-panel.tsx
index f2491dc2..2bb61772 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 React from 'react';
-import { WithStyles, withStyles, Paper, Button, Grid } from '@material-ui/core';
+import { WithStyles, withStyles, Paper, Typography } 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';
@@ -132,18 +132,20 @@ export const UserPanel = compose(
return <Paper className={this.props.classes.root}>
<DataExplorer
id={USERS_PANEL_ID}
+ title={
+ <>
+ <Typography>
+ User records are created automatically on first log in.
+ </Typography>
+ <Typography>
+ To add a new user, add them to your configured log in provider.
+ </Typography>
+ </>}
onRowClick={noop}
onRowDoubleClick={noop}
onContextMenu={this.handleContextMenu}
contextMenuColumn={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,
}}
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list