Sha256: aad143e9d6e663e657a8571c33fb5820fbe158e7efae3a7cdc5caffb777a6c24

Contents?: true

Size: 478 Bytes

Versions: 14

Compression:

Stored size: 478 Bytes

Contents

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

  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

14 entries across 14 versions & 1 rubygems

Version Path
foreman_openscap-0.7.1 app/helpers/arf_report_dashboard_helper.rb
foreman_openscap-0.6.7 app/helpers/arf_report_dashboard_helper.rb
foreman_openscap-0.7.0 app/helpers/arf_report_dashboard_helper.rb
foreman_openscap-0.6.6 app/helpers/arf_report_dashboard_helper.rb
foreman_openscap-0.6.5 app/helpers/arf_report_dashboard_helper.rb
foreman_openscap-0.6.4 app/helpers/arf_report_dashboard_helper.rb
foreman_openscap-0.6.3 app/helpers/arf_report_dashboard_helper.rb
foreman_openscap-0.6.2 app/helpers/arf_report_dashboard_helper.rb
foreman_openscap-0.6.1 app/helpers/arf_report_dashboard_helper.rb
foreman_openscap-0.6.0 app/helpers/arf_report_dashboard_helper.rb
foreman_openscap-0.5.4 app/helpers/arf_report_dashboard_helper.rb
foreman_openscap-0.5.3 app/helpers/arf_report_dashboard_helper.rb
foreman_openscap-0.5.2 app/helpers/arf_report_dashboard_helper.rb
foreman_openscap-0.5.1 app/helpers/arf_report_dashboard_helper.rb