From 64923e12fcc6a898b3352dc593d72e626e4f147a Mon Sep 17 00:00:00 2001 From: Salma Kochay Date: Wed, 29 Mar 2023 13:42:25 -0400 Subject: [PATCH] show/hide host metric subscription details --- .../SubscriptionDetail/SubscriptionDetail.js | 92 ++++++++++--------- 1 file changed, 50 insertions(+), 42 deletions(-) diff --git a/awx/ui/src/screens/Setting/Subscription/SubscriptionDetail/SubscriptionDetail.js b/awx/ui/src/screens/Setting/Subscription/SubscriptionDetail/SubscriptionDetail.js index bbb4935c6f..70356a030a 100644 --- a/awx/ui/src/screens/Setting/Subscription/SubscriptionDetail/SubscriptionDetail.js +++ b/awx/ui/src/screens/Setting/Subscription/SubscriptionDetail/SubscriptionDetail.js @@ -24,7 +24,7 @@ const HelperText = styled(PFHelperText)` `; function SubscriptionDetail() { - const { me = {}, license_info, version } = useConfig(); + const { me = {}, license_info, version, systemConfig } = useConfig(); const baseURL = '/settings/subscription'; const tabsArray = [ { @@ -56,35 +56,37 @@ function SubscriptionDetail() { - - - - {t`The number of hosts you have automated against is below your subscription count.`} - - - ) : ( - <> - - - {t`You have automated against more hosts than your subscription allows.`} - - - ) - } - /> + {systemConfig?.SUBSCRIPTION_USAGE_MODEL === 'unique_managed_hosts' && ( + + + + {t`The number of hosts you have automated against is below your subscription count.`} + + + ) : ( + <> + + + {t`You have automated against more hosts than your subscription allows.`} + + + ) + } + /> + )} {typeof automatedInstancesCount !== 'undefined' && automatedInstancesCount !== null && ( - - - + )} + {systemConfig?.SUBSCRIPTION_USAGE_MODEL === 'unique_managed_hosts' && ( + + )} + {systemConfig?.SUBSCRIPTION_USAGE_MODEL === 'unique_managed_hosts' && ( + + /> + )} {license_info.instance_count < 9999999 && (