From 43a26f014ec384b05df15a825c167fc1501d1361 Mon Sep 17 00:00:00 2001 From: jgyselov Date: Thu, 9 Oct 2025 11:25:23 +0200 Subject: [PATCH 1/2] Improve alert spacing --- .../clusterConfiguration/DownloadIso.tsx | 2 + .../ClusterDetailStatusMessages.tsx | 60 +++++++++++-------- 2 files changed, 36 insertions(+), 26 deletions(-) diff --git a/libs/ui-lib/lib/common/components/clusterConfiguration/DownloadIso.tsx b/libs/ui-lib/lib/common/components/clusterConfiguration/DownloadIso.tsx index 2ba7e16b0c..a19f28719e 100644 --- a/libs/ui-lib/lib/common/components/clusterConfiguration/DownloadIso.tsx +++ b/libs/ui-lib/lib/common/components/clusterConfiguration/DownloadIso.tsx @@ -103,6 +103,8 @@ const DownloadIso = ({ } /> + + + {!isSingleClusterFeatureEnabled && typeof inactiveDeletionHours === 'number' && canDownloadKubeconfig(cluster.status) && ( + + 0 + ? `Download and save your kubeconfig file in a safe place. This file will be automatically ` + + `deleted from Assisted Installer's service in ${dateDifference} days.` + : `Kubeconfig file was automatically deleted ${inactiveDeletionDays} days after installation.` + } + /> + + )} + {showAddHostsAlert && ( + 0 - ? `Download and save your kubeconfig file in a safe place. This file will be automatically ` + - `deleted from Assisted Installer's service in ${dateDifference} days.` - : `Kubeconfig file was automatically deleted ${inactiveDeletionDays} days after installation.` +

+ {isClusterPlatformTypeVM(cluster) + ? 'Add new hosts by using the platform auto-scale feature or manually generating a new Discovery ISO under the "Add hosts" tab on ' + : 'Add new hosts by generating a new Discovery ISO under your cluster\'s "Add hosts" tab on '} + + console.redhat.com/openshift + + . +

} /> - )} - {showAddHostsAlert && ( - - {isClusterPlatformTypeVM(cluster) - ? 'Add new hosts by using the platform auto-scale feature or manually generating a new Discovery ISO under the "Add hosts" tab on ' - : 'Add new hosts by generating a new Discovery ISO under your cluster\'s "Add hosts" tab on '} - - console.redhat.com/openshift - - . -

- } - /> +
+ )} + {platformLink && ( + + + )} - {platformLink && } - +
); }; From 1070eda1f79499c62a71a86c3bb1581e08fff4d6 Mon Sep 17 00:00:00 2001 From: jgyselov Date: Thu, 9 Oct 2025 14:06:28 +0200 Subject: [PATCH 2/2] Show both error and helper text under textarea fields --- .../components/ui/formik/TextAreaField.tsx | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/libs/ui-lib/lib/common/components/ui/formik/TextAreaField.tsx b/libs/ui-lib/lib/common/components/ui/formik/TextAreaField.tsx index ff1580b84c..31d49b8b83 100644 --- a/libs/ui-lib/lib/common/components/ui/formik/TextAreaField.tsx +++ b/libs/ui-lib/lib/common/components/ui/formik/TextAreaField.tsx @@ -61,13 +61,22 @@ const TextAreaField: React.FC = ({ } - variant={errorMessage ? 'error' : 'default'} - id={errorMessage ? `${fieldId}-helper-error` : `${fieldId}-helper`} + variant={'default'} + id={`${fieldId}-helper`} data-testid={`input-textarea-${fieldId}-helper-text`} > - {errorMessage ? errorMessage : helperText} + {helperText} + {errorMessage && ( + } + variant={'error'} + id={`${fieldId}-helper-error`} + data-testid={`input-textarea-${fieldId}-helper-text`} + > + {errorMessage} + + )} )}