[rhmessaging-commits] rhmessaging commits: r4329 - mgmt/newdata/cumin/python/cumin/messaging.

rhmessaging-commits at lists.jboss.org rhmessaging-commits at lists.jboss.org
Wed Sep 22 11:40:40 EDT 2010


Author: eallen
Date: 2010-09-22 11:40:39 -0400 (Wed, 22 Sep 2010)
New Revision: 4329

Modified:
   mgmt/newdata/cumin/python/cumin/messaging/brokerlink.py
Log:
Fixed BZ 636445. The db connection was being closed instead of the cursor.
Also fixed a few UI nits:
 - The Broker Link page listed None as the link name
 - After a link was removed, the yellow action area just listed "Remove" instead of "Remove broker link"
 - The remove an individual broker link popup didn't display the link name (or actually the link host since there is no link name)

Modified: mgmt/newdata/cumin/python/cumin/messaging/brokerlink.py
===================================================================
--- mgmt/newdata/cumin/python/cumin/messaging/brokerlink.py	2010-09-22 14:42:35 UTC (rev 4328)
+++ mgmt/newdata/cumin/python/cumin/messaging/brokerlink.py	2010-09-22 15:40:39 UTC (rev 4329)
@@ -29,9 +29,24 @@
         self.route_add = RouteAdd(app, self)
         self.remove = BrokerLinkRemove(app, self)
 
+    def get_title(self, session):
+        obj = self.object.get(session)
+
+        return "%s '%s'" % (obj._class._title, obj.host)
+
+class BrokerLinkRemoveForm(ObjectFrameTaskForm):
+    def render_content(self, session):
+        obj = self.object.get(session)
+        return obj.host
+
 class BrokerLinkRemove(ObjectFrameTask):
+    def __init__(self, app, frame):
+        super(BrokerLinkRemove, self).__init__(app, frame)
+
+        self.form = BrokerLinkRemoveForm(app, self.name, self)
+
     def get_title(self, session):
-        return "Remove"
+        return "Remove broker link"
 
     def do_exit(self, session):
         self.app.main_page.main.messaging.broker.view.show(session)
@@ -64,7 +79,7 @@
 
 class BrokerLinkSelectionRemove(ObjectSelectorTask):
     def get_title(self, session):
-        return "Remove"
+        return "Remove broker link"
 
     def do_invoke(self, invoc, link):
         self.qmf_call(invoc, link, "close")
@@ -351,7 +366,7 @@
         try:
             obj = cls.get_object(cursor, _id=vhost._brokerRef_id)
         finally:
-            conn.close()
+            cursor.close()
 
         if username == "anonymous":
             mech = "ANONYMOUS"



More information about the rhmessaging-commits mailing list