1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import * as React from "react";
6 import { compose } from 'redux';
7 import { withStyles, Dialog, DialogTitle, DialogContent, DialogActions, Button, StyleRulesCallback, WithStyles, Typography, Grid } from '@material-ui/core';
8 import { WithDialogProps, withDialog } from "~/store/dialog/with-dialog";
9 import { SSH_KEY_ATTRIBUTES_DIALOG } from '~/store/auth/auth-action';
10 import { ArvadosTheme } from '~/common/custom-theme';
11 import { SshKeyResource } from "~/models/ssh-key";
13 type CssRules = 'root';
15 const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
18 '& div:nth-child(odd)': {
20 color: theme.palette.grey["500"]
25 interface AttributesSshKeyDialogDataProps {
26 sshKey: SshKeyResource;
29 export const AttributesSshKeyDialog = compose(
30 withDialog(SSH_KEY_ATTRIBUTES_DIALOG),
32 ({ open, closeDialog, data, classes }: WithDialogProps<AttributesSshKeyDialogDataProps> & WithStyles<CssRules>) =>
37 <DialogTitle>Attributes</DialogTitle>
39 {data.sshKey && <Grid container direction="row" spacing={16} className={classes.root}>
40 <Grid item xs={5}>Name</Grid>
41 <Grid item xs={7}>{data.sshKey.name}</Grid>
42 <Grid item xs={5}>uuid</Grid>
43 <Grid item xs={7}>{data.sshKey.uuid}</Grid>
44 <Grid item xs={5}>Owner uuid</Grid>
45 <Grid item xs={7}>{data.sshKey.ownerUuid}</Grid>
46 <Grid item xs={5}>Authorized user uuid</Grid>
47 <Grid item xs={7}>{data.sshKey.authorizedUserUuid}</Grid>
48 <Grid item xs={5}>Created at</Grid>
49 <Grid item xs={7}>{data.sshKey.createdAt}</Grid>
50 <Grid item xs={5}>Modified at</Grid>
51 <Grid item xs={7}>{data.sshKey.modifiedAt}</Grid>
52 <Grid item xs={5}>Expires at</Grid>
53 <Grid item xs={7}>{data.sshKey.expiresAt}</Grid>
54 <Grid item xs={5}>Modified by user uuid</Grid>
55 <Grid item xs={7}>{data.sshKey.modifiedByUserUuid}</Grid>
56 <Grid item xs={5}>Modified by client uuid</Grid>
57 <Grid item xs={7}>{data.sshKey.modifiedByClientUuid}</Grid>
64 onClick={closeDialog}>