Implement command dialog, update code snippet styles
[arvados-workbench2.git] / src / views / process-panel / process-information-card.tsx
index 01bb3ae79e0713f7014cb988269c04e63117a7c7..fea94b904341958f2b3edb0a07754a823a97a349 100644 (file)
@@ -19,7 +19,7 @@ type CssRules = 'card' | 'iconHeader' | 'label' | 'value' | 'chip' | 'link' | 'c
 
 const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
     card: {
-        marginBottom: theme.spacing.unit * 2
+        height: '100%'
     },
     iconHeader: {
         fontSize: '1.875rem',
@@ -57,7 +57,6 @@ const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
     content: {
         '&:last-child': {
             paddingBottom: theme.spacing.unit * 2,
-            paddingTop: '0px'
         }
     },
     title: {
@@ -90,7 +89,9 @@ export const ProcessInformationCard = withStyles(styles, { withTheme: true })(
                         <IconButton
                             aria-label="More options"
                             onClick={event => onContextMenu(event)}>
-                            <MoreOptionsIcon />
+                            <Tooltip title="More options">
+                                <MoreOptionsIcon />
+                            </Tooltip>
                         </IconButton>
                     </div>
                 }
@@ -102,9 +103,9 @@ export const ProcessInformationCard = withStyles(styles, { withTheme: true })(
                     </Tooltip>
                 }
                 subheader={
-                    <Tooltip title={process.containerRequest.description || '(no-description)'} placement="bottom-start">
+                    <Tooltip title={getDescription(process)} placement="bottom-start">
                         <Typography noWrap variant="body2" color='inherit'>
-                            {process.containerRequest.description || '(no-description)'}
+                            {getDescription(process)}
                         </Typography>
                     </Tooltip>} />
             <CardContent className={classes.content}>
@@ -124,4 +125,7 @@ export const ProcessInformationCard = withStyles(styles, { withTheme: true })(
                 </Grid>
             </CardContent>
         </Card>
-);
\ No newline at end of file
+);
+
+const getDescription = (process: Process) =>
+    process.containerRequest.description || '(no-description)';