Sha256: b9fce0650ffff315cabe426855c1a02164552372263af574581ddec08a22f720
Contents?: true
Size: 701 Bytes
Versions: 4
Compression:
Stored size: 701 Bytes
Contents
module ComplianceHostsHelper def host_arf_reports_chart_data(policy_id) passed = [] failed = [] othered = [] date = [] @host.arf_reports.of_policy(policy_id).each do |report| passed << report.passed failed << report.failed othered << report.othered date << report.created_at.to_i * 1000 end data = [ [_("Passed"), passed, ArfReportDashboardHelper::COLORS[:passed]], [_("Failed"), failed, ArfReportDashboardHelper::COLORS[:failed]], [_("Othered"), othered, ArfReportDashboardHelper::COLORS[:othered]], ['dates', date, nil] ] { :data => data, :xAxisDataLabel => 'dates', :config => 'timeseries' }.to_json end end
Version data entries
4 entries across 4 versions & 1 rubygems