From 0736f6b8f5ee96d1a5d066d72641f3290749c0e9 Mon Sep 17 00:00:00 2001 From: rawagner Date: Tue, 22 Apr 2025 14:43:35 +0200 Subject: [PATCH] ABI: Do not show kubeconfig deletion info --- .../ClusterDetailStatusMessages.tsx | 37 +++++++++---------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/libs/ui-lib/lib/ocm/components/clusterDetail/ClusterDetailStatusMessages.tsx b/libs/ui-lib/lib/ocm/components/clusterDetail/ClusterDetailStatusMessages.tsx index 751c53b854..fc49a78509 100644 --- a/libs/ui-lib/lib/ocm/components/clusterDetail/ClusterDetailStatusMessages.tsx +++ b/libs/ui-lib/lib/ocm/components/clusterDetail/ClusterDetailStatusMessages.tsx @@ -1,7 +1,6 @@ import React from 'react'; import { Alert } from '@patternfly/react-core'; import { - RenderIf, REDHAT_CONSOLE_OPENSHIFT, canDownloadKubeconfig, isSNO, @@ -16,6 +15,7 @@ import { ExternalPlatformLinks } from '../clusterConfiguration/platformIntegrati import { useNewFeatureSupportLevel } from '../../../common/components/newFeatureSupportLevels'; import { Cluster, PlatformType } from '@openshift-assisted/types/assisted-installer-service'; import PostInstallAlert from '../../../common/components/clusterDetail/PostInstallAlert'; +import { useFeature } from '../../hooks/use-feature'; type ClusterDetailStatusMessagesProps = { cluster: Cluster; @@ -26,6 +26,7 @@ const ClusterDetailStatusMessages = ({ cluster, showAddHostsInfo, }: ClusterDetailStatusMessagesProps) => { + const isSingleClusterFeatureEnabled = useFeature('ASSISTED_INSTALLER_SINGLE_CLUSTER_FEATURE'); const featureSupportLevelContext = useNewFeatureSupportLevel(); const { inactiveDeletionHours } = useDefaultConfiguration(['inactiveDeletionHours']); const inactiveDeletionDays = Math.round((inactiveDeletionHours || 0) / 24); @@ -43,23 +44,21 @@ const ClusterDetailStatusMessages = ({ return ( <> - - 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.` - } - /> - - + {!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 && ( } /> - + )} {platformLink && } );