Revision 4ab0b55c
Added by Martin Matuška over 10 years ago
app/models/report.rb | ||
---|---|---|
# Find the host
|
||
host = Host.find_by_certname report['host']
|
||
host ||= Host.find_by_name report['host']
|
||
host ||= Host.new :name => report['host']
|
||
host ||= Host.new :name => report['host'] if Setting[:create_new_host_when_report_is_uploaded]
|
||
|
||
return Report.new if host.nil?
|
||
|
||
# Set the report time
|
||
time = Time.parse(report['reported_at']).utc
|
Also available in: Unified diff
fixes #3364 Add option to disable automatc host creation when a report is received