Author: justi9
Date: 2008-11-06 10:52:38 -0500 (Thu, 06 Nov 2008)
New Revision: 2756
Modified:
mgmt/trunk/cumin/python/cumin/pool.py
mgmt/trunk/cumin/python/cumin/pool.strings
Log:
Fix the pool count
Modified: mgmt/trunk/cumin/python/cumin/pool.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/pool.py 2008-11-06 14:41:39 UTC (rev 2755)
+++ mgmt/trunk/cumin/python/cumin/pool.py 2008-11-06 15:52:38 UTC (rev 2756)
@@ -37,7 +37,8 @@
self.add_column(col)
def render_title(self, session):
- return "Pools %s" % fmt_count(CollectorRegistration.select().count())
+ count = self.get_item_count(session)
+ return "Pools %s" % fmt_count(count)
class NameColumn(SqlTableColumn):
def render_title(self, session, data):
Modified: mgmt/trunk/cumin/python/cumin/pool.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/pool.strings 2008-11-06 14:41:39 UTC (rev 2755)
+++ mgmt/trunk/cumin/python/cumin/pool.strings 2008-11-06 15:52:38 UTC (rev 2756)
@@ -12,7 +12,9 @@
on j.pool = p.pool
[PoolSet.count_sql]
-select count(*) from collector
+select count(*)
+from
+ (select 1 from collector group by pool) as l
[PoolStatus.html]
<div id="{id}" class="CuminStatus {color}">