[rhmessaging-commits] rhmessaging commits: r1499 - in mgmt: cumin/python/wooly and 2 other directories.

rhmessaging-commits at lists.jboss.org rhmessaging-commits at lists.jboss.org
Mon Dec 17 09:31:51 EST 2007


Author: justi9
Date: 2007-12-17 09:31:51 -0500 (Mon, 17 Dec 2007)
New Revision: 1499

Modified:
   mgmt/cumin/python/cumin/__init__.py
   mgmt/cumin/python/cumin/broker.py
   mgmt/cumin/python/cumin/broker.strings
   mgmt/cumin/python/cumin/brokergroup.py
   mgmt/cumin/python/cumin/client.py
   mgmt/cumin/python/cumin/exchange.py
   mgmt/cumin/python/cumin/model.py
   mgmt/cumin/python/cumin/page.strings
   mgmt/cumin/python/cumin/parameters.py
   mgmt/cumin/python/cumin/queue.py
   mgmt/cumin/python/cumin/widgets.py
   mgmt/cumin/python/cumin/widgets.strings
   mgmt/cumin/python/wooly/__init__.py
   mgmt/cumin/python/wooly/forms.py
   mgmt/cumin/python/wooly/forms.strings
   mgmt/mint/python/mint/__init__.py
   mgmt/mint/python/mint/schema.py
   mgmt/notes/justin-todo.txt
Log:
A large set of changes:

Changes the mint model to use SQLMultipleJoin and SQLRelatedJoin in
lieu of the non SQL prefixed varieties, in order to reduce the number
of queries.

Adds a groups column to the broker browser.

Adds a groups property to the broker view.

Fixes the initial group box in the broker add form.

Adds exception handling ot the broker connect thread.

Adds a connection attempt backoff algorythm.

Moves error rendering methods from FormInput to Widget.

Adds queue message latency stat metadata, and hence to the stats view.

Makes broker group add return to the list view, not the group view.

Changes len(sqlobjectcoll) to sqlobjectoll.count() where appropriate.

Adds exception handling to the queue.purge call.

Switches to using stats, not child counts, for binding, producer, and
consumer counts in the queue and exchange lists.



Modified: mgmt/cumin/python/cumin/__init__.py
===================================================================
--- mgmt/cumin/python/cumin/__init__.py	2007-12-17 02:44:36 UTC (rev 1498)
+++ mgmt/cumin/python/cumin/__init__.py	2007-12-17 14:31:51 UTC (rev 1499)
@@ -64,25 +64,47 @@
 
         self.event = Event()
 
+        self.attempts = dict()
+
     def prompt(self):
         self.event.set()
         self.event.clear()
 
     def run(self):
+        try:
+            self.do_run()
+        except Exception, e:
+            print e
+
+    def do_run(self):
         while True:
             for reg in BrokerRegistration.select():
                 if reg.broker is None or reg.broker.managedBroker not in \
                         self.model.data.connectedBrokers:
 
-                    print "Trying to connect to broker '%s' at %s:%i" % \
-                        (reg.name, reg.host, reg.port or 5672)
+                    attempts = self.attempts.get(reg, 0)
+                    attempts += 1
+                    self.attempts[reg] = attempts
+                    
+                    if attempts < 10:
+                        self.connect(reg)
+                    elif attempts < 100 and attempts % 10 == 0:
+                        self.connect(reg)
+                    elif attempts % 100 == 0:
+                        self.connect(reg)
 
-                    try:
-                        self.model.data.connectToBroker \
-                            (reg.host, reg.port or 5672)
+            self.event.wait(10)
+    
+    def connect(self, reg):
+        print "Trying to connect to broker '%s' at %s:%i" % \
+            (reg.name, reg.host, reg.port or 5672)
 
-                        print "Connection succeeded"
-                    except socket.error:
-                        print "Connection failed"
+        try:
+            self.model.data.connectToBroker \
+                (reg.host, reg.port or 5672)
 
-            self.event.wait(30)
+            print "Connection succeeded"
+        except socket.error:
+            print "Connection failed"
+
+        

Modified: mgmt/cumin/python/cumin/broker.py
===================================================================
--- mgmt/cumin/python/cumin/broker.py	2007-12-17 02:44:36 UTC (rev 1498)
+++ mgmt/cumin/python/cumin/broker.py	2007-12-17 14:31:51 UTC (rev 1499)
@@ -16,7 +16,7 @@
 
 strings = StringCatalog(__file__)
 
