Signed-off-by: Tim Speetjens <tim.speetjens@gmail.com>
···
--- app/controllers/dashboard_controller.rb | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)diff --git a/app/controllers/dashboard_controller.rb
b/app/controllers/dashboard_controller.rb
index 7e915b4…8844eb0 100644
— a/app/controllers/dashboard_controller.rb
+++ b/app/controllers/dashboard_controller.rb
@@ -18,12 +18,12 @@ class DashboardController < ApplicationController
:total_hosts => hosts.count,
:bad_hosts => hosts.recent.with_error.count,
:active_hosts => hosts.recent.with_changes.count,
-
:good_hosts => hosts.recent.successful.count,
-
}:ok_hosts => hosts.recent.successful.count, :out_of_sync_hosts => hosts.out_of_sync.count, :disabled_hosts => hosts.alerts_disabled.count
-
@report[:good_hosts] = @report[:ok_hosts] + @report[:active_hosts]
@report[:percentage] = (@report[:good_hosts] == 0 or
@report[:total_hosts] == 0) ? 0 : @report[:good_hosts]*100 /
@report[:total_hosts]
-
@report[:ok_hosts] = @report[:good_hosts] - @report[:active_hosts]
@report[:reports_missing] = @report[:total_hosts] -
@report[:good_hosts] - @report[:bad_hosts] -
@report[:out_of_sync_hosts]
end
–
1.7.2.5