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

rhmessaging-commits at lists.jboss.org rhmessaging-commits at lists.jboss.org
Thu May 15 10:05:51 EDT 2008


Author: justi9
Date: 2008-05-15 10:05:51 -0400 (Thu, 15 May 2008)
New Revision: 2052

Modified:
   mgmt/cumin/python/cumin/broker.py
   mgmt/cumin/python/cumin/broker.strings
Log:
bz446494 - Change the query and table columns to match the link schema

Modified: mgmt/cumin/python/cumin/broker.py
===================================================================
--- mgmt/cumin/python/cumin/broker.py	2008-05-15 13:22:36 UTC (rev 2051)
+++ mgmt/cumin/python/cumin/broker.py	2008-05-15 14:05:51 UTC (rev 2052)
@@ -127,12 +127,15 @@
         col = self.AddressColumn(app, "addr")
         self.add_column(col)
 
-        col = self.FromPeerColumn(app, "from_peer")
+        col = self.StateColumn(app, "state")
         self.add_column(col)
 
-        col = self.ToPeerColumn(app, "to_peer")
-        self.add_column(col)
+        #col = self.FromPeerColumn(app, "from_peer")
+        #self.add_column(col)
 
+        #col = self.ToPeerColumn(app, "to_peer")
+        #self.add_column(col)
+
     def get_args(self, session):
         reg = self.frame.get_object(session)
         return (reg.getDefaultVhost(),)
@@ -151,6 +154,17 @@
         def render_title(self, session, data):
             return "Address"
 
+        def render_content(self, session, data):
+            return "%s:%i" % (data["host"], data["port"])
+
+        def get_orderby_sql(self, session):
+            dir = self.parent.is_reversed(session) and "desc" or "asc"
+            return "order by host, port %s" % dir
+
+    class StateColumn(SqlTableColumn):
+        def render_title(self, session, data):
+            return "State"
+
     class FromPeerColumn(NullSortColumn, FreshDataOnlyColumn):
         def render_title(self, session, data):
             return "Bytes from Broker"

Modified: mgmt/cumin/python/cumin/broker.strings
===================================================================
--- mgmt/cumin/python/cumin/broker.strings	2008-05-15 13:22:36 UTC (rev 2051)
+++ mgmt/cumin/python/cumin/broker.strings	2008-05-15 14:05:51 UTC (rev 2052)
@@ -42,11 +42,10 @@
 [PeerSet.sql]
 select
   l.id,
-  l.address as addr,
-  c.bytes_from_peer as from_peer,
-  case when p.bytes_from_peer is null then true else false end as from_peer_is_null,
-  c.bytes_to_peer as to_peer,
-  case when p.bytes_to_peer is null then true else false end as to_peer_is_null
+  l.host,
+  l.port,
+  c.state,
+  c.last_error
 from link as l
 join vhost as v on v.id = l.vhost_id
 left outer join link_stats as c on c.id = l.stats_curr_id




More information about the rhmessaging-commits mailing list