Sha256: 7a43dfdbd4a34e0f093752df714de5b58935de7db70958cf8a1854080427b8f3

Contents?: true

Size: 482 Bytes

Versions: 29

Compression:

Stored size: 482 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

29 entries across 29 versions & 1 rubygems

Version Path
foreman_openscap-1.0.6 app/helpers/arf_report_dashboard_helper.rb
foreman_openscap-1.0.5 app/helpers/arf_report_dashboard_helper.rb
foreman_openscap-1.0.4 app/helpers/arf_report_dashboard_helper.rb
foreman_openscap-1.0.3 app/helpers/arf_report_dashboard_helper.rb
foreman_openscap-1.0.2 app/helpers/arf_report_dashboard_helper.rb
foreman_openscap-1.0.1 app/helpers/arf_report_dashboard_helper.rb
foreman_openscap-1.0.0 app/helpers/arf_report_dashboard_helper.rb
foreman_openscap-0.12.3 app/helpers/arf_report_dashboard_helper.rb
foreman_openscap-0.11.5 app/helpers/arf_report_dashboard_helper.rb
foreman_openscap-0.12.2 app/helpers/arf_report_dashboard_helper.rb
foreman_openscap-0.12.1 app/helpers/arf_report_dashboard_helper.rb
foreman_openscap-0.12.0 app/helpers/arf_report_dashboard_helper.rb
foreman_openscap-0.11.4 app/helpers/arf_report_dashboard_helper.rb
foreman_openscap-0.11.3 app/helpers/arf_report_dashboard_helper.rb
foreman_openscap-0.11.2 app/helpers/arf_report_dashboard_helper.rb
foreman_openscap-0.11.1 app/helpers/arf_report_dashboard_helper.rb
foreman_openscap-0.11.0 app/helpers/arf_report_dashboard_helper.rb
foreman_openscap-0.10.4 app/helpers/arf_report_dashboard_helper.rb
foreman_openscap-0.10.3 app/helpers/arf_report_dashboard_helper.rb
foreman_openscap-0.10.2 app/helpers/arf_report_dashboard_helper.rb