-class BrokerSetForm(PaginatedItemSet, Form):
+class BrokerSetForm(PaginatedItemSet, Form, Frame):
     def __init__(self, app, name):
         super(BrokerSetForm, self).__init__(app, name)
 
@@ -96,18 +96,27 @@
         self.page().show_broker(branch, broker).show_view(branch)
         return fmt_olink(branch, broker)
 
-    def render_item_group_link(self, session, broker):
-        group = None #broker.get_broker_group()
+    def render_item_group_links(self, session, broker):
+        count = broker.groups.count()
 
-        if group:
-            branch = session.branch()
-            self.page().show_broker_group(branch, group).show_view(branch)
-            return fmt_olink(branch, group)
+        if count == 0:
+            link = fmt_none()
+        elif count < 3:
+            links = list()
+
+            for group in broker.groups[:2]:
+                branch = session.branch()
+                self.page().show_broker_group(branch, group).show_view(branch)
+                links.append(fmt_olink(branch, group))
+
+            link = ", ".join(links)
         else:
-            return fmt_none()
+            link = "%i groups" % count
 
+        return link
+
     def render_item_profile_link(self, session, broker):
-        profile = None #broker.get_broker_profile()
+        profile = broker.profile
 
         if profile:
             branch = session.branch()
@@ -117,7 +126,7 @@
             return fmt_none()
 
     def render_item_cluster_link(self, session, broker):
-        cluster = None #broker.get_broker_cluster()
+        cluster = broker.cluster
 
         if cluster:
             branch = session.branch()
@@ -294,6 +303,19 @@
     def render_name(self, session, broker):
         return broker.name
 
+    def render_address(self, session, broker):
+        return broker.host + (broker.port and ":%i" % broker.port or "")
+
+    def render_group_links(self, session, broker):
+        links = list()
+
+        for group in broker.groups:
+            branch = session.branch()
+            self.page().show_broker_group(branch, group).show_view(branch)
+            links.append(fmt_olink(branch, group))
+
+        return ", ".join(links)
+
     def render_cluster_link(self, session, broker):
         cluster = broker.cluster
         
@@ -315,7 +337,9 @@
             return fmt_none()
 
     def render_version(self, session, broker):
-        return "1.0"
+        broker = broker.broker
+        if broker:
+            return broker.version
 
     class BrokerQueueTab(QueueSet):
         def get_object(self, session, broker):
@@ -665,6 +689,9 @@
 
                 reg.name = names[i]
 
+                if groups[i]:
+                    reg.addBrokerGroup(groups[i])
+
                 self.app.broker_connect_thread.prompt()
 
         self.process_cancel(session, model)

Modified: mgmt/cumin/python/cumin/broker.strings
===================================================================
--- mgmt/cumin/python/cumin/broker.strings	2007-12-17 02:44:36 UTC (rev 1498)
+++ mgmt/cumin/python/cumin/broker.strings	2007-12-17 14:31:51 UTC (rev 1499)
@@ -25,7 +25,7 @@
       <th>Profile</th>
       <th>Cluster</th>
 -->
-      <th>Load</th>
+      <th>Groups</th>
       <th>Status</th>
     </tr>
 
@@ -43,7 +43,7 @@
   <td>{item_profile_link}</td>
   <td>{item_cluster_link}</td>
 -->
-  <td>{item_load}</td>
+  <td>{item_group_links}</td>
   <td>{item_status}</td>
 </tr>
 
@@ -135,10 +135,12 @@
 
 <table class="props">
   <tr><th>Name</th><td>{name}</td></tr>
+  <tr><th>Address</th><td>{address}</td></tr>
 <!--
   <tr><th>Cluster</th><td>{cluster_link}</td></tr>
   <tr><th>Profile</th><td>{profile_link}</td></tr>
 -->
+  <tr><th>Groups</th><td>{group_links}</td></tr>
   <tr><th>Version</th><td>{version}</td></tr>
   <tr>
     <th class="actions" colspan="2">
@@ -235,7 +237,7 @@
   <td><input type="text" name="{field_address_name}" value="{field_address_value}" size="35" tabindex="100"/></td>
   <td>
     <select name="{field_group_name}" tabindex="100">
-      <option>None</option>
+      <option value="__none__">None</option>
       {groups}
     </select>
   </td>

