1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import React from "react";
6 import { compose } from 'redux';
8 withStyles, Dialog, DialogTitle, DialogContent, DialogActions,
9 Button, StyleRulesCallback, WithStyles, Grid
10 } from '@material-ui/core';
11 import { WithDialogProps, withDialog } from "store/dialog/with-dialog";
12 import { KEEP_SERVICE_ATTRIBUTES_DIALOG } from 'store/keep-services/keep-services-actions';
13 import { ArvadosTheme } from 'common/custom-theme';
14 import { KeepServiceResource } from 'models/keep-services';
16 type CssRules = 'root';
18 const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
21 '& div:nth-child(odd)': {
23 color: theme.palette.grey["500"]
28 interface AttributesKeepServiceDialogDataProps {
29 keepService: KeepServiceResource;
32 export const AttributesKeepServiceDialog = compose(
33 withDialog(KEEP_SERVICE_ATTRIBUTES_DIALOG),
35 ({ open, closeDialog, data, classes }: WithDialogProps<AttributesKeepServiceDialogDataProps> & WithStyles<CssRules>) =>
36 <Dialog open={open} onClose={closeDialog} fullWidth maxWidth='sm'>
37 <DialogTitle>Attributes</DialogTitle>
39 {data.keepService && <Grid container direction="row" spacing={16} className={classes.root}>
40 <Grid item xs={5}>UUID</Grid>
41 <Grid item xs={7}>{data.keepService.uuid}</Grid>
42 <Grid item xs={5}>Read only</Grid>
43 <Grid item xs={7}>{JSON.stringify(data.keepService.readOnly)}</Grid>
44 <Grid item xs={5}>Service host</Grid>
45 <Grid item xs={7}>{data.keepService.serviceHost}</Grid>
46 <Grid item xs={5}>Service port</Grid>
47 <Grid item xs={7}>{data.keepService.servicePort}</Grid>
48 <Grid item xs={5}>Service SSL flag</Grid>
49 <Grid item xs={7}>{JSON.stringify(data.keepService.serviceSslFlag)}</Grid>
50 <Grid item xs={5}>Service type</Grid>
51 <Grid item xs={7}>{data.keepService.serviceType}</Grid>
52 <Grid item xs={5}>Owner uuid</Grid>
53 <Grid item xs={7}>{data.keepService.ownerUuid}</Grid>
54 <Grid item xs={5}>Created at</Grid>
55 <Grid item xs={7}>{data.keepService.createdAt}</Grid>
56 <Grid item xs={5}>Modified at</Grid>
57 <Grid item xs={7}>{data.keepService.modifiedAt}</Grid>
58 <Grid item xs={5}>Modified by user uuid</Grid>
59 <Grid item xs={7}>{data.keepService.modifiedByUserUuid}</Grid>
60 <Grid item xs={5}>Modified by client uuid</Grid>
61 <Grid item xs={7}>{data.keepService.modifiedByClientUuid}</Grid>
68 onClick={closeDialog}>