Revision a07f8856
Added by Joseph Magen over 11 years ago
- ID a07f8856de6a4da358ecca667cbf33947a2ff52c
app/models/dashboard.rb | ||
---|---|---|
end
|
||
|
||
def percentage
|
||
return 0 if report[:good_hosts] == 0 or report[:total_hosts] == 0
|
||
report[:good_hosts] * 100 / report[:total_hosts]
|
||
return 0 if report[:ok_hosts_enabled] == 0 or report[:total_hosts] == 0
|
||
report[:ok_hosts_enabled] * 100 / report[:total_hosts]
|
||
end
|
||
|
||
def reports_missing
|
Also available in: Unified diff
fixes #2051 good host percentange was wrong