[rhmessaging-commits] rhmessaging commits: r3108 - mgmt/trunk/cumin/python/cumin.

rhmessaging-commits at lists.jboss.org rhmessaging-commits at lists.jboss.org
Wed Feb 4 17:16:44 EST 2009


Author: justi9
Date: 2009-02-04 17:16:44 -0500 (Wed, 04 Feb 2009)
New Revision: 3108

Modified:
   mgmt/trunk/cumin/python/cumin/queue.py
Log:
Format null column values, and fix the bindings link

Modified: mgmt/trunk/cumin/python/cumin/queue.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/queue.py	2009-02-04 19:22:38 UTC (rev 3107)
+++ mgmt/trunk/cumin/python/cumin/queue.py	2009-02-04 22:16:44 UTC (rev 3108)
@@ -122,8 +122,11 @@
         def render_title(self, session, data):
             return "Consumers"
 
-        def render_content(self, session, data):
-            return data["consumers"]
+        def render_value(self, session, value):
+            if value is None:
+                return fmt_none_brief()
+            else:
+                return value
 
     class BindingsColumn(SqlTableColumn):
         def render_title(self, session, data):
@@ -131,8 +134,10 @@
 
         def render_content(self, session, data):
             queue = Identifiable(data["id"])
-            href = self.frame.queue.get_href(session, queue)
-            return fmt_link(href, data["bindings"])
+            branch = session.branch()
+            self.frame.queue.object.set(branch, queue)
+            self.frame.queue.view.bindings.show(branch)
+            return fmt_link(branch.marshal(), data["bindings"] or "0")
 
     class EnqueuedColumn(NullSortColumn, FreshDataOnlyColumn):
         def render_title(self, session, data):
@@ -164,6 +169,12 @@
             unit = self.parent.unit.get(session)
             return unit == "b" and "bdepth" or "mdepth"
 
+        def render_value(self, session, value):
+            if value is None:
+                return fmt_none_brief()
+            else:
+                return value
+
 class TopQueueSet(TopTable):
     def __init__(self, app, name):
         super(TopQueueSet, self).__init__(app, name)




More information about the rhmessaging-commits mailing list