[rhmessaging-commits] rhmessaging commits: r1622 - mgmt/cumin/python/cumin.

rhmessaging-commits at lists.jboss.org rhmessaging-commits at lists.jboss.org
Tue Jan 29 14:40:29 EST 2008


Author: justi9
Date: 2008-01-29 14:40:29 -0500 (Tue, 29 Jan 2008)
New Revision: 1622

Modified:
   mgmt/cumin/python/cumin/brokergroup.py
Log:
Fix filtering in the group broker list.



Modified: mgmt/cumin/python/cumin/brokergroup.py
===================================================================
--- mgmt/cumin/python/cumin/brokergroup.py	2008-01-29 19:07:08 UTC (rev 1621)
+++ mgmt/cumin/python/cumin/brokergroup.py	2008-01-29 19:40:29 UTC (rev 1622)
@@ -93,9 +93,19 @@
         def get_item_count(self, session, group):
             return group.brokers.count()
 
-        def do_get_items(self, session, group):
-            return group.brokers
-        
+        def get_where_sql(self, session):
+            # XXX ugh, get rid of None arg
+            group = self.frame().get_object(session, None)
+            subquery = \
+                "select 1 from broker_group_mapping " + \
+                "where broker_group_id = %i " % group.id + \
+                "and broker_registration_id = b.id"
+
+            return "where exists (%s)" % subquery
+
+        def render_none(self, session, model):
+            return fmt_none()
+
 class BrokerGroupForm(CuminForm):
     def __init__(self, app, name):
         super(BrokerGroupForm, self).__init__(app, name)




More information about the rhmessaging-commits mailing list