Changeset 184
- Timestamp:
- 07/30/08 15:50:56 (4 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
nethorus/app/controllers/device_admin_controller.rb
r168 r184 58 58 if @device.valid? && params[:device] 59 59 60 # Save the record and redirect to the index60 # Save the record and redirect to the calling page 61 61 62 62 logger.info "New device valid - saving" … … 181 181 end 182 182 183 184 # Check if a device is online and manageable 185 186 def is_online? 187 188 device = Device.find(params[:device_id]) 189 190 begin 191 uptime = device.get_oid('sysUpTime.0') 192 rescue 193 online_status = :false 194 end 195 196 if uptime 197 online_status = :true 198 end 199 200 end 201 183 202 end
