X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/d19d853e83383a6b75f638be99472aa626a05524..606957c578a59510a4fafac6568477c06de43606:/src/views-components/api-client-authorizations-dialog/attributes-dialog.tsx

diff --git a/src/views-components/api-client-authorizations-dialog/attributes-dialog.tsx b/src/views-components/api-client-authorizations-dialog/attributes-dialog.tsx
index 662c8808b2..de31f525eb 100644
--- a/src/views-components/api-client-authorizations-dialog/attributes-dialog.tsx
+++ b/src/views-components/api-client-authorizations-dialog/attributes-dialog.tsx
@@ -2,16 +2,17 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import * as React from "react";
+import React from "react";
 import { compose } from 'redux';
 import {
     withStyles, Dialog, DialogTitle, DialogContent, DialogActions,
     Button, StyleRulesCallback, WithStyles, Grid
 } from '@material-ui/core';
-import { WithDialogProps, withDialog } from "~/store/dialog/with-dialog";
-import { API_CLIENT_AUTHORIZATION_ATTRIBUTES_DIALOG } from '~/store/api-client-authorizations/api-client-authorizations-actions';
-import { ArvadosTheme } from '~/common/custom-theme';
-import { ApiClientAuthorization } from '~/models/api-client-authorization';
+import { WithDialogProps, withDialog } from "store/dialog/with-dialog";
+import { API_CLIENT_AUTHORIZATION_ATTRIBUTES_DIALOG } from 'store/api-client-authorizations/api-client-authorizations-actions';
+import { ArvadosTheme } from 'common/custom-theme';
+import { ApiClientAuthorization } from 'models/api-client-authorization';
+import { formatDate } from 'common/formatters';
 
 type CssRules = 'root';
 
@@ -41,11 +42,33 @@ export const AttributesApiClientAuthorizationDialog = compose(
                         <Grid item xs={7}>{data.apiClientAuthorization.uuid}</Grid>
                         <Grid item xs={5}>Owner uuid</Grid>
                         <Grid item xs={7}>{data.apiClientAuthorization.ownerUuid}</Grid>
+                        <Grid item xs={5}>API Client ID</Grid>
+                        <Grid item xs={7}>{data.apiClientAuthorization.apiClientId}</Grid>
+                        <Grid item xs={5}>API Token</Grid>
+                        <Grid item xs={7}>{data.apiClientAuthorization.apiToken}</Grid>
+                        <Grid item xs={5}>Created by IP address</Grid>
+                        <Grid item xs={7}>{data.apiClientAuthorization.createdByIpAddress || '(none)'}</Grid>
+                        <Grid item xs={5}>Default owner</Grid>
+                        <Grid item xs={7}>{data.apiClientAuthorization.defaultOwnerUuid || '(none)'}</Grid>
+                        <Grid item xs={5}>Expires at</Grid>
+                        <Grid item xs={7}>{formatDate(data.apiClientAuthorization.expiresAt) || '(none)'}</Grid>
+                        <Grid item xs={5}>Last used at</Grid>
+                        <Grid item xs={7}>{formatDate(data.apiClientAuthorization.lastUsedAt) || '(none)'}</Grid>
+                        <Grid item xs={5}>Last used by IP address</Grid>
+                        <Grid item xs={7}>{data.apiClientAuthorization.lastUsedByIpAddress || '(none)'}</Grid>
+                        <Grid item xs={5}>Scopes</Grid>
+                        <Grid item xs={7}>{JSON.stringify(data.apiClientAuthorization.scopes || '(none)')}</Grid>
+                        <Grid item xs={5}>User ID</Grid>
+                        <Grid item xs={7}>{data.apiClientAuthorization.userId || '(none)'}</Grid>
+                        <Grid item xs={5}>Created at</Grid>
+                        <Grid item xs={7}>{formatDate(data.apiClientAuthorization.createdAt) || '(none)'}</Grid>
+                        <Grid item xs={5}>Updated at</Grid>
+                        <Grid item xs={7}>{formatDate(data.apiClientAuthorization.updatedAt) || '(none)'}</Grid>
                     </Grid>}
                 </DialogContent>
                 <DialogActions>
                     <Button
-                        variant='flat'
+                        variant='text'
                         color='primary'
                         onClick={closeDialog}>
                         Close
