Skip to content

Commit

Permalink
add device information
Browse files Browse the repository at this point in the history
  • Loading branch information
Jia Brown committed Mar 24, 2012
1 parent d04a32e commit 22c64e3
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 5 deletions.
19 changes: 19 additions & 0 deletions app/models/device_information.rb
@@ -0,0 +1,19 @@
DeviceInformation = Object.new

class << DeviceInformation
Group = Struct.new(:name, :fields)

def categories
data.keys
end

def groups(category)
data[category].map { |k,v| Group.new(k, v) }
end

private

def data
@data ||= YAML.load_file(Rails.root + "config/device_properties.yml")
end
end
23 changes: 18 additions & 5 deletions config/device_properties.yml
Expand Up @@ -5,17 +5,30 @@ Computer:
Hardware Information: Hardware Information:
- Memory - Memory
- Hard drive space - Hard drive space
- 32-bit or 64-bit? - Is 32-bit or 64-bit?
- CPU speed - CPU speed
Software Information: Software Information:
- Computer name - Computer name
- Operating system - Operating system
- 32-bit or 64-bit? - 32-bit or 64-bit?
- Supports Yale domain login? - Supports Yale domain login?
- Encryption enabled? - Encryption enabled?

- Network shares

Router: Router:
Basic Information: Product Information:
- Brand - Brand
- Model Number - Model number
- Ethernet Ports Hardware Information:
- Wired or wireless?
- Number of ethernet ports
Software Information:
- Wireless network encryption type

Printer:
Product Information:
- Brand
- Model number
Hardware Information:
- Wired or wireless
- Network enabled?

0 comments on commit 22c64e3

Please sign in to comment.