[rhmessaging-commits] rhmessaging commits: r1484 - in mgmt: notes and 1 other directory.

rhmessaging-commits at lists.jboss.org rhmessaging-commits at lists.jboss.org
Thu Dec 13 16:13:44 EST 2007


Author: justi9
Date: 2007-12-13 16:13:44 -0500 (Thu, 13 Dec 2007)
New Revision: 1484

Modified:
   mgmt/cumin/python/cumin/client.py
   mgmt/cumin/python/cumin/client.strings
   mgmt/notes/justin-todo.txt
Log:
Paginates clients.



Modified: mgmt/cumin/python/cumin/client.py
===================================================================
--- mgmt/cumin/python/cumin/client.py	2007-12-13 21:09:41 UTC (rev 1483)
+++ mgmt/cumin/python/cumin/client.py	2007-12-13 21:13:44 UTC (rev 1484)
@@ -9,22 +9,16 @@
 
 strings = StringCatalog(__file__)
 
-class ClientSet(ItemSet):
+class ClientSet(PaginatedItemSet):
     def __init__(self, app, name):
         super(ClientSet, self).__init__(app, name)
 
         self.unit = UnitSwitch(app, "unit")
         self.add_child(self.unit)
-    
-        self.paginator = Paginator(app, "page")
-        self.add_child(self.paginator)
 
     def get_title(self, session, vhost):
         return "Clients %s" % fmt_count(self.get_item_count(session, vhost))
 
-    def do_process(self, session, vhost):
-        self.paginator.set_count(session, self.get_item_count(session, vhost))
-
     def render_unit_plural(self, session, vhost):
         return self.unit.get(session) == "b" and "Bytes" or "Msgs."
 
@@ -33,7 +27,7 @@
 
     def do_get_items(self, session, vhost):
         if vhost:
-            start, end = self.paginator.get_bounds(session)
+            start, end = self.get_bounds(session)
             return Client.select(Client.q.vhostID == vhost.id,
                                  orderBy="address")[start:end]
 

Modified: mgmt/cumin/python/cumin/client.strings
===================================================================
--- mgmt/cumin/python/cumin/client.strings	2007-12-13 21:09:41 UTC (rev 1483)
+++ mgmt/cumin/python/cumin/client.strings	2007-12-13 21:13:44 UTC (rev 1484)
@@ -1,5 +1,7 @@
 [ClientSet.html]
 <form>
+  <div class="rfloat">{page}</div>
+
   {unit}
 
   <div class="sactions">

Modified: mgmt/notes/justin-todo.txt
===================================================================
--- mgmt/notes/justin-todo.txt	2007-12-13 21:09:41 UTC (rev 1483)
+++ mgmt/notes/justin-todo.txt	2007-12-13 21:13:44 UTC (rev 1484)
@@ -14,8 +14,6 @@
 
  * Add javascript for the check-all behavior
 
- * Paginate clients
-
  * Deal with problem of calling method on broker that is not there
 
  * Only put something in pending actions if the call succeeds




More information about the rhmessaging-commits mailing list