X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/3d996002ab1f259b31d07858d9c5d0a780600a00..1703f15adf9e3875ff0c78ce78117a87b70ca05c:/src/views/process-panel/subprocesses-card.tsx

diff --git a/src/views/process-panel/subprocesses-card.tsx b/src/views/process-panel/subprocesses-card.tsx
index ac60c9f6..85de7033 100644
--- a/src/views/process-panel/subprocesses-card.tsx
+++ b/src/views/process-panel/subprocesses-card.tsx
@@ -4,39 +4,60 @@
 
 import * as React from 'react';
 import { ArvadosTheme } from '~/common/custom-theme';
-import { StyleRulesCallback, withStyles, WithStyles, Card, CardHeader, CardContent, Grid, Switch } from '@material-ui/core';
+import { StyleRulesCallback, withStyles, WithStyles, Card, CardHeader, CardContent, Grid, Typography } from '@material-ui/core';
 import { SubprocessFilter } from '~/components/subprocess-filter/subprocess-filter';
 import { SubprocessFilterDataProps } from '~/components/subprocess-filter/subprocess-filter';
 
-type CssRules = 'root';
+type CssRules = 'root' | 'subtitle' | 'title' | 'gridFilter';
 
 const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
     root: {
-        fontSize: '0.875rem'
+        fontSize: '0.875rem',
+        height: '100%'
+    },
+    subtitle: {
+        paddingBottom: '32px!important'
+    },
+    title: {
+        color: theme.customs.colors.grey700
+    },
+    gridFilter: {
+        height: '20px',
+        marginBottom: theme.spacing.unit,
+        paddingTop: '0px!important',
+        paddingBottom: '0px!important',
     }
 });
 
 interface SubprocessesDataProps {
-    subprocesses: number;
+    subprocessesAmount: number;
     filters: SubprocessFilterDataProps[];
-    onToggle: (filter: SubprocessFilterDataProps) => void;
+    onToggle: (status: string) => void;
 }
 
 type SubprocessesProps = SubprocessesDataProps & WithStyles<CssRules>;
 
 export const SubprocessesCard = withStyles(styles)(
-    ({ classes, filters, subprocesses, onToggle }: SubprocessesProps) => 
+    ({ classes, filters, subprocessesAmount, onToggle }: SubprocessesProps) =>
         <Card className={classes.root}>
-            <CardHeader title="Subprocess and filters" />
+            <CardHeader
+                className={classes.title}
+                title={
+                    <Typography noWrap variant="title" color='inherit'>
+                        Subprocess and filters
+                </Typography>} />
             <CardContent>
                 <Grid container direction="column" spacing={16}>
                     <Grid item xs={12} container spacing={16}>
-                        <SubprocessFilter label='Subprocesses' value={subprocesses} />     
-                    </Grid>
-                    <Grid item xs={12} container spacing={16}>
+                        <Grid item md={12} lg={6} className={classes.subtitle}>
+                            <SubprocessFilter label='Subprocesses' value={subprocessesAmount} />
+                        </Grid>
+                        <Grid item md={12} lg={6}/>
                         {
-                            filters.map(filter => 
-                                <SubprocessFilter {...filter} key={filter.key} onToggle={() => onToggle(filter)} />                                                     
+                            filters.map(filter =>
+                                <Grid item md={12} lg={6} key={filter.key} className={classes.gridFilter}>
+                                    <SubprocessFilter {...filter} onToggle={() => onToggle(filter.label)} />
+                                </Grid>
                             )
                         }
                     </Grid>
