Sha256: e8c4db43b8b3883c5aa7a56d7a0a1fc102cbd5ab054b4338c3bb04c56ff0a2c2

Contents?: true

Size: 480 Bytes

Versions: 16

Compression:

Stored size: 480 Bytes

Contents

module ArfReportDashboardHelper
  COLORS = {
    :passed => '#89A54E',
    :failed => '#AA4643',
    :othered => '#DB843D',
  }.freeze

  def reports_breakdown_chart(report, options = {})
    data = []
    [[:failed, _('Failed')],
     [:passed, _('Passed')],
     [:othered, _('Othered')],].each do |i|
      data << {:label => i[1], :data => report[i[0]], :color => COLORS[i[0]]}
    end
    flot_pie_chart 'overview', _('Compliance reports breakdown'), data, options
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
foreman_openscap-0.7.13 app/helpers/arf_report_dashboard_helper.rb
foreman_openscap-0.7.12 app/helpers/arf_report_dashboard_helper.rb
foreman_openscap-0.7.11 app/helpers/arf_report_dashboard_helper.rb
foreman_openscap-0.7.10 app/helpers/arf_report_dashboard_helper.rb
foreman_openscap-0.8.3 app/helpers/arf_report_dashboard_helper.rb
foreman_openscap-0.7.9 app/helpers/arf_report_dashboard_helper.rb
foreman_openscap-0.7.8 app/helpers/arf_report_dashboard_helper.rb
foreman_openscap-0.7.7 app/helpers/arf_report_dashboard_helper.rb
foreman_openscap-0.8.2 app/helpers/arf_report_dashboard_helper.rb
foreman_openscap-0.7.6 app/helpers/arf_report_dashboard_helper.rb
foreman_openscap-0.8.1 app/helpers/arf_report_dashboard_helper.rb
foreman_openscap-0.7.5 app/helpers/arf_report_dashboard_helper.rb
foreman_openscap-0.8.0 app/helpers/arf_report_dashboard_helper.rb
foreman_openscap-0.7.4 app/helpers/arf_report_dashboard_helper.rb
foreman_openscap-0.7.3 app/helpers/arf_report_dashboard_helper.rb
foreman_openscap-0.7.2 app/helpers/arf_report_dashboard_helper.rb