From: Lucas Di Pentima Date: Tue, 19 Apr 2022 20:49:06 +0000 (-0300) Subject: 19045: Respects error & warning details newlines on display. X-Git-Tag: 2.4.1~1^2~7^2~2 X-Git-Url: https://git.arvados.org/arvados-workbench2.git/commitdiff_plain/020ebbaeb17659f86d3480b7fc89146f8ce0d02e 19045: Respects error & warning details newlines on display. Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima --- 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'}