Skip to content

Commit

Permalink
Remove extra data for AoC
Browse files Browse the repository at this point in the history
Related to https://issues.redhat.com/browse/AA-1762

Removes Host automated, Host imported and Host available for AoC subscriptions
  • Loading branch information
ZitaNemeckova committed Jul 19, 2023
1 parent 8e2a5ed commit cd36920
Showing 1 changed file with 26 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ function SubscriptionDetail() {
/>
)}
{typeof automatedInstancesCount !== 'undefined' &&
automatedInstancesCount !== null && (
automatedInstancesCount !== null &&
systemConfig?.SUBSCRIPTION_USAGE_MODEL !== '' && (
<Detail
dataCy="subscription-hosts-automated"
label={t`Hosts automated`}
Expand All @@ -105,11 +106,13 @@ function SubscriptionDetail() {
}
/>
)}
<Detail
dataCy="subscription-hosts-imported"
label={t`Hosts imported`}
value={license_info.current_instances}
/>
{systemConfig?.SUBSCRIPTION_USAGE_MODEL !== '' && (
<Detail
dataCy="subscription-hosts-imported"
label={t`Hosts imported`}
value={license_info.current_instances}
/>
)}
{systemConfig?.SUBSCRIPTION_USAGE_MODEL ===
'unique_managed_hosts' && (
<Detail
Expand All @@ -134,20 +137,23 @@ function SubscriptionDetail() {
value={license_info.reactivated_instances}
/>
)}
{license_info.instance_count < 9999999 && (
<Detail
dataCy="subscription-hosts-available"
label={t`Hosts available`}
value={license_info.available_instances}
/>
)}
{license_info.instance_count >= 9999999 && (
<Detail
dataCy="subscription-unlimited-hosts-available"
label={t`Hosts available`}
value={t`Unlimited`}
/>
)}

{systemConfig?.SUBSCRIPTION_USAGE_MODEL !== '' &&
license_info.instance_count < 9999999 && (
<Detail
dataCy="subscription-hosts-available"
label={t`Hosts available`}
value={license_info.available_instances}
/>
)}
{systemConfig?.SUBSCRIPTION_USAGE_MODEL !== '' &&
license_info.instance_count >= 9999999 && (
<Detail
dataCy="subscription-unlimited-hosts-available"
label={t`Hosts available`}
value={t`Unlimited`}
/>
)}
<Detail
dataCy="subscription-type"
label={t`Subscription type`}
Expand Down

0 comments on commit cd36920

Please sign in to comment.