module Risu::Templates::HostTemplateHelper
Public Instance Methods
unsupported_os(title, plugin_name)
click to toggle source
# File lib/risu/base/host_template_helper.rb, line 26 def unsupported_os title, plugin_name if item_count_by_plugin_name(plugin_name) <= 0 return end heading2 title headers = ["Host"] data = Array.new findings = Item.where(:plugin_id => Plugin.where(:plugin_name => plugin_name).first.id) findings.each do |finding| host = Host.find_by_id(finding.host_id) host_string = "#{host.name}" host_string << " (#{host.fqdn})" if host.fqdn != nil row = Array.new row.push host_string data << row end @output.table([headers] + data, :header => true, :width => output.bounds.width) do row(0).style(:font_style => :bold, :background_color => 'cccccc') cells.borders = [:top, :bottom, :left, :right] end text "\n" end
unsupported_os_appendix_section()
click to toggle source
# File lib/risu/base/host_template_helper.rb, line 60 def unsupported_os_appendix_section unsupported_os("Unsupported Windows NT Installations", "Microsoft Windows NT 4.0 Unsupported Installation Detection") unsupported_os("Unsupported Windows 2000 Installations", "Microsoft Windows 2000 Unsupported Installation Detection") unsupported_os("Unsupported Windows XP Installations", "Microsoft Windows XP Unsupported Installation Detection") unsupported_os("Unsupported Windows 2003 Installations", "Microsoft Windows Server 2003 Unsupported Installation Detection") unsupported_os("Unsupported Windows 8 Installations", "Microsoft Windows 8 Unsupported Installation Detection") text "\n" end