diff -Nur -x '*.orig' -x '*.rej' smolt-0.9.8.1/client/smolt.py mezzanine_patched_smolt-0.9.8.1/client/smolt.py --- smolt-0.9.8.1/client/smolt.py 2007-05-24 12:54:55.000000000 -0600 +++ mezzanine_patched_smolt-0.9.8.1/client/smolt.py 2007-06-06 11:54:01.000000000 -0600 @@ -41,7 +41,7 @@ from urlparse import urljoin from urllib import urlencode -smoonURL = 'http://smolt.fedoraproject.org/' +smoonURL = 'http://smolt.smeserverpro.com/' smoltProtocol = '.91' user_agent = 'smolt/%s' % smoltProtocol timeout = 60.0 @@ -117,7 +117,10 @@ try: self.bus = props['linux.subsystem'].strip() except KeyError: - self.bus = 'Unknown' + try: + self.bus = props['info.bus'].strip() + except KeyError: + self.bus = 'Unknown' try: self.vendorid = props['%s.vendor_id' % self.bus] except KeyError: @@ -141,7 +144,10 @@ try: self.driver = props['info.linux.driver'].strip() except KeyError: - self.driver = 'Unknown' + try: + self.driver = props['net.linux.driver'].strip() + except KeyError: + self.driver = 'Unknown' self.type = classify_hal(props) self.deviceSendString = urlencode({ 'UUID' : self.UUID, @@ -177,7 +183,10 @@ try: self.platform = hostInfo['system.kernel.machine'] except KeyError: - self.platform = 'Unknown' + try: + self.platform = hostInfo['kernel.machine'] + except KeyError: + self.platform = 'Unknown' try: self.systemVendor = hostInfo['system.vendor'] except: @@ -199,10 +208,14 @@ def ignoreDevice(device): ignore = 1 - if device.bus == 'Unknown': + if device.bus == 'Unknown' or device.bus == 'unknown': + return 1 + if device.bus == 'block' or device.bus == 'ide': return 1 if device.bus == 'usb' and device.type == None: return 1 + if device.bus == 'usb' and device.type == 'OTHER': + return 1 if device.bus == 'usb' and device.driver == 'hub': return 1 if device.bus == 'sound' and device.driver == 'Unknown': diff -Nur -x '*.orig' -x '*.rej' smolt-0.9.8.1/smoon/hardware/controllers.py mezzanine_patched_smolt-0.9.8.1/smoon/hardware/controllers.py --- smolt-0.9.8.1/smoon/hardware/controllers.py 2007-05-24 12:54:23.000000000 -0600 +++ mezzanine_patched_smolt-0.9.8.1/smoon/hardware/controllers.py 2007-06-06 11:56:08.000000000 -0600 @@ -244,14 +244,15 @@ def devices(self): devices = {} tabs = Tabber() + pciVendors = deviceMap('pci') devices['total'] = HostLinks.select('1=1').count() devices['count'] = Device.select('1=1').count() devices['totalHosts'] = Host.select('1=1').count() - devices['totalList'] = Host._connection.queryAll('select device.description, count(host_links.device_id) as cnt from host_links, device where host_links.device_id=device.id group by host_links.device_id order by cnt desc limit 100;') - devices['uniqueList'] = Host._connection.queryAll('select device.description, count(distinct(host_links.host_link_id)) as cnt from host_links, device where host_links.device_id=device.id group by host_links.device_id order by cnt desc limit 100') + devices['totalList'] = Host._connection.queryAll('select device.description, count(host_links.device_id) as cnt, device.vendor_id, device.device_id from host_links, device where host_links.device_id=device.id group by host_links.device_id order by cnt desc limit 100;') + devices['uniqueList'] = Host._connection.queryAll('select device.description, count(distinct(host_links.host_link_id)) as cnt, device.vendor_id, device.device_id from host_links, device where host_links.device_id=device.id group by host_links.device_id order by cnt desc limit 100') #devices['classes'] = Host._connection.queryAll('select device.class, count(distinct(host_links.host_link_id)) as cnt from host_links, device where host_links.device_id=device.id group by device.class order by cnt desc;') devices['classes'] = Host._connection.queryAll('select distinct(class) from device') - return dict(Host=Host, Device=Device, HostLinks=HostLinks, devices=devices, tabs=tabs) + return dict(Host=Host, Device=Device, HostLinks=HostLinks, devices=devices, tabs=tabs, pciVendors=pciVendors) @expose(template="hardware.templates.stats") def stats(self): diff -Nur -x '*.orig' -x '*.rej' smolt-0.9.8.1/smoon/hardware/templates/devices.kid mezzanine_patched_smolt-0.9.8.1/smoon/hardware/templates/devices.kid --- smolt-0.9.8.1/smoon/hardware/templates/devices.kid 2007-05-24 12:54:23.000000000 -0600 +++ mezzanine_patched_smolt-0.9.8.1/smoon/hardware/templates/devices.kid 2007-06-06 11:56:08.000000000 -0600 @@ -19,7 +19,7 @@

Raw Devices

- + @@ -29,7 +29,7 @@

Machines / Device

${dev[0]}${pciVendors.device(dev[2], dev[3], alt=dev[0])} ${dev[1]} ${'%.1f' % (float(dev[1]) / devices["total"] * 100) } %
- +
${dev[0]}${pciVendors.device(dev[2], dev[3], alt=dev[0])} ${dev[1]} ${'%.1f' % (float(dev[1]) / devices["totalHosts"] * 100) } %