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

rhmessaging-commits at lists.jboss.org rhmessaging-commits at lists.jboss.org
Fri Apr 4 11:13:52 EDT 2008


Author: justi9
Date: 2008-04-04 11:13:52 -0400 (Fri, 04 Apr 2008)
New Revision: 1838

Modified:
   mgmt/cumin/python/cumin/model.py
   mgmt/cumin/python/cumin/stat.py
Log:
Add all the remaining properties to the ui metadata for mgmt defined
objects.

Avoid a name collision by renameing CuminClass.name to
CuminClass.cumin_name.



Modified: mgmt/cumin/python/cumin/model.py
===================================================================
--- mgmt/cumin/python/cumin/model.py	2008-04-04 13:44:32 UTC (rev 1837)
+++ mgmt/cumin/python/cumin/model.py	2008-04-04 15:13:52 UTC (rev 1838)
@@ -38,7 +38,7 @@
         
     def add_class(self, cls):
         self.classes.append(cls)
-        setattr(self, cls.name, cls)
+        setattr(self, cls.cumin_name, cls)
 
     def get_class_by_object(self, mint_object):
         for cls in self.classes:
@@ -279,7 +279,7 @@
 class CuminClass(object):
     def __init__(self, model, name, mint_class):
         self.model = model
-        self.name = name
+        self.cumin_name = name
         self.mint_class = mint_class
 
         self.properties = list()
@@ -431,6 +431,36 @@
     def __init__(self, model):
         super(CuminBroker, self).__init__(model, "broker", Broker, BrokerStats)
 
+        prop = CuminProperty(self, "port")
+        prop.title = "Port"
+
+        prop = CuminProperty(self, "workerThreads")
+        prop.title = "Worker Threads"
+
+        prop = CuminProperty(self, "maxConns")
+        prop.title = "Max Connections"
+
+        prop = CuminProperty(self, "connBacklog")
+        prop.title = "Connection Backlog"
+
+        prop = CuminProperty(self, "stagingThreshold")
+        prop.title = "Staging Threshold"
+
+        prop = CuminProperty(self, "mgmtPubInterval")
+        prop.title = "Mgmt. Publish Interval"
+
+        prop = CuminProperty(self, "clusterName")
+        prop.title = "Cluster Name"
+
+        prop = CuminProperty(self, "version")
+        prop.title = "Version"
+
+        prop = CuminProperty(self, "dataDirEnabled")
+        prop.title = "Data Dir. Enabled?"
+
+        prop = CuminProperty(self, "dataDir")
+        prop.title = "Data Directory"
+
     def show(self, session, broker):
         frame = self.model.app.main_page.show_main(session)
         return frame.show_broker(session, broker)
@@ -439,86 +469,98 @@
     def __init__(self, model):
         super(CuminQueue, self).__init__(model, "queue", Queue, QueueStats)
         
+        prop = CuminProperty(self, "name")
+        prop.title = "Name"
+
+        prop = CuminProperty(self, "durable")
+        prop.title = "Durable?"
+
+        prop = CuminProperty(self, "autoDelete")
+        prop.title = "Auto Delete?"
+
+        prop = CuminProperty(self, "exclusive")
+        prop.title = "Exclusive?"
+
         stat = CuminStat(self, "consumers")
         stat.title = "Consumers"
         stat.unit = "consumer"
-        stat.categories = ("general")
+        stat.categories = ("general",)
         stat.highlow = True
 
         stat = CuminStat(self, "bindings")
         stat.title = "Bindings"
         stat.unit = "binding"
-        stat.categories = ("general")
+        stat.categories = ("general",)
         stat.highlow = True
 
         stat = CuminStat(self, "msgDepth")
         stat.title = "Message Depth"
         stat.unit = "message"
-        stat.categories = ("message", "general")
+        stat.categories = ("general",)
         stat.highlow = True
 
         stat = CuminStat(self, "msgTotalEnqueues")
         stat.title = "Msgs. Enqueued"
         stat.unit = "message"
-        stat.categories = ("message", "general")
+        stat.categories = ("general",)
 
         stat = CuminStat(self, "msgTotalDequeues")
         stat.title = "Msgs. Dequeued"
         stat.unit = "message"
-        stat.categories = ("message", "general")
+        stat.categories = ("general",)
 
         stat = CuminStat(self, "byteDepth")
         stat.title = "Byte Depth"
         stat.unit = "byte"
-        stat.categories = ("byte", "general")
+        stat.categories = ("general",)
         stat.highlow = True
 
         stat = CuminStat(self, "byteTotalEnqueues")
         stat.title = "Bytes Enqueued"
         stat.unit = "byte"
