diff --git a/frontend/src/routes/Infrastructure/Clusters/ManagedClusters/components/HiveNotification.tsx b/frontend/src/routes/Infrastructure/Clusters/ManagedClusters/components/HiveNotification.tsx index ccd3d3b507b..2eefd9cb958 100644 --- a/frontend/src/routes/Infrastructure/Clusters/ManagedClusters/components/HiveNotification.tsx +++ b/frontend/src/routes/Infrastructure/Clusters/ManagedClusters/components/HiveNotification.tsx @@ -91,7 +91,7 @@ export function HiveNotification() { } - message={clusterProvisionStatus} + message={formatHiveLogText(clusterProvisionStatus)} /> ) @@ -124,3 +124,13 @@ export function launchToYaml(cluster: Cluster, configMaps: ConfigMap[]) { const openShiftConsoleUrl = openShiftConsoleConfig?.data?.consoleURL window.open(`${openShiftConsoleUrl}/k8s/ns/${namespace}/hive.openshift.io~v1~${kind}/${name}/yaml`) } + +export function formatHiveLogText(message: string | undefined) { + if (typeof message === 'string') { + const messageArray = message.split('\n') + if (messageArray.length > 9) { + message = `${messageArray.slice(0, 9).join('\n')}...` + } + } + return message +} diff --git a/frontend/src/ui-components/AcmAlert/AcmAlert.tsx b/frontend/src/ui-components/AcmAlert/AcmAlert.tsx index 274506906a2..4f228d1d128 100644 --- a/frontend/src/ui-components/AcmAlert/AcmAlert.tsx +++ b/frontend/src/ui-components/AcmAlert/AcmAlert.tsx @@ -135,7 +135,7 @@ export function AcmAlert(props: { style={props.style} className={props.className} > - {alertInfo?.message || props.message || props.subtitle} +
{alertInfo?.message || props.message || props.subtitle}
)