<%= _("Current Subscription Totals") %>

<% organizations = Organization.current.present? ? [Organization.current] : User.current.allowed_organizations %> <% subscriptions = organizations.collect { |org| Katello::Pool.in_org(org.id) }.flatten %> <% total_active_subscriptions = Katello::Pool.active(subscriptions).count %> <% total_expiring_subscriptions = Katello::Pool.expiring_soon(subscriptions).count %> <% total_recently_expired_subscriptions = Katello::Pool.recently_expired(subscriptions).count %>
Subscription Status Count
<%= _("Active Subscriptions") %> <%= total_active_subscriptions %>
<%= _("Subscriptions Expiring in 120 Days") %> <%= total_expiring_subscriptions %>
<%= _("Recently Expired Subscriptions") %> <%= total_recently_expired_subscriptions %>