Table, TableHead, TableRow, TableCell, TableBody, Tooltip, IconButton
} from '@material-ui/core';
import { ArvadosTheme } from '~/common/custom-theme';
Table, TableHead, TableRow, TableCell, TableBody, Tooltip, IconButton
} from '@material-ui/core';
import { ArvadosTheme } from '~/common/custom-theme';
export interface ApiClientAuthorizationPanelRootActionProps {
openRowOptions: (event: React.MouseEvent<HTMLElement>, keepService: ApiClientAuthorization) => void;
export interface ApiClientAuthorizationPanelRootActionProps {
openRowOptions: (event: React.MouseEvent<HTMLElement>, keepService: ApiClientAuthorization) => void;
& ApiClientAuthorizationPanelRootDataProps & WithStyles<CssRules>;
export const ApiClientAuthorizationPanelRoot = withStyles(styles)(
& ApiClientAuthorizationPanelRootDataProps & WithStyles<CssRules>;
export const ApiClientAuthorizationPanelRoot = withStyles(styles)(
- ({ classes, hasApiClientAuthorizations, apiClientAuthorizations, openRowOptions }: ApiClientAuthorizationPanelRootProps) =>
+ ({ classes, hasApiClientAuthorizations, apiClientAuthorizations, openRowOptions, openHelpDialog }: ApiClientAuthorizationPanelRootProps) =>
- {hasApiClientAuthorizations && <Grid container direction="row">
+ {hasApiClientAuthorizations && <Grid container direction="row" justify="flex-end">
+ <Grid item xs={12} className={classes.helpIconGrid}>
+ <Tooltip title="Api token - help">
+ <IconButton onClick={openHelpDialog}>
+ <HelpIcon />
+ </IconButton>
+ </Tooltip>
+ </Grid>
<TableCell>{apiClientAuthorizatio.apiToken}</TableCell>
<TableCell>{apiClientAuthorizatio.createdByIpAddress || '(none)'}</TableCell>
<TableCell>{apiClientAuthorizatio.defaultOwnerUuid || '(none)'}</TableCell>
<TableCell>{apiClientAuthorizatio.apiToken}</TableCell>
<TableCell>{apiClientAuthorizatio.createdByIpAddress || '(none)'}</TableCell>
<TableCell>{apiClientAuthorizatio.defaultOwnerUuid || '(none)'}</TableCell>
- <TableCell>{apiClientAuthorizatio.expiresAt || '(none)'}</TableCell>
- <TableCell>{apiClientAuthorizatio.lastUsedAt || '(none)'}</TableCell>
+ <TableCell>{formatDate(apiClientAuthorizatio.expiresAt) || '(none)'}</TableCell>
+ <TableCell>{formatDate(apiClientAuthorizatio.lastUsedAt) || '(none)'}</TableCell>
<TableCell>{apiClientAuthorizatio.lastUsedByIpAddress || '(none)'}</TableCell>
<TableCell>{JSON.stringify(apiClientAuthorizatio.scopes)}</TableCell>
<TableCell>{apiClientAuthorizatio.userId}</TableCell>
<TableCell>{apiClientAuthorizatio.lastUsedByIpAddress || '(none)'}</TableCell>
<TableCell>{JSON.stringify(apiClientAuthorizatio.scopes)}</TableCell>
<TableCell>{apiClientAuthorizatio.userId}</TableCell>