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

rhmessaging-commits at lists.jboss.org rhmessaging-commits at lists.jboss.org
Tue Jul 27 17:00:08 EDT 2010


Author: eallen
Date: 2010-07-27 17:00:08 -0400 (Tue, 27 Jul 2010)
New Revision: 4155

Modified:
   mgmt/newdata/cumin/python/cumin/messaging/broker.py
   mgmt/newdata/cumin/python/cumin/messaging/broker.strings
Log:
Untested enabling of cluster and acl modules

Modified: mgmt/newdata/cumin/python/cumin/messaging/broker.py
===================================================================
--- mgmt/newdata/cumin/python/cumin/messaging/broker.py	2010-07-27 20:31:59 UTC (rev 4154)
+++ mgmt/newdata/cumin/python/cumin/messaging/broker.py	2010-07-27 21:00:08 UTC (rev 4155)
@@ -128,13 +128,14 @@
         self.view.add_tab(ExchangeSelector(app, "exchanges", self.object))
         self.view.add_tab(ConnectionSelector(app, "connections", self.object))
         self.view.add_tab(BrokerLinkSelector(app, "brokerlinks", self.object))
+        self.view.add_tab(BrokerAccessControl(app, "accessControl", self.object))
+        self.view.add_tab(BrokerClustering(app, "clustering", self.object))
 
         self.queue_add = QueueAdd(app, self)
         self.exchange_add = ExchangeAdd(app, self)
         self.brokerlink_add = BrokerLinkAdd(app, self)
         self.move_messages = MoveMessages(app, self)
         self.engroup = BrokerEngroup(app, self)
-        #self.add_selection_task(app.messaging.BrokerEngroup)
 
     def do_process(self, session):
         super(BrokerFrame, self).do_process(session)
@@ -164,41 +165,24 @@
         mode = ModuleNotEnabled(app, "notenabled")
         self.add_mode(mode)
 
-        self.__view = BrokerAccessControlView(app, "view", self.acl)
-        self.add_mode(self.__view)
+        self.view = ObjectView(app, "view", self.acl)
+        self.add_mode(self.view)
 
     class AclModuleAttribute(Attribute):
         def get_default(self, session):
-            broker = self.widget.vhost.get(session).broker
+            vhost = self.widget.vhost.get(session)
 
-            for acl in Acl.selectBy(broker=broker):
-                return acl
+            cls = self.widget.app.model.org_apache_qpid_acl.Acl
+            acl = cls.get_object(session.cursor, _brokerRef_id=vhost._brokerRef_id)
+            return acl
 
     def do_process(self, session):
         if self.acl.get(session):
-            self.__view.show(session)
+            self.view.show(session)
 
     def render_title(self, session):
         return "Access Control"
 
-class AccessControlGeneralStatSet(StatSet):
-    def __init__(self, app, name, object):
-        super(AccessControlGeneralStatSet, self).__init__(app, name, object)
-
-        self.attrs = ("aclDenyCount",)
-
-class BrokerAccessControlView(Widget):
-    def __init__(self, app, name, acl):
-        super(BrokerAccessControlView, self).__init__(app, name)
-
-        self.acl = acl
-
-        self.props = CuminProperties(app, "props", self.acl)
-        self.add_child(self.props)
-
-        self.stats = AccessControlGeneralStatSet(app, "stats", self.acl)
-        self.add_child(self.stats)
-
 class BrokerClustering(ModeSet):
     def __init__(self, app, name, vhost):
         super(BrokerClustering, self).__init__(app, name)
@@ -211,15 +195,16 @@
         self.notenabled = ModuleNotEnabled(app, "notenabled")
         self.add_mode(self.notenabled)
 
-        self.view = BrokerClusteringView(app, "view", self.cluster)
+        self.view = ObjectView(app, "view", self.cluster)
         self.add_mode(self.view)
 
     class ClusteringModuleAttribute(Attribute):
         def get_default(self, session):
-            broker = self.widget.vhost.get(session).broker
+            vhost = self.widget.vhost.get(session)
 
-            for cluster in Cluster.selectBy(broker=broker):
-                return cluster
+            cls = self.widget.app.model.org_apache_qpid_cluster.Cluster
+            cluster = cls.get_object(session.cursor, _brokerRef_id=vhost._brokerRef_id)
+            return cluster
 
     def do_process(self, session):
         if self.cluster.get(session):
@@ -228,22 +213,6 @@
     def render_title(self, session):
         return "Clustering"
 
-class ClusterGeneralStatSet(StatSet):
-    def __init__(self, app, name, object):
-        super(ClusterGeneralStatSet, self).__init__(app, name, object)
-
-        self.attrs = ()
-
-class BrokerClusteringView(Widget):
-    def __init__(self, app, name, cluster):
-        super(BrokerClusteringView, self).__init__(app, name)
-
-        props = CuminProperties(app, "props", cluster)
-        self.add_child(props)
-
-        stats = ClusterGeneralStatSet(app, "stats", cluster)
-        self.add_child(stats)
-
 class BrokerBrowser(Widget):
     def __init__(self, app, name):
         super(BrokerBrowser, self).__init__(app, name)

Modified: mgmt/newdata/cumin/python/cumin/messaging/broker.strings
===================================================================
--- mgmt/newdata/cumin/python/cumin/messaging/broker.strings	2010-07-27 20:31:59 UTC (rev 4154)
+++ mgmt/newdata/cumin/python/cumin/messaging/broker.strings	2010-07-27 21:00:08 UTC (rev 4155)
@@ -106,40 +106,6 @@
   font-style: italic;
 }
 
-[BrokerAccessControlView.html]
-<table class="twocol">
-  <tbody>
-    <tr>
-      <td>
-        <h2>Properties</h2>
-        {props}
-
-        <h2>Statistics</h2>
-        {stats}
-      </td>
-      <td>
-      </td>
-    </tr>
-  </tbody>
-</table>
-
-[BrokerClusteringView.html]
-<table class="twocol">
-  <tbody>
-    <tr>
-      <td>
-        <h2>Properties</h2>
-        {props}
-
-        <h2>Statistics</h2>
-        {stats}
-      </td>
-      <td>
-      </td>
-    </tr>
-  </tbody>
-</table>
-
 [BrokerSetEngroupForm.css]
 div.content ul {
     list-style: none;



More information about the rhmessaging-commits mailing list