- <Typography variant='body1' paragraph={true}>
- You have not yet set up an SSH public key for use with Arvados.
- <a href='https://doc.arvados.org/user/getting_started/ssh-access-unix.html' target='blank' className={classes.link}>
- Learn more.
- </a>
- </Typography>
- <Typography variant='body1' paragraph={true}>
- When you have an SSH key you would like to use, add it using button below.
- </Typography>
- <Button
- onClick={onClick}
- color="primary"
- variant="contained">
- Add New Ssh Key
- </Button>
+ <Grid container direction="row">
+ <Grid item xs={8}>
+ { !hasKeys && <Typography paragraph={true} >
+ You have not yet set up an SSH public key for use with Arvados.
+ <a href='https://doc.arvados.org/user/getting_started/ssh-access-unix.html'
+ target='blank' className={classes.link}>
+ Learn more.
+ </a>
+ </Typography>}
+ { !hasKeys && <Typography paragraph={true}>
+ When you have an SSH key you would like to use, add it using button below.
+ </Typography> }
+ </Grid>
+ <Grid item xs={4} className={classes.buttonContainer}>
+ <Button onClick={openSshKeyCreateDialog} color="primary" variant="contained">
+ <AddIcon /> Add New Ssh Key
+ </Button>
+ </Grid>
+ </Grid>
+ <Grid item xs={12}>
+ {hasKeys && <Table className={classes.table}>
+ <TableHead>
+ <TableRow className={classes.tableRow}>
+ <TableCell>Name</TableCell>
+ <TableCell>UUID</TableCell>
+ <TableCell>Authorized user</TableCell>
+ <TableCell>Expires at</TableCell>
+ <TableCell>Key type</TableCell>
+ <TableCell>Public Key</TableCell>
+ <TableCell />
+ </TableRow>
+ </TableHead>
+ <TableBody>
+ {sshKeys.map((sshKey, index) =>
+ <TableRow key={index} className={classes.tableRow}>
+ <TableCell>{sshKey.name}</TableCell>
+ <TableCell>{sshKey.uuid}</TableCell>
+ <TableCell>{sshKey.authorizedUserUuid}</TableCell>
+ <TableCell>{sshKey.expiresAt || '(none)'}</TableCell>
+ <TableCell>{sshKey.keyType}</TableCell>
+ <TableCell>
+ <Tooltip title="Public Key" disableFocusListener>
+ <IconButton onClick={() => openPublicKeyDialog(sshKey.name, sshKey.publicKey)}>
+ <KeyIcon className={classes.keyIcon} />
+ </IconButton>
+ </Tooltip>
+ </TableCell>
+ <TableCell>
+ <Tooltip title="More options" disableFocusListener>
+ <IconButton onClick={event => openRowOptions(event, sshKey)}>
+ <MoreOptionsIcon />
+ </IconButton>
+ </Tooltip>
+ </TableCell>
+ </TableRow>)}
+ </TableBody>
+ </Table>}
+ </Grid>