rhmessaging commits: r1198 - in mgmt: notes and 1 other directory.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2007-10-31 13:52:33 -0400 (Wed, 31 Oct 2007)
New Revision: 1198
Modified:
mgmt/cumin/python/cumin/charts.py
mgmt/notes/justin-todo.txt
Log:
Makes the charts scroll in the right direction.
Modified: mgmt/cumin/python/cumin/charts.py
===================================================================
--- mgmt/cumin/python/cumin/charts.py 2007-10-31 17:34:58 UTC (rev 1197)
+++ mgmt/cumin/python/cumin/charts.py 2007-10-31 17:52:33 UTC (rev 1198)
@@ -9,7 +9,7 @@
def __init__(self, width, height):
self.width = width
self.height = height
- self.surface = ImageSurface(FORMAT_ARGB32, width + 40, height + 20)
+ self.surface = ImageSurface(FORMAT_ARGB32, width + 60, height + 20)
self.max_value = 1
def set_max_value(self, value):
@@ -20,8 +20,9 @@
cr.set_line_width(2)
cr.set_source_rgb(*color)
- for x, value in zip(range(self.width, 0 - interval, -interval),
- reversed(values)):
+ xs = range(self.width, 0 - interval, -interval)
+
+ for x, value in zip(xs, values):
y = self.height - (value / float(self.max_value)) * self.height
cr.line_to(x, y)
Modified: mgmt/notes/justin-todo.txt
===================================================================
--- mgmt/notes/justin-todo.txt 2007-10-31 17:34:58 UTC (rev 1197)
+++ mgmt/notes/justin-todo.txt 2007-10-31 17:52:33 UTC (rev 1198)
@@ -111,5 +111,3 @@
cases where get_object is overriden and that fact is not reflected
in the render_title calls. Perhaps introduce a get_title to solve
this.
-
- * Make the charts scroll in the right direction
17 years, 1 month
rhmessaging commits: r1197 - mgmt/notes.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2007-10-31 13:34:58 -0400 (Wed, 31 Oct 2007)
New Revision: 1197
Modified:
mgmt/notes/justin-todo.txt
Log:
Todo list updates
Modified: mgmt/notes/justin-todo.txt
===================================================================
--- mgmt/notes/justin-todo.txt 2007-10-31 17:04:53 UTC (rev 1196)
+++ mgmt/notes/justin-todo.txt 2007-10-31 17:34:58 UTC (rev 1197)
@@ -25,9 +25,6 @@
* Make form help buttons pop up a (for now, empty) help page
- * Icons: machine looking thing for vhost. For Cumin in general, I'm
- not sure. The hammer and screwdriver?
-
* Make item counts in tab labels a little grayer, that is, less
intense than the name
@@ -51,33 +48,34 @@
* Servers tab
- - Add server to group
-
- Find/connect in bulk
- - Add checkboxes and bulk operations
-
- Add an ungrouped radio button
- * Func host view
-
- - Remove config tab
-
* Cluster
- - Add load balance action
-
- Add remove action
- Stop, start
- Display load, profiles (?)
+ * Queue
+
+ - Add durable, exclusive props
+
+ - Make consumers the second column, after name
+
+ - Add msg/byte enq/deq rates
+
+ - Split queues view into bytes and messages modes
+
+ - Add a msg enq rate msg deq rate chart
+
+ - Rate of accel, decel for enq, deq
+
* Add group type to group add,edit
- * Consider making add_child, add_param, add_mode, add_tab,
- etc. return their argument
-
* Add a CuminItemSet with add/edit/remove href parts
* Rename ServerGroupType to ServerGroupCategory
@@ -113,3 +111,5 @@
cases where get_object is overriden and that fact is not reflected
in the render_title calls. Perhaps introduce a get_title to solve
this.
+
+ * Make the charts scroll in the right direction
17 years, 1 month
rhmessaging commits: r1196 - in mgmt: notes and 1 other directory.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2007-10-31 13:04:53 -0400 (Wed, 31 Oct 2007)
New Revision: 1196
Modified:
mgmt/cumin/python/cumin/broker.py
mgmt/cumin/python/cumin/brokercluster.py
mgmt/cumin/python/cumin/exchange.py
mgmt/cumin/python/cumin/page.py
mgmt/cumin/python/cumin/queue.py
mgmt/notes/justin-todo.txt
Log:
Finishes making qs and es live directly under broker. Takes vhosts
out of the context navigation.
Modified: mgmt/cumin/python/cumin/broker.py
===================================================================
--- mgmt/cumin/python/cumin/broker.py 2007-10-31 16:17:27 UTC (rev 1195)
+++ mgmt/cumin/python/cumin/broker.py 2007-10-31 17:04:53 UTC (rev 1196)
@@ -110,21 +110,35 @@
self.add_mode(self.view)
self.set_view_mode(self.view)
- self.vhost = VirtualHostFrame(app, "vhost")
- self.add_mode(self.vhost)
-
self.prop = BrokerConfigPropertyForm(app, "prop")
self.add_mode(self.prop)
- def show_virtual_host(self, session, vhost):
- self.vhost.set_object(session, vhost)
- return self.show_mode(session, self.vhost)
+ self.queue = QueueFrame(app, "queue")
+ self.add_mode(self.queue)
+ self.exchange = ExchangeFrame(app, "exchange")
+ self.add_mode(self.exchange)
+
+ self.client = ClientFrame(app, "client")
+ self.add_mode(self.client)
+
def show_config_property(self, session, prop):
self.prop.set_config_property(session, prop)
frame = self.show_mode(session, self.prop)
return self.page().set_current_frame(session, frame)
+ def show_queue(self, session, queue):
+ self.queue.set_object(session, queue)
+ return self.show_mode(session, self.queue)
+
+ def show_exchange(self, session, exchange):
+ self.exchange.set_object(session, exchange)
+ return self.show_mode(session, self.exchange)
+
+ def show_client(self, session, client):
+ self.client.set_object(session, client)
+ return self.show_mode(session, self.client)
+
def render_title(self, session, broker):
return "Broker '%s'" % broker.name
@@ -259,21 +273,24 @@
class BrokerQueueTab(QueueSet):
def render_title(self, session, broker):
- return "Queues"
+ count = len(broker.default_virtual_host.queue_items())
+ return "Queues (%i)" % count
def get_object(self, session, broker):
return broker.default_virtual_host
class BrokerExchangeTab(ExchangeSet):
def render_title(self, session, broker):
- return "Exchanges"
+ count = len(broker.default_virtual_host.exchange_items())
+ return "Exchanges (%i)" % count
def get_object(self, session, broker):
return broker.default_virtual_host
class BrokerClientTab(ClientSet):
def render_title(self, session, broker):
- return "Clients"
+ count = len(broker.default_virtual_host.client_items())
+ return "Clients (%i)" % count
def get_object(self, session, broker):
return broker.default_virtual_host
Modified: mgmt/cumin/python/cumin/brokercluster.py
===================================================================
--- mgmt/cumin/python/cumin/brokercluster.py 2007-10-31 16:17:27 UTC (rev 1195)
+++ mgmt/cumin/python/cumin/brokercluster.py 2007-10-31 17:04:53 UTC (rev 1196)
@@ -57,17 +57,10 @@
self.broker = BrokerFrame(app, "broker")
self.add_mode(self.broker)
- self.vhost = VirtualHostFrame(app, "vhost")
- self.add_mode(self.vhost)
-
def show_broker(self, session, broker):
self.broker.set_object(session, broker)
return self.show_mode(session, self.broker)
- def show_virtual_host(self, session, vhost):
- self.vhost.set_object(session, vhost)
- return self.show_mode(session, self.vhost)
-
def render_title(self, session, cluster):
return "Broker Cluster '%s'" % cluster.name
@@ -79,7 +72,6 @@
self.add_child(self.tabs)
self.tabs.add_tab(self.ClusterBrokerTab(app, "brokers"))
- self.tabs.add_tab(self.ClusterVirtualHostTab(app, "vhosts"))
self.tabs.add_tab(self.ClusterStatsTab(app, "stats"))
def render_title(self, session, cluster):
@@ -95,13 +87,6 @@
def get_items(self, session, cluster):
return sorted_by(cluster.broker_items())
- class ClusterVirtualHostTab(VirtualHostSet):
- def render_title(self, session, cluster):
- return "Functional Hosts (%i)" % len(cluster.virtual_host_items())
-
- def get_items(self, session, cluster):
- return sorted_by(cluster.virtual_host_items())
-
class ClusterStatsTab(Widget):
def render_title(self, session, cluster):
return "Statistics"
Modified: mgmt/cumin/python/cumin/exchange.py
===================================================================
--- mgmt/cumin/python/cumin/exchange.py 2007-10-31 16:17:27 UTC (rev 1195)
+++ mgmt/cumin/python/cumin/exchange.py 2007-10-31 17:04:53 UTC (rev 1196)
@@ -177,7 +177,7 @@
class ExchangeAdd(ExchangeForm):
def process_cancel(self, session, vhost):
branch = session.branch()
- self.page().show_virtual_host(branch, vhost).show_view(branch)
+ self.page().show_broker(branch, vhost.get_broker()).show_view(branch)
session.set_redirect(branch.marshal())
def process_submit(self, session, vhost):
@@ -233,7 +233,7 @@
exchange.remove()
branch = session.branch()
- self.page().show_virtual_host(branch, vhost).show_view(branch)
+ self.page().show_broker(branch, vhost.get_broker()).show_view(branch)
session.set_redirect(branch.marshal())
def process_cancel(self, session, exchange):
Modified: mgmt/cumin/python/cumin/page.py
===================================================================
--- mgmt/cumin/python/cumin/page.py 2007-10-31 16:17:27 UTC (rev 1195)
+++ mgmt/cumin/python/cumin/page.py 2007-10-31 17:04:53 UTC (rev 1196)
@@ -96,33 +96,21 @@
frame.set_object(session, profile)
return self.set_current_frame(session, frame)
- def show_virtual_host(self, session, vhost):
- broker = vhost.get_broker()
- cluster = vhost.get_broker_cluster()
-
- if broker:
- frame = self.show_broker(session, broker)
- elif cluster:
- frame = self.show_broker_cluster(session, cluster)
- else:
- raise Exception()
-
- frame = frame.show_virtual_host(session, vhost)
-
- return self.set_current_frame(session, frame)
-
def show_queue(self, session, queue):
- frame = self.show_virtual_host(session, queue.virtual_host)
+ broker = queue.get_virtual_host().get_broker()
+ frame = self.show_broker(session, broker)
frame = frame.show_queue(session, queue)
return self.set_current_frame(session, frame)
def show_exchange(self, session, exchange):
- frame = self.show_virtual_host(session, exchange.virtual_host)
+ broker = exchange.get_virtual_host().get_broker()
+ frame = self.show_broker(session, broker)
frame = frame.show_exchange(session, exchange)
return self.set_current_frame(session, frame)
def show_client(self, session, client):
- frame = self.show_virtual_host(session, client.virtual_host)
+ broker = client.get_virtual_host().get_broker()
+ frame = self.show_broker(session, broker)
frame = frame.show_client(session, client)
return self.set_current_frame(session, frame)
Modified: mgmt/cumin/python/cumin/queue.py
===================================================================
--- mgmt/cumin/python/cumin/queue.py 2007-10-31 16:17:27 UTC (rev 1195)
+++ mgmt/cumin/python/cumin/queue.py 2007-10-31 17:04:53 UTC (rev 1196)
@@ -200,7 +200,7 @@
class QueueAdd(QueueForm):
def process_cancel(self, session, vhost):
branch = session.branch()
- self.page().show_virtual_host(branch, vhost).show_view(branch)
+ self.page().show_broker(branch, vhost.get_broker()).show_view(branch)
session.set_redirect(branch.marshal())
def process_submit(self, session, vhost):
@@ -256,7 +256,7 @@
queue.remove()
branch = session.branch()
- self.page().show_virtual_host(branch, vhost).show_view(branch)
+ self.page().show_broker(branch, vhost.get_broker()).show_view(branch)
session.set_redirect(branch.marshal())
def process_cancel(self, session, queue):
Modified: mgmt/notes/justin-todo.txt
===================================================================
--- mgmt/notes/justin-todo.txt 2007-10-31 16:17:27 UTC (rev 1195)
+++ mgmt/notes/justin-todo.txt 2007-10-31 17:04:53 UTC (rev 1196)
@@ -107,3 +107,9 @@
* Make the status lights also be links to an appropriate view
* Make status boxes display stats like those from list views
+
+ * Right now we're calling render_title outside of render in order to
+ produce tab labels, for instance. This is not good, especially in
+ cases where get_object is overriden and that fact is not reflected
+ in the render_title calls. Perhaps introduce a get_title to solve
+ this.
17 years, 1 month
rhmessaging commits: r1195 - store/trunk/cpp.
by rhmessaging-commits@lists.jboss.org
Author: gordonsim
Date: 2007-10-31 12:17:27 -0400 (Wed, 31 Oct 2007)
New Revision: 1195
Modified:
store/trunk/cpp/README
Log:
Need to yum install db4-devel
Modified: store/trunk/cpp/README
===================================================================
--- store/trunk/cpp/README 2007-10-31 15:30:28 UTC (rev 1194)
+++ store/trunk/cpp/README 2007-10-31 16:17:27 UTC (rev 1195)
@@ -23,7 +23,7 @@
They will be skipped otherwise.
On a fedora system install prerequisites via:
- yum install db4 qpidd-devel
+ yum install db4-devel qpidd-devel
On a Debian-based system, install prerequisites via:
apt-get install libdb4.3++-dev
17 years, 1 month
rhmessaging commits: r1194 - in mgmt: notes and 1 other directory.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2007-10-31 11:30:28 -0400 (Wed, 31 Oct 2007)
New Revision: 1194
Modified:
mgmt/cumin/python/cumin/broker.py
mgmt/notes/justin-todo.txt
Log:
Moves queues, exchanges, and clients to the broker level and hides
vhosts.
Modified: mgmt/cumin/python/cumin/broker.py
===================================================================
--- mgmt/cumin/python/cumin/broker.py 2007-10-31 15:02:28 UTC (rev 1193)
+++ mgmt/cumin/python/cumin/broker.py 2007-10-31 15:30:28 UTC (rev 1194)
@@ -3,6 +3,9 @@
from configproperty import *
from virtualhost import *
+from queue import *
+from exchange import *
+from client import *
from widgets import *
from parameters import *
from util import *
@@ -213,11 +216,14 @@
self.tabs = TabSet(app, "tabs")
self.add_child(self.tabs)
- self.tabs.add_tab(self.BrokerVirtualHostTab(app, "vhosts"))
+ self.tabs.add_tab(self.BrokerQueueTab(app, "queues"))
+ self.tabs.add_tab(self.BrokerExchangeTab(app, "exchanges"))
+ self.tabs.add_tab(self.BrokerClientTab(app, "clients"))
self.config = self.BrokerConfigTab(app, "config")
self.tabs.add_tab(self.config)
self.tabs.add_tab(self.BrokerStatsTab(app, "stats"))
self.tabs.add_tab(self.BrokerLogTab(app, "log"))
+ #self.tabs.add_tab(self.BrokerVirtualHostTab(app, "vhosts"))
def show_config(self, session):
return self.tabs.show_mode(session, self.config)
@@ -251,8 +257,32 @@
def render_version(self, session, broker):
return "1.0"
+ class BrokerQueueTab(QueueSet):
+ def render_title(self, session, broker):
+ return "Queues"
+
+ def get_object(self, session, broker):
+ return broker.default_virtual_host
+
+ class BrokerExchangeTab(ExchangeSet):
+ def render_title(self, session, broker):
+ return "Exchanges"
+
+ def get_object(self, session, broker):
+ return broker.default_virtual_host
+
+ class BrokerClientTab(ClientSet):
+ def render_title(self, session, broker):
+ return "Clients"
+
+ def get_object(self, session, broker):
+ return broker.default_virtual_host
+
class BrokerVirtualHostTab(VirtualHostSet):
def render_title(self, session, broker):
+ return "Configuration"
+
+ def render_title(self, session, broker):
return "Functional Hosts (%i)" % len(broker.virtual_host_items())
def get_items(self, session, broker):
Modified: mgmt/notes/justin-todo.txt
===================================================================
--- mgmt/notes/justin-todo.txt 2007-10-31 15:02:28 UTC (rev 1193)
+++ mgmt/notes/justin-todo.txt 2007-10-31 15:30:28 UTC (rev 1194)
@@ -102,8 +102,6 @@
* Right now, non cumin pages don't print their stack traces in the
log
- * Move q,e to server level (using default vhost)
-
* Make sure nav links are so marked
* Make the status lights also be links to an appropriate view
17 years, 1 month
rhmessaging commits: r1193 - in mgmt: notes and 1 other directory.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2007-10-31 11:02:28 -0400 (Wed, 31 Oct 2007)
New Revision: 1193
Modified:
mgmt/cumin/python/cumin/broker.strings
mgmt/cumin/python/cumin/brokercluster.strings
mgmt/cumin/python/cumin/brokergroup.strings
mgmt/cumin/python/cumin/brokerprofile.strings
mgmt/cumin/python/cumin/exchange.strings
mgmt/cumin/python/cumin/queue.strings
mgmt/notes/justin-todo.txt
Log:
Finishes renaming name columns.
Modified: mgmt/cumin/python/cumin/broker.strings
===================================================================
--- mgmt/cumin/python/cumin/broker.strings 2007-10-31 14:36:36 UTC (rev 1192)
+++ mgmt/cumin/python/cumin/broker.strings 2007-10-31 15:02:28 UTC (rev 1193)
@@ -1,7 +1,7 @@
[BrokerSet.html]
<table class="mobjects">
<tr>
- <th>Broker</th>
+ <th>Name</th>
<th>Profile</th>
<th>Cluster</th>
<th>Status</th>
@@ -43,7 +43,7 @@
<table class="mobjects">
<tr>
<th><input type="checkbox"/></th>
- <th>Broker</th>
+ <th>Name</th>
<th>Profile</th>
<th>Cluster</th>
<th>Load</th>
@@ -78,7 +78,7 @@
<table class="mobjects">
<tr>
- <th>Property</th>
+ <th>Name</th>
<th>Configured Value</th>
<th>Broker Value</th>
<th>Profile Value</th>
@@ -127,7 +127,7 @@
{hidden_inputs}
</div>
<div class="foot">
- <div style="display: block; float: left;"><button>Help</button></div>
+ <div style="float: left;"><button>Help</button></div>
{cancel}
{submit}
</div>
Modified: mgmt/cumin/python/cumin/brokercluster.strings
===================================================================
--- mgmt/cumin/python/cumin/brokercluster.strings 2007-10-31 14:36:36 UTC (rev 1192)
+++ mgmt/cumin/python/cumin/brokercluster.strings 2007-10-31 15:02:28 UTC (rev 1193)
@@ -19,7 +19,7 @@
<table class="mobjects">
<tr>
- <th>Broker Cluster</th>
+ <th>Name</th>
<th>Configuration</th>
<th>Status</th>
</tr>
Modified: mgmt/cumin/python/cumin/brokergroup.strings
===================================================================
--- mgmt/cumin/python/cumin/brokergroup.strings 2007-10-31 14:36:36 UTC (rev 1192)
+++ mgmt/cumin/python/cumin/brokergroup.strings 2007-10-31 15:02:28 UTC (rev 1193)
@@ -12,7 +12,7 @@
<table class="mobjects">
<tr>
<th><input type="checkbox"/></th>
- <th>Broker Group</th>
+ <th>Name</th>
<th>Configuration</th>
<th>Status</th>
</tr>
Modified: mgmt/cumin/python/cumin/brokerprofile.strings
===================================================================
--- mgmt/cumin/python/cumin/brokerprofile.strings 2007-10-31 14:36:36 UTC (rev 1192)
+++ mgmt/cumin/python/cumin/brokerprofile.strings 2007-10-31 15:02:28 UTC (rev 1193)
@@ -5,7 +5,7 @@
<table class="BrokerProfileSet mobjects">
<tr>
- <th>Broker Profile</th>
+ <th>Name</th>
</tr>
{items}
@@ -38,7 +38,7 @@
<table class="mobjects">
<tr>
- <th>Property</th>
+ <th>Name</th>
<th>Configured Value</th>
<th></th>
</tr>
@@ -60,7 +60,7 @@
<table class="mobjects">
<tr>
- <th>Broker</th>
+ <th>Name</th>
<th>Configuration Status</th>
<th></th>
</tr>
Modified: mgmt/cumin/python/cumin/exchange.strings
===================================================================
--- mgmt/cumin/python/cumin/exchange.strings 2007-10-31 14:36:36 UTC (rev 1192)
+++ mgmt/cumin/python/cumin/exchange.strings 2007-10-31 15:02:28 UTC (rev 1193)
@@ -144,7 +144,7 @@
<table class="mobjects">
<tr>
<th><input type="checkbox"/></th>
- <th>Producer</th>
+ <th>Name</th>
<th class="ralign">Msgs. Produced</th>
<th class="ralign">Bytes Produced</th>
</tr>
Modified: mgmt/cumin/python/cumin/queue.strings
===================================================================
--- mgmt/cumin/python/cumin/queue.strings 2007-10-31 14:36:36 UTC (rev 1192)
+++ mgmt/cumin/python/cumin/queue.strings 2007-10-31 15:02:28 UTC (rev 1193)
@@ -242,7 +242,7 @@
<table class="mobjects">
<tr>
<th><input type="checkbox"/></th>
- <th>Consumer</th>
+ <th>Name</th>
<th class="ralign">Msgs. Consumed</th>
<th class="ralign">Bytes Consumed</th>
<th class="ralign">Msgs. Unacked</th>
Modified: mgmt/notes/justin-todo.txt
===================================================================
--- mgmt/notes/justin-todo.txt 2007-10-31 14:36:36 UTC (rev 1192)
+++ mgmt/notes/justin-todo.txt 2007-10-31 15:02:28 UTC (rev 1193)
@@ -108,6 +108,4 @@
* Make the status lights also be links to an appropriate view
- * Change name columns to be just "Name"
-
* Make status boxes display stats like those from list views
17 years, 1 month
rhmessaging commits: r1192 - in mgmt: notes and 1 other directory.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2007-10-31 10:36:36 -0400 (Wed, 31 Oct 2007)
New Revision: 1192
Modified:
mgmt/cumin/python/cumin/broker.strings
mgmt/cumin/python/cumin/client.strings
mgmt/cumin/python/cumin/exchange.strings
mgmt/cumin/python/cumin/page.strings
mgmt/cumin/python/cumin/queue.strings
mgmt/cumin/python/cumin/widgets.strings
mgmt/notes/justin-todo.txt
Log:
Moves status columns all the way to the right.
Replaces inline styles for right-aligned columns with a shorter class
attr.
Renames some name columns to "Name" or other appropriate field titles.
Modified: mgmt/cumin/python/cumin/broker.strings
===================================================================
--- mgmt/cumin/python/cumin/broker.strings 2007-10-31 14:31:36 UTC (rev 1191)
+++ mgmt/cumin/python/cumin/broker.strings 2007-10-31 14:36:36 UTC (rev 1192)
@@ -46,8 +46,8 @@
<th>Broker</th>
<th>Profile</th>
<th>Cluster</th>
+ <th>Load</th>
<th>Status</th>
- <th>Load</th>
</tr>
{items}
@@ -61,8 +61,8 @@
<td>{item_link}</td>
<td>{item_profile_link}</td>
<td>{item_cluster_link}</td>
+ <td>{item_load}</td>
<td>{item_status}</td>
- <td>{item_load}</td>
</tr>
[BrokerConfigTab.css]
Modified: mgmt/cumin/python/cumin/client.strings
===================================================================
--- mgmt/cumin/python/cumin/client.strings 2007-10-31 14:31:36 UTC (rev 1191)
+++ mgmt/cumin/python/cumin/client.strings 2007-10-31 14:36:36 UTC (rev 1192)
@@ -9,12 +9,12 @@
<table class="mobjects">
<tr>
<th><input type="checkbox"/></th>
- <th>Client</th>
+ <th>Address</th>
+ <th class="ralign">Msgs. Produced</th>
+ <th class="ralign">Bytes Produced</th>
+ <th class="ralign">Msgs. Consumed</th>
+ <th class="ralign">Bytes Consumed</th>
<th>Status</th>
- <th style="text-align: right;">Msgs. Produced</th>
- <th style="text-align: right;">Bytes Produced</th>
- <th style="text-align: right;">Msgs. Consumed</th>
- <th style="text-align: right;">Bytes Consumed</th>
</tr>
{items}
@@ -25,11 +25,11 @@
<tr>
<td><input type="checkbox"/></td>
<td>{item_link}</td>
+ <td class="ralign">{item_messages_produced}</td>
+ <td class="ralign">{item_messages_consumed}</td>
+ <td class="ralign">{item_bytes_produced}</td>
+ <td class="ralign">{item_bytes_consumed}</td>
<td>{item_status}</td>
- <td style="text-align: right;">{item_messages_produced}</td>
- <td style="text-align: right;">{item_messages_consumed}</td>
- <td style="text-align: right;">{item_bytes_produced}</td>
- <td style="text-align: right;">{item_bytes_consumed}</td>
</tr>
[ClientView.html]
@@ -67,10 +67,10 @@
<table class="mobjects">
<tr>
<th><input type="checkbox"/></th>
- <th>Session</th>
+ <th>Name</th>
+ <th class="ralign">Remaining Lifespan</th>
+ <th class="ralign">Frames Outstanding</th>
<th>Status</th>
- <th style="text-align: right;">Remaining Lifespan</th>
- <th style="text-align: right;">Frames Outstanding</th>
</tr>
{items}
@@ -80,7 +80,7 @@
<tr>
<td><input type="checkbox"/></td>
<td>{item_name}</td>
+ <td class="ralign">{item_remaining_lifespan}</td>
+ <td class="ralign">{item_frames_outstanding}</td>
<td>{item_status}</td>
- <td style="text-align: right;">{item_remaining_lifespan}</td>
- <td style="text-align: right;">{item_frames_outstanding}</td>
</tr>
Modified: mgmt/cumin/python/cumin/exchange.strings
===================================================================
--- mgmt/cumin/python/cumin/exchange.strings 2007-10-31 14:31:36 UTC (rev 1191)
+++ mgmt/cumin/python/cumin/exchange.strings 2007-10-31 14:36:36 UTC (rev 1192)
@@ -14,13 +14,13 @@
[ExchangeSet.html]
<table class="ExchangeSet mobjects">
<tr>
- <th>Exchange</th>
- <th>Configuration</th>
+ <th>Name</th>
+ <th>Queue Bindings</th>
+ <th class="ralign">Msgs. Received</th>
+ <th class="ralign">Bytes Received</th>
+ <th class="ralign">Msgs. Routed</th>
+ <th class="ralign">Bytes Routed</th>
<th>Status</th>
- <th style="text-align: right;">Msgs. Received</th>
- <th style="text-align: right;">Bytes Received</th>
- <th style="text-align: right;">Msgs. Routed</th>
- <th style="text-align: right;">Bytes Routed</th>
</tr>
{items}
@@ -30,11 +30,11 @@
<tr>
<td>{item_link}</a></td>
<td>{item_config}</td>
+ <td class="ralign">{item_messages_received}</td>
+ <td class="ralign">{item_bytes_received}</td>
+ <td class="ralign">{item_messages_routed}</td>
+ <td class="ralign">{item_bytes_routed}</td>
<td>{item_status}</td>
- <td style="text-align: right;">{item_messages_received}</td>
- <td style="text-align: right;">{item_bytes_received}</td>
- <td style="text-align: right;">{item_messages_routed}</td>
- <td style="text-align: right;">{item_bytes_routed}</td>
</tr>
[ExchangeForm.html]
@@ -104,7 +104,7 @@
<tr>
<th>Queue</th>
<th>Key</th>
- <th style="text-align: right;">Messages Matched</th>
+ <th class="ralign">Messages Matched</th>
</tr>
{items}
@@ -114,7 +114,7 @@
<tr>
<td><a href="{item_href}">Queue '{item_name}'</a></td>
<td>{item_binding_key}</td>
- <td style="text-align: right;">{item_messages_matched}</td>
+ <td class="ralign">{item_messages_matched}</td>
</tr>
[ExchangeStatistics.html]
@@ -145,8 +145,8 @@
<tr>
<th><input type="checkbox"/></th>
<th>Producer</th>
- <th style="text-align: right;">Msgs. Produced</th>
- <th style="text-align: right;">Bytes Produced</th>
+ <th class="ralign">Msgs. Produced</th>
+ <th class="ralign">Bytes Produced</th>
</tr>
{items}
@@ -156,6 +156,6 @@
<tr>
<td><input type="checkbox"/></td>
<td>{item_name}</td>
- <td style="text-align: right;">{item_messages_produced}</td>
- <td style="text-align: right;">{item_bytes_produced}</td>
+ <td class="ralign">{item_messages_produced}</td>
+ <td class="ralign">{item_bytes_produced}</td>
</tr>
Modified: mgmt/cumin/python/cumin/page.strings
===================================================================
--- mgmt/cumin/python/cumin/page.strings 2007-10-31 14:31:36 UTC (rev 1191)
+++ mgmt/cumin/python/cumin/page.strings 2007-10-31 14:36:36 UTC (rev 1192)
@@ -513,6 +513,10 @@
width: 100%;
}
+.ralign, table.mobjects .ralign {
+ text-align: right;
+}
+
[CuminPage.html]
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
Modified: mgmt/cumin/python/cumin/queue.strings
===================================================================
--- mgmt/cumin/python/cumin/queue.strings 2007-10-31 14:31:36 UTC (rev 1191)
+++ mgmt/cumin/python/cumin/queue.strings 2007-10-31 14:36:36 UTC (rev 1192)
@@ -12,15 +12,15 @@
<button>Purge Messages</button>
</div>
- <table class="QueueSet mobjects">
+ <table class="mobjects">
<tr>
<th><input type="checkbox"/></th>
- <th>Queue</th>
- <th>Configuration</th>
+ <th>Name</th>
+ <th>Exchange Bindings</th>
+ <th class="ralign">Msg. Depth</th>
+ <th class="ralign">Byte Depth</th>
+ <th class="ralign">Consumers</th>
<th>Status</th>
- <th style="text-align: right;">Msg. Depth</th>
- <th style="text-align: right;">Byte Depth</th>
- <th style="text-align: right;">Consumers</th>
</tr>
{items}
@@ -32,10 +32,10 @@
<td><input type="checkbox"/></td>
<td>{item_link}</a></td>
<td>{item_config}</td>
+ <td class="ralign">{item_message_depth}</td>
+ <td class="ralign">{item_byte_depth}</td>
+ <td class="ralign">{item_consumers}</td>
<td>{item_status}</td>
- <td style="text-align: right;">{item_message_depth}</td>
- <td style="text-align: right;">{item_byte_depth}</td>
- <td style="text-align: right;">{item_consumers}</td>
</tr>
[QueueForm.html]
@@ -141,7 +141,7 @@
<tr>
<th>Exchange</th>
<th>Key</th>
- <th style="text-align: right;">Messages Matched</th>
+ <th class="ralign">Messages Matched</th>
</tr>
{items}
@@ -151,7 +151,7 @@
<tr>
<td><a href="{item_href}">Exchange '{item_name}'</a></td>
<td>{item_binding_key}</td>
- <td style="text-align: right;">{item_messages_matched}</td>
+ <td class="ralign">{item_messages_matched}</td>
</tr>
[QueueBindingAdd.html]
@@ -243,9 +243,9 @@
<tr>
<th><input type="checkbox"/></th>
<th>Consumer</th>
- <th style="text-align: right;">Msgs. Consumed</th>
- <th style="text-align: right;">Bytes Consumed</th>
- <th style="text-align: right;">Msgs. Unacked</th>
+ <th class="ralign">Msgs. Consumed</th>
+ <th class="ralign">Bytes Consumed</th>
+ <th class="ralign">Msgs. Unacked</th>
</tr>
{items}
@@ -255,7 +255,7 @@
<tr>
<td><input type="checkbox"/></td>
<td>{item_name}</td>
- <td style="text-align: right;">{item_messages_consumed}</td>
- <td style="text-align: right;">{item_bytes_consumed}</td>
- <td style="text-align: right;">{item_unacked_messages}</td>
+ <td class="ralign">{item_messages_consumed}</td>
+ <td class="ralign">{item_bytes_consumed}</td>
+ <td class="ralign">{item_unacked_messages}</td>
</tr>
Modified: mgmt/cumin/python/cumin/widgets.strings
===================================================================
--- mgmt/cumin/python/cumin/widgets.strings 2007-10-31 14:31:36 UTC (rev 1191)
+++ mgmt/cumin/python/cumin/widgets.strings 2007-10-31 14:36:36 UTC (rev 1192)
@@ -6,9 +6,10 @@
<div class="body">
<div>{confirm}</div>
<div>{cancel}</div>
-{hidden_inputs}
+ {hidden_inputs}
</div>
</form>
<script>
wooly.doc().elem("{id}").node.elements[1].focus();
</script>
+
Modified: mgmt/notes/justin-todo.txt
===================================================================
--- mgmt/notes/justin-todo.txt 2007-10-31 14:31:36 UTC (rev 1191)
+++ mgmt/notes/justin-todo.txt 2007-10-31 14:36:36 UTC (rev 1192)
@@ -104,8 +104,6 @@
* Move q,e to server level (using default vhost)
- * Replace all those inline td styles with a class attr
-
* Make sure nav links are so marked
* Make the status lights also be links to an appropriate view
17 years, 1 month
rhmessaging commits: r1191 - store/trunk/cpp/lib/jrnl.
by rhmessaging-commits@lists.jboss.org
Author: kpvdr
Date: 2007-10-31 10:31:36 -0400 (Wed, 31 Oct 2007)
New Revision: 1191
Modified:
store/trunk/cpp/lib/jrnl/wmgr.cpp
Log:
Minor bugfix - affected write/read pipeline tests only.
Modified: store/trunk/cpp/lib/jrnl/wmgr.cpp
===================================================================
--- store/trunk/cpp/lib/jrnl/wmgr.cpp 2007-10-31 13:51:47 UTC (rev 1190)
+++ store/trunk/cpp/lib/jrnl/wmgr.cpp 2007-10-31 14:31:36 UTC (rev 1191)
@@ -265,7 +265,8 @@
// TODO: Tidy this up!
// u_int64_t rid = initialize_rid(cont, dtokp);
// _deq_rec.reset(rid, dtokp->rid(), xid_ptr, xid_len);
- u_int64_t rid = dtokp->getSourceMessage() ? dtokp->rid() : (cont ? _wrfc.rid() - 1 : _wrfc.get_incr_rid());
+ u_int64_t rid = dtokp->getSourceMessage() ? dtokp->rid() :
+ (cont ? _wrfc.rid() - 1 : _wrfc.get_incr_rid());
u_int64_t dequeue_rid = dtokp->getSourceMessage() ? dtokp->dequeue_rid() : dtokp->rid();
if (!dtokp->getSourceMessage())
{
@@ -794,6 +795,7 @@
case data_tok::ABORT_SUBM:
assert(dtp->wstate() == data_tok::ABORT_SUBM);
dtp->set_wstate(data_tok::ABORTED);
+#if !(defined(RHM_WRONLY) || defined(RHM_RDONLY))
it = _txn_pending_set.find(dtp->xid());
if (it == _txn_pending_set.end())
{
@@ -802,10 +804,12 @@
throw jexception(jerrno::JERR_MAP_NOTFOUND, ss.str(), "wmgr", "get_events");
}
_txn_pending_set.erase(it);
+#endif
break;
case data_tok::COMMIT_SUBM:
assert(dtp->wstate() == data_tok::COMMIT_SUBM);
dtp->set_wstate(data_tok::COMMITTED);
+#if !(defined(RHM_WRONLY) || defined(RHM_RDONLY))
it = _txn_pending_set.find(dtp->xid());
if (it == _txn_pending_set.end())
{
@@ -814,6 +818,7 @@
throw jexception(jerrno::JERR_MAP_NOTFOUND, ss.str(), "wmgr", "get_events");
}
_txn_pending_set.erase(it);
+#endif
break;
default:
std::stringstream ss;
17 years, 1 month
rhmessaging commits: r1190 - in mgmt: notes and 1 other directory.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2007-10-31 09:51:47 -0400 (Wed, 31 Oct 2007)
New Revision: 1190
Modified:
mgmt/etc/devel.profile
mgmt/notes/justin-todo.txt
Log:
A fix to the devel env.
Modified: mgmt/etc/devel.profile
===================================================================
--- mgmt/etc/devel.profile 2007-10-30 21:49:06 UTC (rev 1189)
+++ mgmt/etc/devel.profile 2007-10-31 13:51:47 UTC (rev 1190)
@@ -16,7 +16,7 @@
pypath="$DEVEL_HOME"/"$module"/python:"$pypath"
done
-export PYTHONPATH
+export PYTHONPATH="$pypath"
# PATH
Modified: mgmt/notes/justin-todo.txt
===================================================================
--- mgmt/notes/justin-todo.txt 2007-10-30 21:49:06 UTC (rev 1189)
+++ mgmt/notes/justin-todo.txt 2007-10-31 13:51:47 UTC (rev 1190)
@@ -109,3 +109,7 @@
* Make sure nav links are so marked
* Make the status lights also be links to an appropriate view
+
+ * Change name columns to be just "Name"
+
+ * Make status boxes display stats like those from list views
17 years, 1 month
rhmessaging commits: r1189 - mgmt/mint.
by rhmessaging-commits@lists.jboss.org
Author: nunofsantos
Date: 2007-10-30 17:49:06 -0400 (Tue, 30 Oct 2007)
New Revision: 1189
Modified:
mgmt/mint/schemaparser.py
Log:
refactor code into separate classes
Modified: mgmt/mint/schemaparser.py
===================================================================
--- mgmt/mint/schemaparser.py 2007-10-30 20:59:27 UTC (rev 1188)
+++ mgmt/mint/schemaparser.py 2007-10-30 21:49:06 UTC (rev 1189)
@@ -1,128 +1,175 @@
-import qpid.mllib
+import mllib
from sqlobject import connectionForURI, sqlhub, MixedCaseUnderscoreStyle
-# mapping between xml schema types and database column types
-dataTypesMap = {}
-dataTypesMap["string"] = "VARCHAR(2000)"
-dataTypesMap["bool"] = "BOOLEAN"
-dataTypesMap["uint16"] = "INT2"
-dataTypesMap["uint32"] = "INT4"
-dataTypesMap["uint32_wm"] = "INT4"
-dataTypesMap["uint64"] = "INT8"
-dataTypesMap["ipAddress"] = "VARCHAR(100)"
-dataTypesMap["enum"] = "VARCHAR(100) CHECK ("
-dataTypesMap["fieldTable"] = "VARCHAR(2000)"
-# Generate Sql
-def generateSql(name, elements, type):
- sql = startTable(name, type)
- for elem in elements:
- sql += generateColumn(elem)
- return endTable(sql)
+class SqlGenerator:
+ """generates SQL code from broker XML schema"""
-def startTable(name, type):
- if (type == "config"):
- actualName = name
- else:
- actualName = name + "_stats"
- table = "CREATE TABLE " + actualName + " (\n"
- table += " id BIGSERIAL PRIMARY KEY,\n"
- if (type == "inst"):
- table += " " + name + "_id BIGINT REFERENCES " + name + " ,\n"
- table += generateTimestampColumn("rec")
- if (type == "config"):
- table += generateTimestampColumn("creation")
- table += generateTimestampColumn("deletion")
- return table
+ # mapping between xml schema types and database column types
+ dataTypesMap = {}
+ sqlOutput = ""
+ syle = None
+
+ def __init__(self, style):
+ self.sqlOutput = ""
+ self.style = style
+ self.dataTypesMap["string"] = "VARCHAR(2000)"
+ self.dataTypesMap["bool"] = "BOOLEAN"
+ self.dataTypesMap["uint16"] = "INT2"
+ self.dataTypesMap["uint32"] = "INT4"
+ self.dataTypesMap["uint32_wm"] = "INT4"
+ self.dataTypesMap["uint64"] = "INT8"
+ self.dataTypesMap["ipAddress"] = "VARCHAR(100)"
+ self.dataTypesMap["enum"] = "VARCHAR(100) CHECK ("
+ self.dataTypesMap["fieldTable"] = "VARCHAR(2000)"
-def generateTimestampColumn(col):
- column = " " + col + "_time TIMESTAMP,\n"
- return column
+ def generate(self, name, elements, type):
+ self.startTable(name, type)
+ for elem in elements:
+ self.generateColumn(elem)
+ self.endTable()
-def generateColumn(elem, suffix=""):
- actualName = style.pythonAttrToDBColumn(elem["@name"] + suffix)
- if (elem["@type"].startswith("enum")):
- actualType = "enum"
- params = actualName + " IN ("
- for i in elem["@type"].replace("enum(", "").replace(")", "").split(","):
- params += "'" + i + "',"
- params = params[:-1] + "))"
- else:
- actualType = elem["@type"]
- params = ""
- column = " " + actualName + " " + dataTypesMap[actualType] + params + ",\n"
- if (elem["@type"].endswith("_wm") and suffix == ""):
- column += generateColumn(elem, "High")
- column += generateColumn(elem, "Low")
- return column
+ def startTable(self, name, type):
+ if (type == "config"):
+ actualName = name
+ else:
+ actualName = name + "_stats"
+ self.sqlOutput += "CREATE TABLE " + actualName + " (\n"
+ self.sqlOutput += " id BIGSERIAL PRIMARY KEY,\n"
+ if (type == "inst"):
+ self.sqlOutput += " " + name + "_id BIGINT REFERENCES " + name + " ,\n"
+ self.generateTimestampColumn("rec")
+ if (type == "config"):
+ self.generateTimestampColumn("creation")
+ self.generateTimestampColumn("deletion")
-def endTable(sql):
- return sql[:-2] + "\n);\n\n"
+ def generateTimestampColumn(self, col):
+ self.sqlOutput += " " + col + "_time TIMESTAMP,\n"
+
+ def generateColumn(self, elem, suffix=""):
+ actualName = self.style.pythonAttrToDBColumn(elem["@name"] + suffix)
+ if (elem["@type"].startswith("enum")):
+ actualType = "enum"
+ params = actualName + " IN ("
+ for i in elem["@type"].replace("enum(", "").replace(")", "").split(","):
+ params += "'" + i + "',"
+ params = params[:-1] + "))"
+ else:
+ actualType = elem["@type"]
+ params = ""
+ if (elem["@name"].endswith("Ref")):
+ foreignKeyTable = "mgmt_" + actualName.replace("_ref", "")
+ self.sqlOutput += " " + foreignKeyTable + "_id BIGINT REFERENCES " + foreignKeyTable + " ,\n"
+ else:
+ self.sqlOutput += " " + actualName + " " + self.dataTypesMap[actualType] + params + ",\n"
+ if (elem["@type"].endswith("_wm") and suffix == ""):
+ self.generateColumn(elem, "High")
+ self.generateColumn(elem, "Low")
+ def endTable(self):
+ self.sqlOutput = self.sqlOutput[:-2] + "\n);\n\n"
-# Generate Pyhon
-def generatePython(name, elements):
- name = style.dbColumnToPythonAttr(name)
- name = name[0].upper() + name[1:]
- python = startClass(name)
- for elem in elements:
- python += generateMethod(elem)
- python = endClass(python)
- python += startClass(name + "Stats")
- python = endClass(python)
- return python
+ def getCode(self):
+ return self.sqlOutput
-def startClass(name):
- result = "class " + name + "(SQLObject):\n"
- result += " class sqlmeta:\n"
- result += " fromDatabase = True\n"
- return result
-def generateMethod(elem):
- if (elem["@desc"] != None):
- comment = ' """' + elem["@desc"] + '"""\n'
- else:
- comment = ""
- result = " def " + elem["@name"] + "():\n"
- result += comment
- result +=" pass\n\n"
- return result
-def endClass(python):
- return python + "\n"
+class PythonGenerator:
+ """generates Python code from broker XML schema"""
+ pythonOutput = ""
+ syle = None
-# parse configuration file
-config = qpid.mllib.xml_parse("config.xml")
-configOptions = config.query["config/configOption"]
-options = dict()
-for opt in configOptions:
- options[opt["@name"]] = opt["@value"]
+ def __init__(self, style, dsn):
+ self.pythonOutput = "from sqlobject import *\n\n" + \
+ "conn = connectionForURI('" + dsn + "')\n" + \
+ "sqlhub.processConnection = conn\n\n"
+ self.style = style
+
+ def attrNameFromDbColumn(self, name, prefix="", removeSuffix=""):
+ name = self.style.dbColumnToPythonAttr(name.replace(removeSuffix, ""))
+ name = prefix + name[0].upper() + name[1:]
+ return name
+
+ def generate(self, name, elements):
+ name = self.attrNameFromDbColumn(name)
+ self.startClass(name)
+ for elem in elements:
+ self.generateMethod(elem)
+ self.endClass()
+ self.startClass(name + "Stats")
+ self.endClass()
+ def generateForeignKeys(self, name, elements):
+ name = self.attrNameFromDbColumn(name)
+ for elem in elements:
+ refName = elem["@name"]
+ if (refName.endswith("Ref")):
+ refName = self.attrNameFromDbColumn(refName, "Mgmt", "Ref")
+ self.pythonOutput += "\n" + refName + ".sqlmeta.addJoin(MultipleJoin('" + name + \
+ "', joinMethodName='all" + name.replace("Mgmt", "") + "s'))\n\n"
+ def startClass(self, name):
+ self.pythonOutput += "class " + name + "(SQLObject):\n"
+ self.pythonOutput += " class sqlmeta:\n"
+ self.pythonOutput += " fromDatabase = True\n"
-sqlFile = open(options["sqlOutput"], "w")
-pythonFile = open(options["pythonOutput"], "w")
+ def generateMethod(self, elem):
+ if (elem["@desc"] != None):
+ comment = ' """' + elem["@desc"] + '"""\n'
+ else:
+ comment = ""
+ self.pythonOutput += " def " + elem["@name"] + "():\n"
+ self.pythonOutput += comment
+ self.pythonOutput += " pass\n\n"
-conn = connectionForURI(options["dsn"])
-sqlhub.processConnection = conn
+ def endClass(self):
+ self.pythonOutput += "\n"
-schema = qpid.mllib.xml_parse(options["schemaXML"])
-objects = schema.query["schema/object"]
+ def getCode(self):
+ return self.pythonOutput
-style = MixedCaseUnderscoreStyle()
-pythonFile.write("from sqlobject import *\n\n" + \
- "conn = connectionForURI('" + options["dsn"] + "')\n" + \
- "sqlhub.processConnection = conn\n\n")
-for obj in objects:
- actualName = "mgmt_" + obj["@name"]
- sql = generateSql(actualName, obj.query["configElement"], "config")
- sql += generateSql(actualName, obj.query["instElement"], "inst")
- python = generatePython(actualName, obj.query["method"])
- sqlFile.write(sql)
- pythonFile.write(python)
+class SchemaParser:
+ """parses broker XML schema"""
-sqlFile.close()
-pythonFile.close()
+ options = dict()
+ schema = None
+ style = None
+ pythonGen = None
+ sqlGen = None
+
+ def __init__(self):
+ self.parseConfigFile()
+ self.style = MixedCaseUnderscoreStyle()
+ self.pythonGen = PythonGenerator(self.style, self.options["dsn"])
+ self.sqlGen = SqlGenerator(self.style)
+
+ def parseConfigFile(self):
+ config = mllib.xml_parse("config.xml")
+ configOptions = config.query["config/configOption"]
+ for opt in configOptions:
+ self.options[opt["@name"]] = opt["@value"]
+
+ def generateCode(self):
+ conn = connectionForURI(self.options["dsn"])
+ sqlhub.processConnection = conn
+ sqlFile = open(self.options["sqlOutput"], "w")
+ pythonFile = open(self.options["pythonOutput"], "w")
+ schema = mllib.xml_parse(self.options["schemaXML"])
+ objects = schema.query["schema/object"]
+ for obj in objects:
+ actualName = "mgmt_" + obj["@name"]
+ self.sqlGen.generate(actualName, obj.query["configElement"], "config")
+ self.sqlGen.generate(actualName, obj.query["instElement"], "inst")
+ self.pythonGen.generate(actualName, obj.query["method"])
+ self.pythonGen.generateForeignKeys(actualName, obj.query["configElement"])
+ sqlFile.write(self.sqlGen.getCode())
+ pythonFile.write(self.pythonGen.getCode())
+ sqlFile.close()
+ pythonFile.close()
+
+
+# parser = SchemaParser()
+# parser.generateCode()
17 years, 1 month