Skip to content

Commit

Permalink
Add active checks, notifications etc.. status.
Browse files Browse the repository at this point in the history
  • Loading branch information
Marc Lagrange committed Nov 1, 2010
1 parent 75accf2 commit f5564c2
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 1 deletion.
8 changes: 8 additions & 0 deletions lib/helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,14 @@ def number_to_human(num)
return n
end

def number_to_enabledisable(num)
n = case num
when 0 then "DISABLED"
when 1 then "ENABLED"
end
return n
end

# Just proxying get_services for views
def host_get_services(query)
return get_services(query)
Expand Down
36 changes: 35 additions & 1 deletion views/hosts/extended_infos.haml
Original file line number Diff line number Diff line change
Expand Up @@ -76,5 +76,39 @@
%tr{:class => cycle("extinfo_row0", "extinfo_row1")}
%td Last Update:
%td= Time.at(@host[:last_time_up])


%table{:border => 0, :class => "table_host_extinfos_check_things", :width => "100%"}
%tr
%td
Active Checks:
%td
- active_check = number_to_enabledisable(@host[:active_checks_enabled])
%span{:class => active_check.downcase}= active_check
%td
Passive Checks:
%td
- passive_checks = number_to_enabledisable(@host[:accept_passive_checks])
%span{:class => passive_checks.downcase}= passive_checks
%td
Obsessing:
%td
- obsessing = number_to_enabledisable(@host[:obsess_over_host])
%span{:class => obsessing.downcase}= obsessing
%tr
%td
Notifications:
%td
- notifications = number_to_enabledisable(@host[:notifications_enabled])
%span{:class => notifications.downcase}= notifications
%td
Event Handler:
%td
- event_handler = number_to_enabledisable(@host[:event_handler_enabled])
%span{:class => event_handler.downcase}= event_handler
%td
Flap Detection:
%td
- flap_detection = number_to_enabledisable(@host[:flap_detection_enabled])
%span{:class => flap_detection.downcase}= flap_detection

.clear

0 comments on commit f5564c2

Please sign in to comment.