Modified: mgmt/cumin/python/cumin/brokergroup.py
===================================================================
--- mgmt/cumin/python/cumin/brokergroup.py	2007-12-17 02:44:36 UTC (rev 1498)
+++ mgmt/cumin/python/cumin/brokergroup.py	2007-12-17 14:31:51 UTC (rev 1499)
@@ -108,7 +108,6 @@
 
         branch = session.branch()
         self.page().show_broker_group(branch, group).show_view(branch)
-        self.page().set_redirect_url(session, branch.marshal())
 
 class BrokerGroupAdd(BrokerGroupForm, Frame):
     def get_title(self, session, model):
@@ -122,6 +121,7 @@
     def process_submit(self, session, model):
         group = BrokerGroup()
         self.process_group(session, group)
+        self.process_cancel(session, model)
     
 class BrokerGroupEdit(BrokerGroupForm, Frame):
     def get_title(self, session, group):
@@ -134,6 +134,7 @@
 
     def process_submit(self, session, group):
         self.process_group(session, group)
+        self.process_cancel(session, group)
 
     def process_display(self, session, group):
         self.group_name.set(session, group.name)

Modified: mgmt/cumin/python/cumin/client.py
===================================================================
--- mgmt/cumin/python/cumin/client.py	2007-12-17 02:44:36 UTC (rev 1498)
+++ mgmt/cumin/python/cumin/client.py	2007-12-17 14:31:51 UTC (rev 1499)
@@ -42,7 +42,7 @@
         branch = session.branch()
         frame = self.page().show_client(branch, client)
         frame.show_view(branch).show_sessions(branch)
-        return fmt_link(branch.marshal(), len(client.sessions))
+        return fmt_link(branch.marshal(), client.sessions.count())
 
     def render_item_from(self, session, client):
         unit = self.unit.get(session)

Modified: mgmt/cumin/python/cumin/exchange.py
===================================================================
--- mgmt/cumin/python/cumin/exchange.py	2007-12-17 02:44:36 UTC (rev 1498)
+++ mgmt/cumin/python/cumin/exchange.py	2007-12-17 14:31:51 UTC (rev 1499)
@@ -70,13 +70,15 @@
         branch = session.branch()
         frame = self.page().show_exchange(branch, exchange)
         frame.show_view(branch).show_producers(branch)
-        return fmt_link(branch.marshal(), len(exchange.producers))
+        stat = self.app.model.exchange.get_stat("producers")
+        return fmt_link(branch.marshal(), stat.value(exchange))
 
     def render_item_bindings(self, session, exchange):
         branch = session.branch()
         frame = self.page().show_exchange(branch, exchange)
         frame.show_view(branch).show_bindings(branch)
-        return fmt_link(branch.marshal(), len(exchange.bindings))
+        stat = self.app.model.exchange.get_stat("bindings")
+        return fmt_link(branch.marshal(), stat.value(exchange))
 
     def render_item_received(self, session, exchange):
         unit = self.unit.get(session)
@@ -373,13 +375,14 @@
 
 class ExchangeProducerSet(ItemSet):
     def get_title(self, session, exchange):
-        return "Producers %s" % fmt_count(len(exchange.producers))
+        return "Producers %s" % \
+            fmt_count(self.get_item_count(session, exchange))
 
     def get_item_count(self, session, exchange):
-        return Producer.select(Producer.q.exchangeID == exchange.id).count()
+        return exchange.producers.count()
 
     def do_get_items(self, session, exchange):
-        return Producer.select(Producer.q.exchangeID == exchange.id)
+        return exchange.producers
 
     def render_item_name(self, session, producer):
         return producer.name

Modified: mgmt/cumin/python/cumin/model.py
===================================================================
--- mgmt/cumin/python/cumin/model.py	2007-12-17 02:44:36 UTC (rev 1498)
+++ mgmt/cumin/python/cumin/model.py	2007-12-17 14:31:51 UTC (rev 1499)
@@ -182,6 +182,21 @@
         stat.unit = "message"
         stat.categories = ("general")
 
+        stat = CuminStat(self, "messageLatencyMin", "int")
+        stat.title = "Min. Msg. Latency"
+        stat.unit = "nanosecond"
+        stat.categories = ("general")
+
+        stat = CuminStat(self, "messageLatencyMax", "int")
+        stat.title = "Max. Msg. Latency"
+        stat.unit = "nanosecond"
+        stat.categories = ("general")
+
+        stat = CuminStat(self, "messageLatencyAvg", "int")
+        stat.title = "Avg. Msg. Latency"
+        stat.unit = "nanosecond"
+        stat.categories = ("general")
+
         # Disk
 
         #stat = CuminStat(self, "diskPageSize", "int")

