From 020ebbaeb17659f86d3480b7fc89146f8ce0d02e Mon Sep 17 00:00:00 2001 From: Lucas Di Pentima Date: Tue, 19 Apr 2022 17:49:06 -0300 Subject: [PATCH] 19045: Respects error & warning details newlines on display. Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima --- .../process-runtime-status.tsx | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/src/views-components/process-runtime-status/process-runtime-status.tsx b/src/views-components/process-runtime-status/process-runtime-status.tsx index 26e0459d..3c6b525d 100644 --- a/src/views-components/process-runtime-status/process-runtime-status.tsx +++ b/src/views-components/process-runtime-status/process-runtime-status.tsx @@ -17,7 +17,14 @@ import { RuntimeStatus } from "models/runtime-status"; import { ArvadosTheme } from 'common/custom-theme'; import classNames from 'classnames'; -type CssRules = 'heading' | 'summary' | 'details' | 'error' | 'errorColor' | 'warning' | 'warningColor'; +type CssRules = 'heading' + | 'summary' + | 'details' + | 'detailsText' + | 'error' + | 'errorColor' + | 'warning' + | 'warningColor'; const styles: StyleRulesCallback = (theme: ArvadosTheme) => ({ heading: { @@ -31,6 +38,12 @@ const styles: StyleRulesCallback = (theme: ArvadosTheme) => ({ paddingLeft: theme.spacing.unit * 1, paddingRight: theme.spacing.unit * 1, }, + detailsText: { + fontSize: '0.8rem', + marginTop: '0px', + marginBottom: '0px', + whiteSpace: 'pre-line', + }, errorColor: { color: theme.customs.colors.red900, }, @@ -62,7 +75,7 @@ export const ProcessRuntimeStatus = withStyles(styles)( - + {runtimeStatus?.errorDetail || 'No additional error details available'} @@ -76,7 +89,7 @@ export const ProcessRuntimeStatus = withStyles(styles)( - + {runtimeStatus?.warningDetail || 'No additional warning details available'} -- 2.30.2