Sha256: e6b0e34f65e9582cf13285c1cde05c2d459dc7fd1e8771492a7c489277c084fd
Contents?: true
Size: 824 Bytes
Versions: 15
Compression:
Stored size: 824 Bytes
Contents
module ForemanOpenscap::PolicyDashboard class Data attr_reader :report def initialize(policy, filter = "") @policy = policy @filter = filter @report = {} fetch_data end private attr_writer :report def hosts @hosts ||= Host.authorized(:view_hosts, Host) end def fetch_data report.update( {:compliant_hosts => Host::Managed.comply_with(@policy).count, :incompliant_hosts => Host::Managed.incomply_with(@policy).count, :inconclusive_hosts => Host::Managed.inconclusive_with(@policy).count, :report_missing => Host::Managed.policy_reports_missing(@policy).count, :assigned_hosts => @policy.assets.hosts.count, :unassigned_hosts => hosts.count - @policy.assets.hosts.count }) end end end
Version data entries
15 entries across 15 versions & 1 rubygems