19093: Use paper instead of expansionpanel for process retry warning
authorStephen Smith <stephen@curii.com>
Thu, 23 Jun 2022 18:39:16 +0000 (14:39 -0400)
committerStephen Smith <stephen@curii.com>
Thu, 23 Jun 2022 18:39:16 +0000 (14:39 -0400)
Arvados-DCO-1.1-Signed-off-by: Stephen Smith <stephen@curii.com>

src/views-components/process-runtime-status/process-runtime-status.tsx

index 41a0ae057361754486e4b949ad278b06c10e3734..3b5fae3639591a224a6860e24ab57921afa3fbf0 100644 (file)
@@ -7,6 +7,7 @@ import {
     ExpansionPanel,
     ExpansionPanelDetails,
     ExpansionPanelSummary,
+    Paper,
     StyleRulesCallback,
     Typography,
     withStyles,
@@ -27,7 +28,7 @@ type CssRules = 'root'
     | 'errorColor'
     | 'warning'
     | 'warningColor'
-    | 'disabledPanelSummary';
+    | 'paperRoot';
 
 const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
     root: {
@@ -66,10 +67,11 @@ const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
     warningColor: {
         color: theme.customs.colors.yellow900,
     },
-    disabledPanelSummary: {
-        cursor: 'default',
-        pointerEvents: 'none',
-    }
+    paperRoot: {
+        minHeight: theme.spacing.unit * 6,
+        display: 'flex',
+        alignItems: 'center',
+    },
 });
 export interface ProcessRuntimeStatusDataProps {
     runtimeStatus: RuntimeStatus | undefined;
@@ -110,13 +112,13 @@ export const ProcessRuntimeStatus = withStyles(styles)(
         </ExpansionPanel></div>
         }
         { containerCount > 1 &&
-        <div data-cy='process-runtime-status-warning' ><ExpansionPanel className={classes.warning} elevation={0} expanded={false}>
-            <ExpansionPanelSummary className={classNames(classes.summary, classes.detailsText, classes.disabledPanelSummary)}>
-                <Typography className={classNames(classes.heading, classes.warningColor)}>
+        <div data-cy='process-runtime-status-retry-warning' >
+            <Paper className={classNames(classes.warning, classes.paperRoot)} elevation={0}>
+                <Typography className={classNames(classes.heading, classes.summary, classes.warningColor)}>
                     {`Warning: Process retried ${containerCount - 1} time${containerCount > 2 ? 's' : ''} due to failure.`}
                 </Typography>
-            </ExpansionPanelSummary>
-        </ExpansionPanel></div>
+            </Paper>
+        </div>
         }
     </div>
 });