Module: Zenoss::Model::EventView
- Included in:
- Device
- Defined in:
- lib/zenoss/model/event_view.rb
Instance Method Summary collapse
-
#get_status(statusclass = nil) ⇒ Object
Fetches that status number for this device or component.
-
#get_status_css_class(status_number) ⇒ Object
Fetches the css class for this status number.
-
#get_status_img_src(status_number) ⇒ Object
Fetches the img src path for this status number.
Instance Method Details
#get_status(statusclass = nil) ⇒ Object
Fetches that status number for this device or component
27 28 29 30 31 32 33 |
# File 'lib/zenoss/model/event_view.rb', line 27 def get_status(statusclass=nil) method = 'getStatus' method << "?statusclass=#{statusclass}" unless statusclass.nil? # nil.to_i is 0 so we should be OK for nil returns rest(method).to_i end |
#get_status_css_class(status_number) ⇒ Object
Fetches the css class for this status number. This is usually the output from the #get_status method. If this is not working you may need to apply this patch to Zenoss: gist.github.com/328414
47 48 49 |
# File 'lib/zenoss/model/event_view.rb', line 47 def get_status_css_class(status_number) custom_rest("getStatusCssClass?status=#{status_number}") end |
#get_status_img_src(status_number) ⇒ Object
Fetches the img src path for this status number. This is usually the output from the #get_status method. If this is not working you may need to apply this patch to Zenoss: gist.github.com/328414
39 40 41 |
# File 'lib/zenoss/model/event_view.rb', line 39 def get_status_img_src(status_number) custom_rest("getStatusImgSrc?status=#{status_number}") end |