-        stat.categories = ("byte", "general")
+        stat.categories = ("general",)
 
         stat = CuminStat(self, "byteTotalDequeues")
         stat.title = "Bytes Dequeued"
         stat.unit = "byte"
-        stat.categories = ("byte", "general")
+        stat.categories = ("general",)
 
         stat = CuminStat(self, "unackedMessages")
         stat.title = "Msgs. Unacked"
         stat.unit = "message"
-        stat.categories = ("general")
+        stat.categories = ("general",)
         stat.highlow = True
 
         stat = CuminStat(self, "messageLatencyMin")
         stat.title = "Min. Msg. Latency"
         stat.unit = "nanosecond"
-        stat.categories = ("general")
+        stat.categories = ("general",)
 
         stat = CuminStat(self, "messageLatencyMax")
         stat.title = "Max. Msg. Latency"
         stat.unit = "nanosecond"
-        stat.categories = ("general")
+        stat.categories = ("general",)
 
         stat = CuminStat(self, "messageLatencyAverage")
         stat.title = "Avg. Msg. Latency"
         stat.unit = "nanosecond"
-        stat.categories = ("general")
+        stat.categories = ("general",)
 
         stat = CuminStat(self, "messageLatencySamples")
         stat.title = "Msg. Latency Samples"
         stat.unit = "sample"
-        stat.categories = ("general")
+        stat.categories = ("general",)
 
         # Disk
 
         #stat = CuminStat(self, "diskPageSize")
         #stat.title = "Page size"
-        #stat.categories = ("disk")
+        #stat.categories = ("disk",)
 
         #stat = CuminStat(self, "diskPages")
         #stat.title = "Disk Pages"
         #stat.unit = "page"
-        #stat.categories = ("general")
+        #stat.categories = ("general",)
 
         #stat = CuminStat(self, "diskAvailableSize")
         #stat.title = "Available size"
@@ -627,6 +669,12 @@
         super(CuminExchange, self).__init__(model, "exchange",
                                             Exchange, ExchangeStats)
         
+        prop = CuminProperty(self, "name")
+        prop.title = "Name"
+
+        prop = CuminProperty(self, "type")
+        prop.title = "Type"
+
         stat = CuminStat(self, "producers")
         stat.title = "Producers"
         stat.unit = "producer"
@@ -677,6 +725,9 @@
         super(CuminBinding, self).__init__(model, "binding",
                                            Binding, BindingStats)
 
+        prop = CuminProperty(self, "bindingKey")
+        prop.title = "Binding Key"
+
         stat = CuminStat(self, "msgMatched")
         stat.title = "Msgs. Matched"
         stat.unit = "message"
@@ -692,6 +743,9 @@
     def __init__(self, model):
         super(CuminClient, self).__init__(model, "client", Client, ClientStats)
 
+        prop = CuminProperty(self, "address")
+        prop.title = "Address"
+
         stat = CuminStat(self, "closing")
         stat.title = "Closing Down"
         stat.categories = ("general",)
@@ -736,6 +790,15 @@
         super(CuminSession, self).__init__(model, "session",
                                            Session, SessionStats)
 
+        prop = CuminProperty(self, "name")
+        prop.title = "Name"
+
+        prop = CuminProperty(self, "channelId")
+        prop.title = "Channel ID"
+
+        prop = CuminProperty(self, "detachedLifespan")
+        prop.title = "Detached Lifespan"
+
         stat = CuminStat(self, "expireTime")
         stat.title = "Expiration"
         stat.categories = ("general",)
@@ -789,6 +852,12 @@
     def __init__(self, model):
         super(CuminLink, self).__init__(model, "link", Link, LinkStats)
 
+        prop = CuminProperty(self, "address")
+        prop.title = "Peer Address"
+
+        prop = CuminProperty(self, "authIdentity")
+        prop.title = "Auth. Identity"
+
         stat = CuminStat(self, "closing")
         stat.title = "Closing Down"
         stat.categories = ("general",)

Modified: mgmt/cumin/python/cumin/stat.py
===================================================================
--- mgmt/cumin/python/cumin/stat.py	2008-04-04 13:44:32 UTC (rev 1837)
+++ mgmt/cumin/python/cumin/stat.py	2008-04-04 15:13:52 UTC (rev 1838)
@@ -85,7 +85,7 @@
     def render_href(self, session, object):
         params = list()
 
-        cls = self.app.model.get_class_by_object(object).name
+        cls = self.app.model.get_class_by_object(object).cumin_name
         params.append("class=%s" % cls)
 
         params.append("id=%i" % object.id)




More information about the rhmessaging-commits mailing list