Closed mlpotgieter closed 12 years ago
I just realized there is another challenge with combining scan results into a single database, when drawing a report, one can not select a specific report to use as a dataset.
The Report model has the following function on it, which will find the first host and use its start time as when the scan started.
def scan_date
Host.where("start is not null").first[:start]
end
HOST_START and HOST_END are per host scan times, which can be accessed via Host.first.start
or Host.first.end
, where .first is any host in the scan. First just pulls the first host it finds for the example.
Do you need more than this field?
Ah that clears things up. Don't need more than that. Thanks
Going ahead and closing this one.
I would like to start combining scan results into a single database to make trend analysis easier, it would be useful to have a date field in the "reports" table. Having a look at a results xml file there is a HOST_START and HOST_END field which seems to be related to when the scan was run, I thought it was a start and end time of the scan but it seems to be a bit short for the entire scan to run (2 minutes for just under 200 hosts). Anyway maybe this can be a feature request, not critical as we can easily put the date in manually for now.