Sha256: 171bf014369c713f4fe60894334a4e4cea360ba8ddb1f80a08f5279a711c156a
Contents?: true
Size: 1.17 KB
Versions: 6
Compression:
Stored size: 1.17 KB
Contents
<h4 class="header"> <%= _("Current Subscription Totals") %> </h4> <% organizations = Organization.current.present? ? [Organization.current] : User.current.allowed_organizations %> <% subscriptions = Katello::Subscription.in_organization(organizations).includes(:pools) %> <% total_active_subscriptions = organizations.map {|org| org.active_pools_count}.reduce(:+) %> <% total_expiring_subscriptions = subscriptions.select(&:expiring_soon?).count %> <% total_recently_expired_subscriptions = subscriptions.select(&:recently_expired?).count %> <table class="table table-fixed table-striped table-bordered"> <thead> <tr> <th>Subscription Status</th> <th>Count</th> </tr> </thead> <tbody> <tr> <td><%= _("Active Subscriptions") %></td> <td style="text-align:right;"><%= total_active_subscriptions %></td> </tr> <tr> <td><%= _("Subscriptions Expiring in 120 Days") %></td> <td style="text-align:right;"><%= total_expiring_subscriptions %></td> </tr> <tr> <td><%= _("Recently Expired Subscriptions") %></td> <td style="text-align:right;"><%= total_recently_expired_subscriptions %></td> </tr> </tbody> </table>
Version data entries
6 entries across 6 versions & 1 rubygems