// Copyright (C) The Arvados Authors. All rights reserved. // // SPDX-License-Identifier: AGPL-3.0 import React from "react"; import { compose } from 'redux'; import { CustomStyleRulesCallback } from 'common/custom-theme'; import { withStyles, Dialog, DialogTitle, DialogContent, DialogActions, Button, WithStyles, Grid } from '@material-ui/core'; import { WithDialogProps, withDialog } from "store/dialog/with-dialog"; import { SSH_KEY_ATTRIBUTES_DIALOG } from 'store/auth/auth-action-ssh'; import { ArvadosTheme } from 'common/custom-theme'; import { SshKeyResource } from "models/ssh-key"; type CssRules = 'root'; const styles: CustomStyleRulesCallback = (theme: ArvadosTheme) => ({ root: { fontSize: '0.875rem', '& div:nth-child(odd)': { textAlign: 'right', color: theme.palette.grey["500"] } } }); interface AttributesSshKeyDialogDataProps { sshKey: SshKeyResource; } export const AttributesSshKeyDialog = compose( withDialog(SSH_KEY_ATTRIBUTES_DIALOG), withStyles(styles))( ({ open, closeDialog, data, classes }: WithDialogProps & WithStyles) => Attributes {data.sshKey && Name {data.sshKey.name} uuid {data.sshKey.uuid} Owner uuid {data.sshKey.ownerUuid} Authorized user uuid {data.sshKey.authorizedUserUuid} Created at {data.sshKey.createdAt} Modified at {data.sshKey.modifiedAt} Expires at {data.sshKey.expiresAt} Modified by user uuid {data.sshKey.modifiedByUserUuid} Modified by client uuid {data.sshKey.modifiedByClientUuid} } );