diff --git a/frontend/packages/operator-lifecycle-manager/src/components/clusterserviceversion.tsx b/frontend/packages/operator-lifecycle-manager/src/components/clusterserviceversion.tsx index d7a5de3124e..2637ad71aee 100644 --- a/frontend/packages/operator-lifecycle-manager/src/components/clusterserviceversion.tsx +++ b/frontend/packages/operator-lifecycle-manager/src/components/clusterserviceversion.tsx @@ -361,7 +361,14 @@ const ConsolePluginStatus: FC = ({ csv, csvPlugins }) }; export const ClusterServiceVersionTableRow = withFallback( - ({ activeNamespace, obj, subscription, catalogSourceMissing, lifecycleEnabled }) => { + ({ + activeNamespace, + obj, + subscription, + catalogSourceMissing, + lifecycleEnabled, + activeColumnIDs, + }) => { const { displayName, provider, version } = obj.spec ?? {}; const { t } = useTranslation('olm'); const olmOperatorNamespace = operatorNamespaceFor(obj) ?? ''; @@ -386,7 +393,7 @@ export const ClusterServiceVersionTableRow = withFallback {/* Name */} - + + + {/* Status */} - +
{catalogSourceMissing ? ( @@ -436,7 +451,11 @@ export const ClusterServiceVersionTableRow = withFallback {/* Provided APIs */} - + {!_.isEmpty(providedAPIs) ? _.take(providedAPIs, 4).map((desc) => (
@@ -458,20 +477,32 @@ export const ClusterServiceVersionTableRow = withFallback + ) : null} {/* Support Phase */} {lifecycleEnabled ? ( - + ) : null} {/* Last Updated */} - + {obj.status == null ? '-' : } @@ -492,6 +523,7 @@ const SubscriptionTableRow: FC = ({ catalogSourceMissing, obj, lifecycleEnabled, + activeColumnIDs, }) => { const { t } = useTranslation('olm'); const csvName = obj?.spec?.name; @@ -501,7 +533,7 @@ const SubscriptionTableRow: FC = ({ return ( <> {/* Name */} - + = ({ {/* Operator Namespace */} {activeNamespace === ALL_NAMESPACES_KEY ? ( - + ) : null} {/* Managed Namespaces */} - + {t('None')} {/* Status */} - + {catalogSourceMissing ? : } {/* Provided APIs */} - + {t('None')} {/* Cluster Compatibility */} {lifecycleEnabled ? ( - - + + - + ) : null} {/* Support Phase */} - {lifecycleEnabled ? - : null} + {lifecycleEnabled ? ( + + - + + ) : null} {/* Last Updated */} - + {obj.status == null ? '-' : } @@ -558,7 +616,11 @@ const SubscriptionTableRow: FC = ({ ); }; -const InstalledOperatorTableRow: FC = ({ obj, customData }) => { +const InstalledOperatorTableRow: FC = ({ + obj, + columns, + customData, +}) => { const { catalogSources, subscriptions, activeNamespace, lifecycleEnabled } = customData; const subscription = isCSV(obj) ? subscriptionForCSV(subscriptions, obj as ClusterServiceVersionKind) @@ -571,6 +633,8 @@ const InstalledOperatorTableRow: FC = ({ obj, cu !catalogSourceForSubscription(catalogSources, subscription) && !isPackageServer(obj); + const activeColumnIDs = useMemo(() => new Set(columns?.map((c) => c.id)), [columns]); + return isCSV(obj) ? ( = ({ obj, cu obj={obj as ClusterServiceVersionKind} subscription={subscription} lifecycleEnabled={lifecycleEnabled} + activeColumnIDs={activeColumnIDs} /> ) : ( = ({ obj, cu catalogSourceMissing={catalogSourceMissing} obj={subscription as SubscriptionKind} lifecycleEnabled={lifecycleEnabled} + activeColumnIDs={activeColumnIDs} /> ); }; @@ -1549,6 +1615,7 @@ export type ClusterServiceVersionTableRowProps = { subscription: SubscriptionKind; activeNamespace?: string; lifecycleEnabled?: boolean; + activeColumnIDs?: Set; }; type SubscriptionTableRowProps = { @@ -1556,6 +1623,7 @@ type SubscriptionTableRowProps = { catalogSourceMissing: boolean; activeNamespace?: string; lifecycleEnabled?: boolean; + activeColumnIDs?: Set; }; type ManagedNamespacesProps = {