diff -up smolt-1.4.3/smoon/hardware/controllers/root.py.smoon-sme smolt-1.4.3/smoon/hardware/controllers/root.py --- smolt-1.4.3/smoon/hardware/controllers/root.py.smoon-sme 2010-02-27 12:05:44.000000000 -0700 +++ smolt-1.4.3/smoon/hardware/controllers/root.py 2010-07-21 08:53:13.000000000 -0600 @@ -53,27 +53,27 @@ class Root(controllers.RootController): import math from turboflot import TurboFlot #archs = session.query(Arch).select() - topVendors = session.query(Host).group_by(Host.vendor).filter_by(rating=5).add_column(func.count(Host.rating).label('count')).order_by(desc('count')).limit(7) + topVendors = session.query(Host).group_by(Host.os).add_column(func.count(Host.rating).label('count')).order_by(desc('count')).limit(7) types = [] count = [] i = 1 - vendors = [] + versions = [] counts = [] for vend in topVendors: - vendors.append([i + .5, vend[0].vendor]) + versions.append([i + .5, vend[0].os.split('release')[-1]]) counts.append([i, vend[1]]) i = i + 1 - vendorFlot = TurboFlot([ + versionFlot = TurboFlot([ { 'data' : counts, 'bars' : { 'show' : True }, - 'label' : 'Vendors', + 'label' : 'Version', }], { - 'xaxis' : { 'ticks' : vendors }, + 'xaxis' : { 'ticks' : versions }, } ) - return dict(now=time.ctime(), vendorFlot=vendorFlot) + return dict(now=time.ctime(), versionFlot=versionFlot) @exception_handler(error.error_web,rules="isinstance(tg_exceptions,ValueError)") @expose(template="hardware.templates.token", allow_json=True) diff -up smolt-1.4.3/smoon/hardware/templates/welcome.html.smoon-sme smolt-1.4.3/smoon/hardware/templates/welcome.html --- smolt-1.4.3/smoon/hardware/templates/welcome.html.smoon-sme 2010-02-27 12:05:44.000000000 -0700 +++ smolt-1.4.3/smoon/hardware/templates/welcome.html 2010-07-21 08:53:23.000000000 -0600 @@ -26,7 +26,7 @@

${_("For detailed statistics about the devices in the database see <a href='/static/stats/stats.html'>/stats</a> or <a href='/static/stats/devices.html'>/devices</a>")}

-

${_('Top Vendor Chart')}

- ${ET(vendorFlot.display())} +

${_('OS Version Chart')}

+ ${ET(versionFlot.display())}