Modified: mgmt/cumin/python/cumin/page.strings
===================================================================
--- mgmt/cumin/python/cumin/page.strings	2007-12-17 02:44:36 UTC (rev 1498)
+++ mgmt/cumin/python/cumin/page.strings	2007-12-17 14:31:51 UTC (rev 1499)
@@ -379,10 +379,6 @@
   vertical-align: -35%;
 }
 
-select {
-  border-style: groove;
-}
-
 ul.radiotabs {
   list-style: none;
   margin: 0 0 1em 0;

Modified: mgmt/cumin/python/cumin/parameters.py
===================================================================
--- mgmt/cumin/python/cumin/parameters.py	2007-12-17 02:44:36 UTC (rev 1498)
+++ mgmt/cumin/python/cumin/parameters.py	2007-12-17 14:31:51 UTC (rev 1499)
@@ -10,8 +10,13 @@
 
 class BrokerGroupParameter(Parameter):
     def do_unmarshal(self, string):
-        return BrokerGroup.get(int(string))
+        if string == "__none__":
+            object = None
+        else:
+            object = BrokerGroup.get(int(string))
 
+        return object
+
     def do_marshal(self, group):
         return str(group.id)
 

Modified: mgmt/cumin/python/cumin/queue.py
===================================================================
--- mgmt/cumin/python/cumin/queue.py	2007-12-17 02:44:36 UTC (rev 1498)
+++ mgmt/cumin/python/cumin/queue.py	2007-12-17 14:31:51 UTC (rev 1499)
@@ -54,13 +54,15 @@
         branch = session.branch()
         frame = self.page().show_queue(branch, queue)
         frame.show_view(branch).show_consumers(branch)
-        return fmt_link(branch.marshal(), len(queue.consumers))
+        stat = self.app.model.queue.get_stat("consumers")
+        return fmt_link(branch.marshal(), stat.value(queue))
 
     def render_item_bindings(self, session, queue):
         branch = session.branch()
         frame = self.page().show_queue(branch, queue)
         frame.show_view(branch).show_bindings(branch)
-        return fmt_link(branch.marshal(), len(queue.bindings))
+        stat = self.app.model.queue.get_stat("bindings")
+        return fmt_link(branch.marshal(), stat.value(queue))
 
     def render_item_enqueued(self, session, queue):
         unit = self.unit.get(session)
@@ -355,16 +357,13 @@
         self.page().set_redirect_url(session, branch.marshal())
 
     def process_submit(self, session, queue):
-        print "open purge"
+        try:
+            queue.purge(self.app.model.data, queue.managedBroker, doit)
+        except Exception, e:
+            self.add_error(session, e)
+        else:
+            self.process_cancel(session, queue)
 
-        print "queue.managedBroker", queue.managedBroker
-        
-        queue.purge(self.app.model.data, queue.managedBroker, doit)
-
-        print "close purge"
-
-        self.process_cancel(session, queue)
-
     def render_submit_content(self, session, queue):
         return "Yes, Purge Queue '%s'" % queue.name
 

Modified: mgmt/cumin/python/cumin/widgets.py
===================================================================
--- mgmt/cumin/python/cumin/widgets.py	2007-12-17 02:44:36 UTC (rev 1498)
+++ mgmt/cumin/python/cumin/widgets.py	2007-12-17 14:31:51 UTC (rev 1499)
@@ -324,6 +324,23 @@
     def render_item_content(self, session, page):
         return page + 1
 
+class TableHeader(ItemSet):
+    def __init__(self, app, name):
+        super(TableHeader, self).__init__(app, name)
+
+        self.columns = list()
+
+        XXX
+
+    def get_items(self, session, object):
+        return self.columns
+
+    def render_item_content(self, session, column):
+        return column.render_
+
+    def render_item_href(self, session, column):
+        return column.get_href(session, column)
+
 class PaginatedItemSet(ItemSet):
     def __init__(self, app, name):
         super(PaginatedItemSet, self).__init__(app, name)
@@ -389,3 +406,4 @@
     def render_item_messages_matched_rate(self, session, binding):
         stat = self.app.model.binding.get_stat("msgMatched")
         return fmt_rate(stat.rate(binding), "msg", "sec")
+

Modified: mgmt/cumin/python/cumin/widgets.strings
===================================================================
--- mgmt/cumin/python/cumin/widgets.strings	2007-12-17 02:44:36 UTC (rev 1498)
+++ mgmt/cumin/python/cumin/widgets.strings	2007-12-17 14:31:51 UTC (rev 1499)
@@ -4,6 +4,7 @@
     <h1>{title}</h1>
   </div>
   <div class="body">
+    {errors}
     <div>{submit}</div>
     <div>{cancel}</div>
     {hidden_inputs}

Modified: mgmt/cumin/python/wooly/__init__.py
===================================================================
--- mgmt/cumin/python/wooly/__init__.py	2007-12-17 02:44:36 UTC (rev 1498)
+++ mgmt/cumin/python/wooly/__init__.py	2007-12-17 14:31:51 UTC (rev 1499)
@@ -7,9 +7,9 @@
 
 from resources import ResourceFinder, StringCatalog
 
+strings = StringCatalog(__file__)
+
 class Widget(object):
-    html = "{content}"
-    
     def __init__(self, app, name):
         self.app = app
         self.__name = name
@@ -18,7 +18,9 @@
         self.attributes = list()
         self.parameters = list()
         
-        self.__template = Template(self, "html")
+        self.__main_tmpl = Template(self, "html")
+        self.__errors_tmpl = Template(self, "errors_html")
+        self.__error_message_tmpl = Template(self, "error_message_html")
 
         self.errors = Attribute(app, "errors")
         self.errors.set_default(list())
@@ -27,7 +29,7 @@
         self.__ancestors = None
         self.__path = None
         self.__page = None
-        self.child_index = None
+        self.__child_index = None
         
         app.add_widget(self)
 
@@ -79,13 +81,13 @@
         widget.__parent = self
 
     def get_child(self, name):
-        if not self.child_index:
-            self.child_index = dict()
+        if not self.__child_index:
+            self.__child_index = dict()
 
             for child in self.children:
-                self.child_index[child.name()] = child
+                self.__child_index[child.name()] = child
 
-        return self.child_index.get(name, None)
+        return self.__child_index.get(name, None)
 
     def add_attribute(self, attribute):
         self.attributes.append(attribute)
@@ -169,7 +171,7 @@
     def do_render(self, session, object):
         writer = Writer()
 
-        self.__template.render(session, object, writer)
+        self.__main_tmpl.render(session, object, writer)
 
         return writer.to_string()
 
@@ -196,6 +198,25 @@
 
         return writer.to_string()
 
+    def render_errors(self, session, object):
+        writer = Writer()
+        
+        if self.get_errors(session):
+            self.__errors_tmpl.render(session, object, writer)
+
+        return writer.to_string()
+
+    def render_error_messages(self, session, object):
+        writer = Writer()
+
+        for error in self.get_errors(session):
+            self.__error_message_tmpl.render(session, error, writer)
+
+        return writer.to_string()
+
+    def render_error_message(self, session, error):
+        return error.message
+
     def __str__(self):
         return "%s '%s'" % (self.__class__.__name__, self.path())
 

Modified: mgmt/cumin/python/wooly/forms.py
===================================================================
--- mgmt/cumin/python/wooly/forms.py	2007-12-17 02:44:36 UTC (rev 1498)
+++ mgmt/cumin/python/wooly/forms.py	2007-12-17 14:31:51 UTC (rev 1499)
@@ -88,25 +88,6 @@
     def render_value(self, session, object):
         return self.param.marshal(self.param.get(session))
 
-    def render_errors(self, session, object):
-        writer = Writer()
-        
-        if self.get_errors(session):
-            self.errors_tmp.render(session, object, writer)
-
-        return writer.to_string()
-
-    def render_error_messages(self, session, object):
-        writer = Writer()
-
-        for error in self.get_errors(session):
-            self.errors_tmpl.render(session, error, writer)
-
-        return writer.to_string()
-
-    def render_error_message(self, session, error):
-        return error.message
-
     def render_tab_index(self, session, object):
         return self.tab_index
 

Modified: mgmt/cumin/python/wooly/forms.strings
===================================================================
--- mgmt/cumin/python/wooly/forms.strings	2007-12-17 02:44:36 UTC (rev 1498)
+++ mgmt/cumin/python/wooly/forms.strings	2007-12-17 14:31:51 UTC (rev 1499)
@@ -1,12 +1,6 @@
 [FormButton.html]
 <button class="{class}" id="{id}" type="submit" name="{name}" value="{value}" tabindex="{tab_index}" {disabled_attr}>{content}</button>
 
-[FormInput.errors_html]
-<ul class="errors">{error_messages}</ul>
-
-[FormInput.error_message_html]
-<li>{error_message}</li>
-
 [TextInput.html]
 {errors}
 <input type="text" name="{name}" value="{value}" tabindex="{tab_index}" {disabled_attr} size="{size}"/>

Modified: mgmt/mint/python/mint/__init__.py
===================================================================
--- mgmt/mint/python/mint/__init__.py	2007-12-17 02:44:36 UTC (rev 1498)
+++ mgmt/mint/python/mint/__init__.py	2007-12-17 14:31:51 UTC (rev 1499)
@@ -45,12 +45,12 @@
 
 class BrokerCluster(SQLObject):
   name = StringCol(length=1000, default=None)
-  brokers = MultipleJoin("BrokerRegistration", joinColumn="cluster_id")
+  brokers = SQLMultipleJoin("BrokerRegistration", joinColumn="cluster_id")
 
 class BrokerProfile(SQLObject):
   name = StringCol(length=1000, default=None)
-  brokers = MultipleJoin("BrokerRegistration", joinColumn="profile_id")
-  properties = MultipleJoin("ConfigProperty", joinColumn="profile_id")
+  brokers = SQLMultipleJoin("BrokerRegistration", joinColumn="profile_id")
+  properties = SQLMultipleJoin("ConfigProperty", joinColumn="profile_id")
 
 class ConfigProperty(SQLObject):
   name = StringCol(length=1000, default=None)

Modified: mgmt/mint/python/mint/schema.py
===================================================================
--- mgmt/mint/python/mint/schema.py	2007-12-17 02:44:36 UTC (rev 1498)
+++ mgmt/mint/python/mint/schema.py	2007-12-17 14:31:51 UTC (rev 1499)
@@ -16,7 +16,7 @@
   recTime = TimestampCol(default=None)
   system = ForeignKey('System', cascade='null', default=None)
 
-System.sqlmeta.addJoin(MultipleJoin('SystemStats', joinMethodName='stats'))
+System.sqlmeta.addJoin(SQLMultipleJoin('SystemStats', joinMethodName='stats'))
 
 
 class Broker(SQLObject):
@@ -62,7 +62,7 @@
     model.getConnectedBroker(managedBrokerLabel).method(methodId, self.idOriginal, \
       classToSchemaNameMap[self.__class__.__name__], "echo", args=actualArgs, packageName="qpid")
 
-System.sqlmeta.addJoin(MultipleJoin('Broker', joinMethodName='brokers'))
+System.sqlmeta.addJoin(SQLMultipleJoin('Broker', joinMethodName='brokers'))
 
 
 class BrokerStats(SQLObject):
@@ -70,7 +70,7 @@
   recTime = TimestampCol(default=None)
   broker = ForeignKey('Broker', cascade='null', default=None)
 
-Broker.sqlmeta.addJoin(MultipleJoin('BrokerStats', joinMethodName='stats'))
+Broker.sqlmeta.addJoin(SQLMultipleJoin('BrokerStats', joinMethodName='stats'))
 
 
 class Vhost(SQLObject):
@@ -84,7 +84,7 @@
   broker = ForeignKey('Broker', cascade='null', default=None)
   name = StringCol(length=1000, default=None)
 
-Broker.sqlmeta.addJoin(MultipleJoin('Vhost', joinMethodName='vhosts'))
+Broker.sqlmeta.addJoin(SQLMultipleJoin('Vhost', joinMethodName='vhosts'))
 
 
 class VhostStats(SQLObject):
@@ -92,7 +92,7 @@
   recTime = TimestampCol(default=None)
   vhost = ForeignKey('Vhost', cascade='null', default=None)
 
-Vhost.sqlmeta.addJoin(MultipleJoin('VhostStats', joinMethodName='stats'))
+Vhost.sqlmeta.addJoin(SQLMultipleJoin('VhostStats', joinMethodName='stats'))
 
 
 class Queue(SQLObject):
@@ -116,7 +116,7 @@
     model.getConnectedBroker(managedBrokerLabel).method(methodId, self.idOriginal, \
       classToSchemaNameMap[self.__class__.__name__], "purge", args=actualArgs, packageName="qpid")
 
-Vhost.sqlmeta.addJoin(MultipleJoin('Queue', joinMethodName='queues'))
+Vhost.sqlmeta.addJoin(SQLMultipleJoin('Queue', joinMethodName='queues'))
 
 
 class QueueStats(SQLObject):
@@ -166,7 +166,7 @@
   messageLatencyMax = BigIntCol(default=None)
   messageLatencyAvg = BigIntCol(default=None)
 
-Queue.sqlmeta.addJoin(MultipleJoin('QueueStats', joinMethodName='stats'))
+Queue.sqlmeta.addJoin(SQLMultipleJoin('QueueStats', joinMethodName='stats'))
 
 
 class Exchange(SQLObject):
@@ -181,7 +181,7 @@
   name = StringCol(length=1000, default=None)
   type = StringCol(length=1000, default=None)
 
-Vhost.sqlmeta.addJoin(MultipleJoin('Exchange', joinMethodName='exchanges'))
+Vhost.sqlmeta.addJoin(SQLMultipleJoin('Exchange', joinMethodName='exchanges'))
 
 
 class ExchangeStats(SQLObject):
@@ -201,7 +201,7 @@
   byteDrops = BigIntCol(default=None)
   byteRoutes = BigIntCol(default=None)
 
-Exchange.sqlmeta.addJoin(MultipleJoin('ExchangeStats', joinMethodName='stats'))
+Exchange.sqlmeta.addJoin(SQLMultipleJoin('ExchangeStats', joinMethodName='stats'))
 
 
 class Binding(SQLObject):
@@ -216,9 +216,9 @@
   queue = ForeignKey('Queue', cascade='null', default=None)
   bindingKey = StringCol(length=1000, default=None)
 
-Exchange.sqlmeta.addJoin(MultipleJoin('Binding', joinMethodName='bindings'))
+Exchange.sqlmeta.addJoin(SQLMultipleJoin('Binding', joinMethodName='bindings'))
 
-Queue.sqlmeta.addJoin(MultipleJoin('Binding', joinMethodName='bindings'))
+Queue.sqlmeta.addJoin(SQLMultipleJoin('Binding', joinMethodName='bindings'))
 
 
 class BindingStats(SQLObject):
@@ -227,7 +227,7 @@
   binding = ForeignKey('Binding', cascade='null', default=None)
   msgMatched = BigIntCol(default=None)
 
-Binding.sqlmeta.addJoin(MultipleJoin('BindingStats', joinMethodName='stats'))
+Binding.sqlmeta.addJoin(SQLMultipleJoin('BindingStats', joinMethodName='stats'))
 
 
 class Client(SQLObject):
@@ -253,7 +253,7 @@
     model.getConnectedBroker(managedBrokerLabel).method(methodId, self.idOriginal, \
       classToSchemaNameMap[self.__class__.__name__], "detach", args=actualArgs, packageName="qpid")
 
-Vhost.sqlmeta.addJoin(MultipleJoin('Client', joinMethodName='clients'))
+Vhost.sqlmeta.addJoin(SQLMultipleJoin('Client', joinMethodName='clients'))
 
 
 class ClientStats(SQLObject):
@@ -266,7 +266,7 @@
   bytesFromClient = BigIntCol(default=None)
   bytesConsumed = BigIntCol(default=None)
 
-Client.sqlmeta.addJoin(MultipleJoin('ClientStats', joinMethodName='stats'))
+Client.sqlmeta.addJoin(SQLMultipleJoin('ClientStats', joinMethodName='stats'))
 
 
 class Session(SQLObject):
@@ -306,9 +306,9 @@
     model.getConnectedBroker(managedBrokerLabel).method(methodId, self.idOriginal, \
       classToSchemaNameMap[self.__class__.__name__], "close", args=actualArgs, packageName="qpid")
 
-Vhost.sqlmeta.addJoin(MultipleJoin('Session', joinMethodName='sessions'))
+Vhost.sqlmeta.addJoin(SQLMultipleJoin('Session', joinMethodName='sessions'))
 
-Client.sqlmeta.addJoin(MultipleJoin('Session', joinMethodName='sessions'))
+Client.sqlmeta.addJoin(SQLMultipleJoin('Session', joinMethodName='sessions'))
 
 
 class SessionStats(SQLObject):
@@ -319,7 +319,7 @@
   remainingLifespan = IntCol(default=None)
   framesOutstanding = IntCol(default=None)
 
-Session.sqlmeta.addJoin(MultipleJoin('SessionStats', joinMethodName='stats'))
+Session.sqlmeta.addJoin(SQLMultipleJoin('SessionStats', joinMethodName='stats'))
 
 
 class Destination(SQLObject):
@@ -353,7 +353,7 @@
     model.getConnectedBroker(managedBrokerLabel).method(methodId, self.idOriginal, \
       classToSchemaNameMap[self.__class__.__name__], "start", args=actualArgs, packageName="qpid")
 
-Session.sqlmeta.addJoin(MultipleJoin('Destination', joinMethodName='destinations'))
+Session.sqlmeta.addJoin(SQLMultipleJoin('Destination', joinMethodName='destinations'))
 
 
 class DestinationStats(SQLObject):
@@ -366,7 +366,7 @@
   msgCredits = IntCol(default=None)
   byteCredits = IntCol(default=None)
 
-Destination.sqlmeta.addJoin(MultipleJoin('DestinationStats', joinMethodName='stats'))
+Destination.sqlmeta.addJoin(SQLMultipleJoin('DestinationStats', joinMethodName='stats'))
 
 
 class Producer(SQLObject):
@@ -380,9 +380,9 @@
   destination = ForeignKey('Destination', cascade='null', default=None)
   exchange = ForeignKey('Exchange', cascade='null', default=None)
 
-Destination.sqlmeta.addJoin(MultipleJoin('Producer', joinMethodName='producers'))
+Destination.sqlmeta.addJoin(SQLMultipleJoin('Producer', joinMethodName='producers'))
 
-Exchange.sqlmeta.addJoin(MultipleJoin('Producer', joinMethodName='producers'))
+Exchange.sqlmeta.addJoin(SQLMultipleJoin('Producer', joinMethodName='producers'))
 
 
 class ProducerStats(SQLObject):
@@ -392,7 +392,7 @@
   msgsProduced = BigIntCol(default=None)
   bytesProduced = BigIntCol(default=None)
 
-Producer.sqlmeta.addJoin(MultipleJoin('ProducerStats', joinMethodName='stats'))
+Producer.sqlmeta.addJoin(SQLMultipleJoin('ProducerStats', joinMethodName='stats'))
 
 
 class Consumer(SQLObject):
@@ -412,9 +412,9 @@
     model.getConnectedBroker(managedBrokerLabel).method(methodId, self.idOriginal, \
       classToSchemaNameMap[self.__class__.__name__], "close", args=actualArgs, packageName="qpid")
 
-Destination.sqlmeta.addJoin(MultipleJoin('Consumer', joinMethodName='consumers'))
+Destination.sqlmeta.addJoin(SQLMultipleJoin('Consumer', joinMethodName='consumers'))
 
-Queue.sqlmeta.addJoin(MultipleJoin('Consumer', joinMethodName='consumers'))
+Queue.sqlmeta.addJoin(SQLMultipleJoin('Consumer', joinMethodName='consumers'))
 
 
 class ConsumerStats(SQLObject):
@@ -427,7 +427,7 @@
   unackedMessagesLow = IntCol(default=None)
   unackedMessagesHigh = IntCol(default=None)
 
-Consumer.sqlmeta.addJoin(MultipleJoin('ConsumerStats', joinMethodName='stats'))
+Consumer.sqlmeta.addJoin(SQLMultipleJoin('ConsumerStats', joinMethodName='stats'))
 
 
 classToSchemaNameMap = dict()

Modified: mgmt/notes/justin-todo.txt
===================================================================
--- mgmt/notes/justin-todo.txt	2007-12-17 02:44:36 UTC (rev 1498)
+++ mgmt/notes/justin-todo.txt	2007-12-17 14:31:51 UTC (rev 1499)
@@ -20,10 +20,6 @@
 
  * Broker groups
 
-   - Add a groups column to the browser broker list
-
-   - Fix initial group box in broker register form, or remove it
-
    - Group form submit has different behaviors between hitting enter
      and clicking submit
 
@@ -39,13 +35,21 @@
 
    - Handle other exception conditions on broker connect more gracefully
 
-   - Need to handle exceptions in broker connect thread, so it doesn't
-     stop trying
-
 Deferred
 
+ * Indicate how old stats are
+
+ * Need way to control connectToBroker timeout
+
+ * Add broker reg name unique constraint and validation
+
+ * Whereever it makes sense, add a switch to display living, dead, or
+   all objects
+
+ * BrokerSetForm displays no rows instead of [None] with some filters
+
  * Add an edit form for broker registrations so you can change their
-   names
+   names, and also their group membership
 
  * Add inactive state to some status lights
 




More information about the rhmessaging-commits mailing list