Revision e89d93bc
Added by Brian Gupta about 12 years ago
- ID e89d93bc4792331ce8dca2c6f50715ada057d0ae
app/controllers/dashboard_controller.rb | ||
---|---|---|
:total_hosts => @hosts.count,
|
||
:bad_hosts => @hosts.recent.with_error.count,
|
||
:active_hosts => @hosts.recent.with_changes.count,
|
||
:active_hosts_ok => @hosts.recent.with_changes.without_error.count,
|
||
:ok_hosts => @hosts.recent.successful.count,
|
||
:out_of_sync_hosts => @hosts.out_of_sync.count,
|
||
:disabled_hosts => @hosts.alerts_disabled.count,
|
||
:pending_hosts => @hosts.recent.with_pending_changes.count,
|
||
}
|
||
@report[:good_hosts] = @report[:ok_hosts] + @report[:active_hosts]
|
||
@report[:good_hosts] = @report[:ok_hosts] + @report[:active_hosts_ok]
|
||
@report[:percentage] = (@report[:good_hosts] == 0 or @report[:total_hosts] == 0) ? 0 : @report[:good_hosts]*100 / @report[:total_hosts]
|
||
@report[:reports_missing] = @report[:total_hosts] - @report[:good_hosts] - @report[:bad_hosts] - @report[:out_of_sync_hosts] - @report[:pending_hosts]
|
||
end
|
Also available in: Unified diff
Fixed reported stats on dashboard for good_hosts and reports_missing in text table