rhmessaging commits: r1227 - mgmt/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2007-11-02 17:37:21 -0400 (Fri, 02 Nov 2007)
New Revision: 1227
Modified:
mgmt/cumin/python/cumin/__init__.py
mgmt/cumin/python/cumin/charts.py
mgmt/cumin/python/cumin/exchange.py
mgmt/cumin/python/cumin/exchange.strings
mgmt/cumin/python/cumin/queue.py
mgmt/cumin/python/cumin/queue.strings
mgmt/cumin/python/cumin/widgets.py
Log:
Adds exchange charts to the history subtab of the exchange view. Adds
a CuminChartPage that both ExchangeChartPage and QueueChartPage use.
Modified: mgmt/cumin/python/cumin/__init__.py
===================================================================
--- mgmt/cumin/python/cumin/__init__.py 2007-11-02 21:33:50 UTC (rev 1226)
+++ mgmt/cumin/python/cumin/__init__.py 2007-11-02 21:37:21 UTC (rev 1227)
@@ -10,8 +10,8 @@
from model import CuminModel
from demo import DemoData
from page import CuminPage
-from queue import QueueXmlPage
-from charts import QueueChartPage
+from queue import QueueXmlPage, QueueChartPage
+from exchange import ExchangeChartPage
class Cumin(Application):
def __init__(self, model):
@@ -36,6 +36,7 @@
self.add_page(DevelPage(self, "devel.html"))
self.add_page(QueueXmlPage(self, "queue.xml"))
self.add_page(QueueChartPage(self, "queue.png"))
+ self.add_page(ExchangeChartPage(self, "exchange.png"))
class RandomIntegerPage(Page):
def __init__(self, app, name):
Modified: mgmt/cumin/python/cumin/charts.py
===================================================================
--- mgmt/cumin/python/cumin/charts.py 2007-11-02 21:33:50 UTC (rev 1226)
+++ mgmt/cumin/python/cumin/charts.py 2007-11-02 21:37:21 UTC (rev 1227)
@@ -1,10 +1,6 @@
from cairo import *
from random import random
-from wooly import *
-from wooly.parameters import *
-from parameters import *
-
class LineChart(object):
def __init__(self, width, height):
self.width = width
@@ -61,53 +57,3 @@
def write(self, writer):
self.surface.write_to_png(writer)
-
-class QueueChartPage(Page):
- def __init__(self, app, name):
- super(QueueChartPage, self).__init__(app, name)
-
- self.queue = QueueParameter(app, "id")
- self.add_parameter(self.queue)
-
- self.param = Parameter(app, "param")
- self.add_parameter(self.param)
-
- self.measurements = ListParameter(app, "m", self.param)
- self.add_parameter(self.measurements)
-
- def get_object(self, session, object):
- return self.queue.get(session)
-
- def get_content_type(self, session):
- return "image/png"
-
- def do_render(self, session, queue):
- chart = LineChart(600, 120)
-
- measures = [queue.get_measurement(x) \
- for x in self.measurements.get(session)]
-
- values = dict()
- for m in measures:
- values[m] = m.get_values(250)
-
- max_value = 0
- for m in measures:
- max_value = max(max(values[m]), max_value)
- max_value = max_value * 1.1
- max_value = max_value + (100 - max_value % 100)
- chart.set_max_value(int(max_value))
-
- chart.plot_x_intervals()
- chart.plot_y_axis()
-
- colors = ((1,0,0), (0,0,1), (0,1,0))
-
- for m, c in zip(measures, colors):
- chart.plot_values(values[m], color=c)
-
- chart.plot_frame()
-
- writer = Writer()
- chart.write(writer)
- return writer.to_string()
Modified: mgmt/cumin/python/cumin/exchange.py
===================================================================
--- mgmt/cumin/python/cumin/exchange.py 2007-11-02 21:33:50 UTC (rev 1226)
+++ mgmt/cumin/python/cumin/exchange.py 2007-11-02 21:37:21 UTC (rev 1227)
@@ -286,9 +286,19 @@
return "Current"
class StatisticsHistory(Widget):
- def render_title(self, session, exchange):
+ def render_title(self, session, queue):
return "History"
+ def render_received_chart_url(self, session, queue):
+ return "exchange.png?id=%i;m=msgReceives;m=byteReceives" % queue.id
+
+ def render_dropped_chart_url(self, session, queue):
+ return "exchange.png?id=%i;m=msgDrops;byteDrops" % queue.id
+
+ def render_routed_chart_url(self, session, queue):
+ return "exchange.png?id=%i;m=msgRoutes;m=byteRoutes" \
+ % queue.id
+
class ExchangeProducerSet(ItemSet):
def render_title(self, session, queue):
return "Producers (%i)" % len(queue.producer_items())
@@ -304,3 +314,11 @@
def render_item_bytes_produced(self, session, producer):
return producer.get_measurement("bytesProduced").get_value()
+
+class ExchangeChartPage(CuminChartPage):
+ def __init__(self, app, name):
+ super(ExchangeChartPage, self).__init__(app, name)
+
+ self.param = ExchangeParameter(app, "id")
+ self.add_parameter(self.param)
+ self.set_object_parameter(self.param)
Modified: mgmt/cumin/python/cumin/exchange.strings
===================================================================
--- mgmt/cumin/python/cumin/exchange.strings 2007-11-02 21:33:50 UTC (rev 1226)
+++ mgmt/cumin/python/cumin/exchange.strings 2007-11-02 21:37:21 UTC (rev 1227)
@@ -129,6 +129,22 @@
</tr>
</table>
+[StatisticsHistory.html]
+<h2>Received</h2>
+<div class="iblock chart">
+ <img src="{received_chart_url}"/>
+</div>
+
+<h2>Dropped</h2>
+<div class="iblock chart">
+ <img src="{dropped_chart_url}"/>
+</div>
+
+<h2>Routed</h2>
+<div class="iblock chart">
+ <img src="{routed_chart_url}"/>
+</div>
+
[ExchangeProducerSet.html]
<div class="sactions">
<h2>Act on Selected Producers:</h2>
Modified: mgmt/cumin/python/cumin/queue.py
===================================================================
--- mgmt/cumin/python/cumin/queue.py 2007-11-02 21:33:50 UTC (rev 1226)
+++ mgmt/cumin/python/cumin/queue.py 2007-11-02 21:37:21 UTC (rev 1227)
@@ -11,24 +11,6 @@
strings = StringCatalog(__file__)
-class QueueXmlPage(Page):
- def __init__(self, app, name):
- super(QueueXmlPage, self).__init__(app, name)
-
- self.queue = QueueParameter(app, "id")
- self.add_parameter(self.queue)
-
- def get_content_type(self, session):
- return Page.xml_content_type
-
- def do_render(self, session, object):
- writer = Writer()
-
- writer.write(Page.xml_1_0_declaration)
- self.queue.get(session).write_xml(writer)
-
- return writer.to_string()
-
class QueueSet(ItemSet):
def __init__(self, app, name):
super(QueueSet, self).__init__(app, name)
@@ -413,7 +395,7 @@
def render_title(self, session, queue):
return "History"
- def render_queue_depth_chart_url(self, session, queue):
+ def render_depth_chart_url(self, session, queue):
return "queue.png?id=%i;m=msgDepth;m=byteDepth" % queue.id
def render_consumers_chart_url(self, session, queue):
@@ -441,3 +423,29 @@
def render_item_unacked_messages(self, session, consumer):
return consumer.get_measurement("unackedMessages").get_value()
+
+class QueueXmlPage(Page):
+ def __init__(self, app, name):
+ super(QueueXmlPage, self).__init__(app, name)
+
+ self.queue = QueueParameter(app, "id")
+ self.add_parameter(self.queue)
+
+ def get_content_type(self, session):
+ return Page.xml_content_type
+
+ def do_render(self, session, object):
+ writer = Writer()
+
+ writer.write(Page.xml_1_0_declaration)
+ self.queue.get(session).write_xml(writer)
+
+ return writer.to_string()
+
+class QueueChartPage(CuminChartPage):
+ def __init__(self, app, name):
+ super(QueueChartPage, self).__init__(app, name)
+
+ self.param = QueueParameter(app, "id")
+ self.add_parameter(self.param)
+ self.set_object_parameter(self.param)
Modified: mgmt/cumin/python/cumin/queue.strings
===================================================================
--- mgmt/cumin/python/cumin/queue.strings 2007-11-02 21:33:50 UTC (rev 1226)
+++ mgmt/cumin/python/cumin/queue.strings 2007-11-02 21:37:21 UTC (rev 1227)
@@ -240,18 +240,10 @@
</tr>
</table>
-[StatisticsHistory.css]
-/*
-.chart img {
- background-color: #f9f9f9;
- border: 1px dotted #ddd;
-}
-*/
-
[StatisticsHistory.html]
-<h2>Queue Depth</h2>
+<h2>Depth</h2>
<div class="iblock chart">
- <img src="{queue_depth_chart_url}"/>
+ <img src="{depth_chart_url}"/>
</div>
<h2>Consumers</h2>
Modified: mgmt/cumin/python/cumin/widgets.py
===================================================================
--- mgmt/cumin/python/cumin/widgets.py 2007-11-02 21:33:50 UTC (rev 1226)
+++ mgmt/cumin/python/cumin/widgets.py 2007-11-02 21:37:21 UTC (rev 1227)
@@ -3,6 +3,7 @@
from wooly.forms import *
from util import *
+from charts import *
strings = StringCatalog(__file__)
@@ -155,6 +156,58 @@
return "%i error%s, %i warning%s" % (error_count, ess(error_count),
warning_count, ess(warning_count))
+class CuminChartPage(Page):
+ def __init__(self, app, name):
+ super(CuminChartPage, self).__init__(app, name)
+
+ self.__param = None
+
+ self.iparam = Parameter(app, "param")
+ self.add_parameter(self.iparam)
+
+ self.measurements = ListParameter(app, "m", self.iparam)
+ self.add_parameter(self.measurements)
+
+ def set_object_parameter(self, param):
+ self.__param = param
+
+ def get_object(self, session, object):
+ return self.__param.get(session)
+
+ def get_content_type(self, session):
+ return "image/png"
+
+ def do_render(self, session, object):
+ chart = LineChart(600, 120)
+
+ measures = [object.get_measurement(x) \
+ for x in self.measurements.get(session)]
+
+ values = dict()
+ for m in measures:
+ values[m] = m.get_values(250)
+
+ max_value = 0
+ for m in measures:
+ max_value = max(max(values[m]), max_value)
+ max_value = max_value * 1.1
+ max_value = max_value + (100 - max_value % 100)
+ chart.set_max_value(int(max_value))
+
+ chart.plot_x_intervals()
+ chart.plot_y_axis()
+
+ colors = ((1,0,0), (0,0,1), (0,1,0))
+
+ for m, c in zip(measures, colors):
+ chart.plot_values(values[m], color=c)
+
+ chart.plot_frame()
+
+ writer = Writer()
+ chart.write(writer)
+ return writer.to_string()
+
class UnitSwitch(Widget):
def __init__(self, app, name):
super(UnitSwitch, self).__init__(app, name)
17 years, 1 month
rhmessaging commits: r1225 - mgmt/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2007-11-02 17:05:13 -0400 (Fri, 02 Nov 2007)
New Revision: 1225
Modified:
mgmt/cumin/python/cumin/client.py
mgmt/cumin/python/cumin/exchange.py
Log:
Make client status use the little boxes.
Modified: mgmt/cumin/python/cumin/client.py
===================================================================
--- mgmt/cumin/python/cumin/client.py 2007-11-02 20:42:59 UTC (rev 1224)
+++ mgmt/cumin/python/cumin/client.py 2007-11-02 21:05:13 UTC (rev 1225)
@@ -21,7 +21,7 @@
return mlink(branch.marshal(), "Client", client.address)
def render_item_status(self, session, client):
- return "Attached"
+ return status(len(client.errors), len(client.warnings))
def render_item_messages_produced(self, session, client):
return client.get_measurement("msgsProduced").get_value()
Modified: mgmt/cumin/python/cumin/exchange.py
===================================================================
--- mgmt/cumin/python/cumin/exchange.py 2007-11-02 20:42:59 UTC (rev 1224)
+++ mgmt/cumin/python/cumin/exchange.py 2007-11-02 21:05:13 UTC (rev 1225)
@@ -124,10 +124,6 @@
else:
raise Exception()
- class ExchangeProducers(Widget):
- def render_title(self, session, queue):
- return "Producers"
-
class ExchangeBindingSet(ItemSet):
def render_title(self, session, exchange):
return "Queue Bindings (%i)" % len(exchange.binding_items())
17 years, 1 month
rhmessaging commits: r1224 - mgmt/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2007-11-02 16:42:59 -0400 (Fri, 02 Nov 2007)
New Revision: 1224
Modified:
mgmt/cumin/python/cumin/exchange.py
mgmt/cumin/python/cumin/exchange.strings
Log:
Renames ProducerSet to ExchangeProducerSet.
Modified: mgmt/cumin/python/cumin/exchange.py
===================================================================
--- mgmt/cumin/python/cumin/exchange.py 2007-11-02 20:41:27 UTC (rev 1223)
+++ mgmt/cumin/python/cumin/exchange.py 2007-11-02 20:42:59 UTC (rev 1224)
@@ -105,7 +105,7 @@
self.add_child(self.tabs)
self.tabs.add_tab(ExchangeStatistics(app, "stats"))
- self.tabs.add_tab(ProducerSet(app, "producers"))
+ self.tabs.add_tab(ExchangeProducerSet(app, "producers"))
self.tabs.add_tab(ExchangeBindingSet(app, "bindings"))
def render_title(self, session, exchange):
@@ -293,7 +293,7 @@
def render_title(self, session, exchange):
return "History"
-class ProducerSet(ItemSet):
+class ExchangeProducerSet(ItemSet):
def render_title(self, session, queue):
return "Producers (%i)" % len(queue.producer_items())
Modified: mgmt/cumin/python/cumin/exchange.strings
===================================================================
--- mgmt/cumin/python/cumin/exchange.strings 2007-11-02 20:41:27 UTC (rev 1223)
+++ mgmt/cumin/python/cumin/exchange.strings 2007-11-02 20:42:59 UTC (rev 1224)
@@ -129,7 +129,7 @@
</tr>
</table>
-[ProducerSet.html]
+[ExchangeProducerSet.html]
<div class="sactions">
<h2>Act on Selected Producers:</h2>
<button>Start</button>
@@ -148,7 +148,7 @@
{items}
</table>
-[ProducerSet.item_html]
+[ExchangeProducerSet.item_html]
<tr>
<td><input type="checkbox"/></td>
<td>{item_name}</td>
17 years, 1 month
rhmessaging commits: r1223 - mgmt/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2007-11-02 16:41:27 -0400 (Fri, 02 Nov 2007)
New Revision: 1223
Modified:
mgmt/cumin/python/cumin/client.py
mgmt/cumin/python/cumin/client.strings
mgmt/cumin/python/cumin/model.py
Log:
Adds a stats tab to client. Improves the stats metadata for client.
Modified: mgmt/cumin/python/cumin/client.py
===================================================================
--- mgmt/cumin/python/cumin/client.py 2007-11-02 20:18:16 UTC (rev 1222)
+++ mgmt/cumin/python/cumin/client.py 2007-11-02 20:41:27 UTC (rev 1223)
@@ -1,6 +1,7 @@
from wooly import *
from wooly.widgets import *
+from measurement import *
from widgets import *
from parameters import *
from util import *
@@ -62,7 +63,8 @@
self.tabs = TabSet(app, "tabs")
self.add_child(self.tabs)
- self.tabs.add_tab(SessionSet(app, "bindings"))
+ self.tabs.add_tab(ClientStatistics(app, "stats"))
+ self.tabs.add_tab(ClientSessionSet(app, "bindings"))
def render_title(self, session, client):
return "Client '%s'" % client.address
@@ -73,8 +75,31 @@
def render_auth_id(self, session, client):
return "e50e7dcaa8d6a039a"
-class SessionSet(ItemSet):
+class ClientStatistics(TabSet):
+ def __init__(self, app, name):
+ super(ClientStatistics, self).__init__(app, name)
+
+ self.add_tab(self.StatisticsCurrent(app, "current"))
+ self.add_tab(self.StatisticsHistory(app, "history"))
+
def render_title(self, session, client):
+ return "Statistics"
+
+ class StatisticsCurrent(Widget):
+ def __init__(self, app, name):
+ super(ClientStatistics.StatisticsCurrent, self).__init__(app, name)
+
+ self.add_child(MeasurementSet(app, "general_stats", "general"))
+
+ def render_title(self, session, client):
+ return "Current"
+
+ class StatisticsHistory(Widget):
+ def render_title(self, session, client):
+ return "History"
+
+class ClientSessionSet(ItemSet):
+ def render_title(self, session, client):
return "Sessions (%i)" % len(client.session_items())
def get_items(self, session, client):
Modified: mgmt/cumin/python/cumin/client.strings
===================================================================
--- mgmt/cumin/python/cumin/client.strings 2007-11-02 20:18:16 UTC (rev 1222)
+++ mgmt/cumin/python/cumin/client.strings 2007-11-02 20:41:27 UTC (rev 1223)
@@ -51,10 +51,26 @@
{tabs}
-[SessionSet.html]
+[ClientStatistics.html]
+<ul class="radiotabs tabs">{tabs}</ul>
+<div class="radiotabs mode">{mode}</div>
+
+[StatisticsCurrent.html]
+<table class="layout">
+ <tr>
+ <td class="twocol">
+ <h2>General</h2>
+ {general_stats}
+ </td>
+ <td class="twocol">
+ </td>
+ </tr>
+</table>
+
+[ClientSessionSet.html]
<div class="sactions">
<h2>Act on Selected Sessions:</h2>
- <button>Solicit Acknowledgment</button>
+ <button>Solicit Ack</button>
<button>Reset Lifespan</button>
<button>Detach</button>
<button>Close</button>
@@ -72,7 +88,7 @@
{items}
</table>
-[SessionSet.item_html]
+[ClientSessionSet.item_html]
<tr>
<td><input type="checkbox"/></td>
<td>{item_name}</td>
Modified: mgmt/cumin/python/cumin/model.py
===================================================================
--- mgmt/cumin/python/cumin/model.py 2007-11-02 20:18:16 UTC (rev 1222)
+++ mgmt/cumin/python/cumin/model.py 2007-11-02 20:41:27 UTC (rev 1223)
@@ -703,12 +703,12 @@
self.name = None
measure = Measurement("msgsProduced", "int")
- measure.title = "Messages produced"
+ measure.title = "Msgs. Produced"
measure.categories = ("message", "general")
self.measurements.append(measure)
measure = Measurement("bytesProduced", "int")
- measure.title = "Bytes produced"
+ measure.title = "Bytes Produced"
measure.categories = ("byte", "general")
self.measurements.append(measure)
@@ -719,7 +719,7 @@
self.binding_key = None
measure = Measurement("msgMatched", "int")
- measure.title = "Messages matched"
+ measure.title = "Msgs. Matched"
measure.categories = ("message", "general")
self.measurements.append(measure)
@@ -740,23 +740,23 @@
self.warnings = list()
measure = Measurement("msgsProduced", "int")
- measure.title = "Messages produced"
+ measure.title = "Msgs. Produced"
measure.categories = ("message", "general")
self.measurements.append(measure)
measure = Measurement("msgsConsumed", "int")
- measure.title = "Messages consumed"
+ measure.title = "Msgs. Consumed"
measure.categories = ("message", "general")
self.measurements.append(measure)
measure = Measurement("bytesProduced", "int")
- measure.title = "Bytes produced"
+ measure.title = "Bytes Produced"
measure.categories = ("byte", "general")
self.measurements.append(measure)
measure = Measurement("bytesConsumed", "int")
- measure.title = "Bytes consumed"
- measure.categories = ("message", "general")
+ measure.title = "Bytes Consumed"
+ measure.categories = ("byte", "general")
self.measurements.append(measure)
class Session(MeasuredModelObject):
17 years, 1 month
rhmessaging commits: r1222 - mgmt/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2007-11-02 16:18:16 -0400 (Fri, 02 Nov 2007)
New Revision: 1222
Modified:
mgmt/cumin/python/cumin/exchange.py
mgmt/cumin/python/cumin/exchange.strings
mgmt/cumin/python/cumin/queue.py
mgmt/cumin/python/cumin/queue.strings
Log:
Some renaming in order to shorten a url var.
Modified: mgmt/cumin/python/cumin/exchange.py
===================================================================
--- mgmt/cumin/python/cumin/exchange.py 2007-11-02 20:13:52 UTC (rev 1221)
+++ mgmt/cumin/python/cumin/exchange.py 2007-11-02 20:18:16 UTC (rev 1222)
@@ -35,13 +35,13 @@
def __init__(self, app, name):
super(ExchangeSet, self).__init__(app, name)
- self.unit = UnitSwitch(app, "unit_switch")
+ self.unit = UnitSwitch(app, "unit")
self.add_child(self.unit)
def render_title(self, session, vhost):
return "Exchanges (%s)" % len(vhost.exchange_items())
- def render_unit(self, session, vhost):
+ def render_unit_plural(self, session, vhost):
return self.unit.get(session) == "b" and "Bytes" or "Msgs."
def get_items(self, session, vhost):
Modified: mgmt/cumin/python/cumin/exchange.strings
===================================================================
--- mgmt/cumin/python/cumin/exchange.strings 2007-11-02 20:13:52 UTC (rev 1221)
+++ mgmt/cumin/python/cumin/exchange.strings 2007-11-02 20:18:16 UTC (rev 1222)
@@ -12,16 +12,16 @@
}
[ExchangeSet.html]
-{unit_switch}
+{unit}
<table class="mobjects">
<tr>
<th>Name</th>
<th class="ralign">Producers</th>
<th class="ralign">Queue Bindings</th>
- <th class="ralign">{unit} Received</th>
- <th class="ralign">{unit} Dropped</th>
- <th class="ralign">{unit} Routed</th>
+ <th class="ralign">{unit_plural} Received</th>
+ <th class="ralign">{unit_plural} Dropped</th>
+ <th class="ralign">{unit_plural} Routed</th>
<th>Status</th>
</tr>
Modified: mgmt/cumin/python/cumin/queue.py
===================================================================
--- mgmt/cumin/python/cumin/queue.py 2007-11-02 20:13:52 UTC (rev 1221)
+++ mgmt/cumin/python/cumin/queue.py 2007-11-02 20:18:16 UTC (rev 1222)
@@ -33,13 +33,13 @@
def __init__(self, app, name):
super(QueueSet, self).__init__(app, name)
- self.unit = UnitSwitch(app, "unit_switch")
+ self.unit = UnitSwitch(app, "unit")
self.add_child(self.unit)
def render_title(self, session, vhost):
return "Queues (%s)" % len(vhost.queue_items())
- def render_unit(self, session, vhost):
+ def render_unit_singular(self, session, vhost):
return self.unit.get(session) == "b" and "Byte" or "Msg."
def render_unit_plural(self, session, vhost):
Modified: mgmt/cumin/python/cumin/queue.strings
===================================================================
--- mgmt/cumin/python/cumin/queue.strings 2007-11-02 20:13:52 UTC (rev 1221)
+++ mgmt/cumin/python/cumin/queue.strings 2007-11-02 20:18:16 UTC (rev 1222)
@@ -7,7 +7,7 @@
[QueueSet.html]
<form action="{href}" method="get">
- {unit_switch}
+ {unit}
<div class="sactions">
<h2>Act on Selected Queues:</h2>
@@ -22,7 +22,7 @@
<th class="ralign">Exchange Bindings</th>
<th class="ralign">{unit_plural} Enqueued</th>
<th class="ralign">{unit_plural} Dequeued</th>
- <th class="ralign">{unit} Depth</th>
+ <th class="ralign">{unit_singular} Depth</th>
<th class="ralign">Depth Accel.</th>
<th>Status</th>
</tr>
17 years, 1 month
rhmessaging commits: r1221 - mgmt/cumin/bin.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2007-11-02 16:13:52 -0400 (Fri, 02 Nov 2007)
New Revision: 1221
Modified:
mgmt/cumin/bin/cumin-test
Log:
Make the default number of --bench hits 1000.
Modified: mgmt/cumin/bin/cumin-test
===================================================================
--- mgmt/cumin/bin/cumin-test 2007-11-02 19:54:14 UTC (rev 1220)
+++ mgmt/cumin/bin/cumin-test 2007-11-02 20:13:52 UTC (rev 1221)
@@ -49,7 +49,7 @@
in_port = int(args.get("port", 9090))
in_profile = "profile" in args
in_debug = "no-debug" not in args
- in_bench = "bench" in args and int(args.get("bench", None) or 200) or 0
+ in_bench = "bench" in args and int(args.get("bench", None) or 1000) or 0
in_demodata = "no-demo-data" not in args
if in_profile:
17 years, 1 month
rhmessaging commits: r1220 - mgmt/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2007-11-02 15:54:14 -0400 (Fri, 02 Nov 2007)
New Revision: 1220
Modified:
mgmt/cumin/python/cumin/brokercluster.py
mgmt/cumin/python/cumin/brokercluster.strings
mgmt/cumin/python/cumin/brokergroup.py
mgmt/cumin/python/cumin/brokergroup.strings
mgmt/cumin/python/cumin/client.py
mgmt/cumin/python/cumin/client.strings
mgmt/cumin/python/cumin/exchange.py
mgmt/cumin/python/cumin/exchange.strings
mgmt/cumin/python/cumin/model.py
Log:
Makes all the status boxes use CuminStatus.
Modified: mgmt/cumin/python/cumin/brokercluster.py
===================================================================
--- mgmt/cumin/python/cumin/brokercluster.py 2007-11-02 19:11:41 UTC (rev 1219)
+++ mgmt/cumin/python/cumin/brokercluster.py 2007-11-02 19:54:14 UTC (rev 1220)
@@ -39,9 +39,6 @@
return writer.to_string()
- def render_broker_status(self, session, broker):
- return random() < 0.25 and "red" or "green"
-
class BrokerClusterFrame(CuminFrame):
def __init__(self, app, name):
super(BrokerClusterFrame, self).__init__(app, name)
@@ -64,10 +61,16 @@
def render_title(self, session, cluster):
return "Broker Cluster '%s'" % cluster.name
+class BrokerClusterStatus(CuminStatus):
+ pass
+
class BrokerClusterView(Widget):
def __init__(self, app, name):
super(BrokerClusterView, self).__init__(app, name)
+ self.status = BrokerClusterStatus(app, "status")
+ self.add_child(self.status)
+
self.tabs = TabSet(app, "tabs")
self.add_child(self.tabs)
Modified: mgmt/cumin/python/cumin/brokercluster.strings
===================================================================
--- mgmt/cumin/python/cumin/brokercluster.strings 2007-11-02 19:11:41 UTC (rev 1219)
+++ mgmt/cumin/python/cumin/brokercluster.strings 2007-11-02 19:54:14 UTC (rev 1220)
@@ -38,12 +38,8 @@
<div class="brokerlight {broker_status}"></div>
[BrokerClusterView.html]
-<div class="mstatus green" id="{id}">
- <h2>Broker Cluster Status</h2>
+{status}
- <div>0 errors, 0 warnings</div>
-</div>
-
<h1>{title}</h1>
<table class="props">
Modified: mgmt/cumin/python/cumin/brokergroup.py
===================================================================
--- mgmt/cumin/python/cumin/brokergroup.py 2007-11-02 19:11:41 UTC (rev 1219)
+++ mgmt/cumin/python/cumin/brokergroup.py 2007-11-02 19:54:14 UTC (rev 1220)
@@ -60,10 +60,16 @@
def render_title(self, session, group):
return "Broker Group '%s'" % group.name
+class BrokerGroupStatus(CuminStatus):
+ pass
+
class BrokerGroupView(Widget):
def __init__(self, app, name):
super(BrokerGroupView, self).__init__(app, name)
+ self.status = BrokerGroupStatus(app, "status")
+ self.add_child(self.status)
+
self.tabs = TabSet(app, "tabs")
self.add_child(self.tabs)
Modified: mgmt/cumin/python/cumin/brokergroup.strings
===================================================================
--- mgmt/cumin/python/cumin/brokergroup.strings 2007-11-02 19:11:41 UTC (rev 1219)
+++ mgmt/cumin/python/cumin/brokergroup.strings 2007-11-02 19:54:14 UTC (rev 1220)
@@ -29,12 +29,8 @@
</tr>
[BrokerGroupView.html]
-<div class="mstatus green" id="{id}">
- <h2>Broker Group Status</h2>
+{status}
- <div>0 errors, 0 warnings</div>
-</div>
-
<h1>{title}</h1>
<table class="props">
Modified: mgmt/cumin/python/cumin/client.py
===================================================================
--- mgmt/cumin/python/cumin/client.py 2007-11-02 19:11:41 UTC (rev 1219)
+++ mgmt/cumin/python/cumin/client.py 2007-11-02 19:54:14 UTC (rev 1220)
@@ -49,10 +49,16 @@
def render_title(self, session, client):
return "Client %s" % client.address
+class ClientStatus(CuminStatus):
+ pass
+
class ClientView(Widget):
def __init__(self, app, name):
super(ClientView, self).__init__(app, name)
+ self.status = ClientStatus(app, "status")
+ self.add_child(self.status)
+
self.tabs = TabSet(app, "tabs")
self.add_child(self.tabs)
Modified: mgmt/cumin/python/cumin/client.strings
===================================================================
--- mgmt/cumin/python/cumin/client.strings 2007-11-02 19:11:41 UTC (rev 1219)
+++ mgmt/cumin/python/cumin/client.strings 2007-11-02 19:54:14 UTC (rev 1220)
@@ -33,12 +33,8 @@
</tr>
[ClientView.html]
-<div class="mstatus green" id="{id}">
- <h2>Client Status</h2>
+{status}
- <div>0 errors, 0 warnings</div>
-</div>
-
<h1>{title}</h1>
<table class="props">
Modified: mgmt/cumin/python/cumin/exchange.py
===================================================================
--- mgmt/cumin/python/cumin/exchange.py 2007-11-02 19:11:41 UTC (rev 1219)
+++ mgmt/cumin/python/cumin/exchange.py 2007-11-02 19:54:14 UTC (rev 1220)
@@ -91,10 +91,16 @@
def render_title(self, session, exchange):
return "Exchange '%s'" % exchange.name
+class ExchangeStatus(CuminStatus):
+ pass
+
class ExchangeView(Widget):
def __init__(self, app, name):
super(ExchangeView, self).__init__(app, name)
+ self.status = ExchangeStatus(app, "status")
+ self.add_child(self.status)
+
self.tabs = TabSet(app, "tabs")
self.add_child(self.tabs)
Modified: mgmt/cumin/python/cumin/exchange.strings
===================================================================
--- mgmt/cumin/python/cumin/exchange.strings 2007-11-02 19:11:41 UTC (rev 1219)
+++ mgmt/cumin/python/cumin/exchange.strings 2007-11-02 19:54:14 UTC (rev 1220)
@@ -84,23 +84,17 @@
</script>
[ExchangeView.html]
-<div class="ExchangeView oblock">
- <div class="mstatus green" id="{id}">
- <h2>Exchange Status</h2>
+{status}
- <div>0 errors, 0 warnings</div>
- </div>
+<h1><img src="resource?name=exchange-36.png"> {title}</h1>
- <h1><img src="resource?name=exchange-36.png"> {title}</h1>
+<dl class="properties">
+ <dt>Name</dt><dd>{exchange_name}</dd>
+ <dt>Type</dt><dd>{type}</dd>
+</dl>
- <dl class="properties">
- <dt>Name</dt><dd>{exchange_name}</dd>
- <dt>Type</dt><dd>{type}</dd>
- </dl>
+{tabs}
- {tabs}
-</div>
-
[ExchangeBindingSet.html]
<table class="ExchangeBindingSet mobjects">
<tr>
Modified: mgmt/cumin/python/cumin/model.py
===================================================================
--- mgmt/cumin/python/cumin/model.py 2007-11-02 19:11:41 UTC (rev 1219)
+++ mgmt/cumin/python/cumin/model.py 2007-11-02 19:54:14 UTC (rev 1220)
@@ -192,6 +192,9 @@
self.name = None
+ self.errors = list()
+ self.warnings = list()
+
class Broker(ModelObject):
def __init__(self, model):
super(Broker, self).__init__(model, model.broker)
@@ -219,6 +222,9 @@
self.name = None
+ self.errors = list()
+ self.warnings = list()
+
class ConfigProperty(ModelObject):
def __init__(self, model):
super(ConfigProperty, self).__init__(model, model.config_property)
@@ -234,6 +240,9 @@
self.name = None
+ self.errors = list()
+ self.warnings = list()
+
class BrokerGroupType(ModelObject):
def __init__(self, model):
super(BrokerGroupType, self).__init__(model, model.broker_group_type)
@@ -727,6 +736,9 @@
self.address = None
+ self.errors = list()
+ self.warnings = list()
+
measure = Measurement("msgsProduced", "int")
measure.title = "Messages produced"
measure.categories = ("message", "general")
17 years, 1 month
rhmessaging commits: r1219 - mgmt/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2007-11-02 15:11:41 -0400 (Fri, 02 Nov 2007)
New Revision: 1219
Modified:
mgmt/cumin/python/cumin/exchange.py
mgmt/cumin/python/cumin/exchange.strings
mgmt/cumin/python/cumin/queue.py
mgmt/cumin/python/cumin/queue.strings
mgmt/cumin/python/cumin/widgets.py
mgmt/cumin/python/cumin/widgets.strings
Log:
Adds a reusable message/byte switch widget. Uses it to enhance the
exchange list view.
Modified: mgmt/cumin/python/cumin/exchange.py
===================================================================
--- mgmt/cumin/python/cumin/exchange.py 2007-11-02 17:32:47 UTC (rev 1218)
+++ mgmt/cumin/python/cumin/exchange.py 2007-11-02 19:11:41 UTC (rev 1219)
@@ -32,9 +32,18 @@
return exchange is self.param.get(session) and "checked=\"checked\""
class ExchangeSet(ItemSet):
+ def __init__(self, app, name):
+ super(ExchangeSet, self).__init__(app, name)
+
+ self.unit = UnitSwitch(app, "unit_switch")
+ self.add_child(self.unit)
+
def render_title(self, session, vhost):
return "Exchanges (%s)" % len(vhost.exchange_items())
+ def render_unit(self, session, vhost):
+ return self.unit.get(session) == "b" and "Bytes" or "Msgs."
+
def get_items(self, session, vhost):
return sorted_by(vhost.exchange_items())
@@ -49,18 +58,21 @@
def render_item_bindings(self, session, exchange):
return len(exchange.binding_items())
- def render_item_messages_received(self, session, exchange):
- return exchange.get_measurement("msgReceives").get_value()
+ def render_item_received(self, session, exchange):
+ unit = self.unit.get(session)
+ key = unit == "b" and "byteReceives" or "msgReceives"
+ return exchange.get_measurement(key).get_value()
- def render_item_bytes_received(self, session, exchange):
- return exchange.get_measurement("byteReceives").get_value()
+ def render_item_dropped(self, session, exchange):
+ unit = self.unit.get(session)
+ key = unit == "b" and "byteDrops" or "msgDrops"
+ return exchange.get_measurement(key).get_value()
- def render_item_messages_routed(self, session, exchange):
- return exchange.get_measurement("msgRoutes").get_value()
+ def render_item_routed(self, session, exchange):
+ unit = self.unit.get(session)
+ key = unit == "b" and "byteRoutes" or "msgRoutes"
+ return exchange.get_measurement(key).get_value()
- def render_item_bytes_routed(self, session, exchange):
- return exchange.get_measurement("byteRoutes").get_value()
-
def render_item_status(self, session, exchange):
return status(len(exchange.errors), len(exchange.warnings))
Modified: mgmt/cumin/python/cumin/exchange.strings
===================================================================
--- mgmt/cumin/python/cumin/exchange.strings 2007-11-02 17:32:47 UTC (rev 1218)
+++ mgmt/cumin/python/cumin/exchange.strings 2007-11-02 19:11:41 UTC (rev 1219)
@@ -12,15 +12,16 @@
}
[ExchangeSet.html]
-<table class="ExchangeSet mobjects">
+{unit_switch}
+
+<table class="mobjects">
<tr>
<th>Name</th>
<th class="ralign">Producers</th>
<th class="ralign">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 class="ralign">{unit} Received</th>
+ <th class="ralign">{unit} Dropped</th>
+ <th class="ralign">{unit} Routed</th>
<th>Status</th>
</tr>
@@ -32,10 +33,9 @@
<td>{item_link}</a></td>
<td class="ralign">{item_producers}</td>
<td class="ralign">{item_bindings}</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 class="ralign">{item_received}</td>
+ <td class="ralign">{item_dropped}</td>
+ <td class="ralign">{item_routed}</td>
<td>{item_status}</td>
</tr>
Modified: mgmt/cumin/python/cumin/queue.py
===================================================================
--- mgmt/cumin/python/cumin/queue.py 2007-11-02 17:32:47 UTC (rev 1218)
+++ mgmt/cumin/python/cumin/queue.py 2007-11-02 19:11:41 UTC (rev 1219)
@@ -33,29 +33,18 @@
def __init__(self, app, name):
super(QueueSet, self).__init__(app, name)
- self.unit = Parameter(app, "unit")
- self.unit.set_default("m")
- self.add_parameter(self.unit)
+ self.unit = UnitSwitch(app, "unit_switch")
+ self.add_child(self.unit)
def render_title(self, session, vhost):
return "Queues (%s)" % len(vhost.queue_items())
- def render_messages_link(self, session, vhost):
- branch = session.branch()
- self.unit.set(branch, "m")
+ def render_unit(self, session, vhost):
+ return self.unit.get(session) == "b" and "Byte" or "Msg."
- class_ = self.unit.get(session) == "m" and "selected"
+ def render_unit_plural(self, session, vhost):
+ return self.unit.get(session) == "b" and "Bytes" or "Msgs."
- return link(branch.marshal(), "Messages", class_)
-
- def render_bytes_link(self, session, vhost):
- branch = session.branch()
- self.unit.set(branch, "b")
-
- class_ = self.unit.get(session) == "b" and "selected"
-
- return link(branch.marshal(), "Bytes", class_)
-
def get_items(self, session, vhost):
return sorted_by(vhost.queue_items())
@@ -73,13 +62,13 @@
def render_item_bindings(self, session, queue):
return len(queue.binding_items())
- def render_item_enqueues(self, session, queue):
+ def render_item_enqueued(self, session, queue):
unit = self.unit.get(session)
key = unit == "b" and "byteTotalEnqueues" or "msgTotalEnqueues"
value = queue.get_measurement(key).get_rate()
return rate(value, unit == "b" and "byte" or "msg", "sec")
- def render_item_dequeues(self, session, queue):
+ def render_item_dequeued(self, session, queue):
unit = self.unit.get(session)
key = unit == "b" and "byteTotalDequeues" or "msgTotalDequeues"
value = queue.get_measurement(key).get_rate()
@@ -150,13 +139,6 @@
value = queue.get_measurement("byteDepth").get_rate()
return rate(value, "byte", "sec")
-# def render_error_info(self, session, queue):
-# return "%i %s, %i %s" % \
-# (queue.error_count,
-# queue.error_count == 1 and "error" or "errors",
-# queue.warning_count,
-# queue.warning_count == 1 and "warning" or "warnings")
-
class QueueView(Widget):
def __init__(self, app, name):
super(QueueView, self).__init__(app, name)
Modified: mgmt/cumin/python/cumin/queue.strings
===================================================================
--- mgmt/cumin/python/cumin/queue.strings 2007-11-02 17:32:47 UTC (rev 1218)
+++ mgmt/cumin/python/cumin/queue.strings 2007-11-02 19:11:41 UTC (rev 1219)
@@ -7,10 +7,7 @@
[QueueSet.html]
<form action="{href}" method="get">
- <ul class="radiotabs">
- <li>{messages_link}</li>
- <li>{bytes_link}</li>
- </ul>
+ {unit_switch}
<div class="sactions">
<h2>Act on Selected Queues:</h2>
@@ -23,10 +20,10 @@
<th>Name</th>
<th class="ralign">Consumers</th>
<th class="ralign">Exchange Bindings</th>
- <th class="ralign">Enqueues</th>
- <th class="ralign">Dequeues</th>
- <th class="ralign">Depth</th>
- <th class="ralign">Accel.</th>
+ <th class="ralign">{unit_plural} Enqueued</th>
+ <th class="ralign">{unit_plural} Dequeued</th>
+ <th class="ralign">{unit} Depth</th>
+ <th class="ralign">Depth Accel.</th>
<th>Status</th>
</tr>
@@ -40,8 +37,8 @@
<td>{item_link}</a></td>
<td class="ralign">{item_consumers}</td>
<td class="ralign">{item_bindings}</td>
- <td class="ralign">{item_enqueues}</td>
- <td class="ralign">{item_dequeues}</td>
+ <td class="ralign">{item_enqueued}</td>
+ <td class="ralign">{item_dequeued}</td>
<td class="ralign">{item_depth}</td>
<td class="ralign">{item_depth_accel}</td>
<td>{item_status}</td>
Modified: mgmt/cumin/python/cumin/widgets.py
===================================================================
--- mgmt/cumin/python/cumin/widgets.py 2007-11-02 17:32:47 UTC (rev 1218)
+++ mgmt/cumin/python/cumin/widgets.py 2007-11-02 19:11:41 UTC (rev 1219)
@@ -154,3 +154,33 @@
return "%i error%s, %i warning%s" % (error_count, ess(error_count),
warning_count, ess(warning_count))
+
+class UnitSwitch(Widget):
+ def __init__(self, app, name):
+ super(UnitSwitch, self).__init__(app, name)
+
+ self.param = Parameter(app, "param")
+ self.param.set_default("m")
+ self.add_parameter(self.param)
+
+ def get(self, session):
+ return self.param.get(session)
+
+ def set(self, session, value):
+ return self.param.set(session, value)
+
+ def render_messages_link(self, session, vhost):
+ branch = session.branch()
+ self.set(branch, "m")
+
+ class_ = self.get(session) == "m" and "selected"
+
+ return link(branch.marshal(), "Messages", class_)
+
+ def render_bytes_link(self, session, vhost):
+ branch = session.branch()
+ self.set(branch, "b")
+
+ class_ = self.get(session) == "b" and "selected"
+
+ return link(branch.marshal(), "Bytes", class_)
Modified: mgmt/cumin/python/cumin/widgets.strings
===================================================================
--- mgmt/cumin/python/cumin/widgets.strings 2007-11-02 17:32:47 UTC (rev 1218)
+++ mgmt/cumin/python/cumin/widgets.strings 2007-11-02 19:11:41 UTC (rev 1219)
@@ -19,3 +19,9 @@
<div>{status_info}</div>
</div>
+
+[UnitSwitch.html]
+<ul class="radiotabs">
+ <li>{messages_link}</li>
+ <li>{bytes_link}</li>
+</ul>
17 years, 1 month
rhmessaging commits: r1218 - mgmt/mint/xml.
by rhmessaging-commits@lists.jboss.org
Author: nunofsantos
Date: 2007-11-02 13:32:47 -0400 (Fri, 02 Nov 2007)
New Revision: 1218
Modified:
mgmt/mint/xml/MgmtSchema.xml
Log:
changes to allow for concatenated keys/references
Modified: mgmt/mint/xml/MgmtSchema.xml
===================================================================
--- mgmt/mint/xml/MgmtSchema.xml 2007-11-02 16:29:36 UTC (rev 1217)
+++ mgmt/mint/xml/MgmtSchema.xml 2007-11-02 17:32:47 UTC (rev 1218)
@@ -1,4 +1,4 @@
-<schema version="0.1" date="10/22/2007">
+<schema package="qpid">
<!--
Licensed to the Apache Software Foundation (ASF) under one
@@ -30,10 +30,10 @@
Access rights for configuration elements:
RO => Read Only
- RC => Read/Create, can be set at create time only, read-only thereafter
- RW => Read/Write
+ RC => Read/Create, can be set at create time only, read-only thereafter
+ RW => Read/Write
- If access rights are omitted for a configElement, they are assumed to be RO.
+ If access rights are omitted for a configElement, they are assumed to be RO.
-->
@@ -45,7 +45,7 @@
===============================================================
-->
<object name="system" schemaId="1">
- <configElement name="sysId" type="string"/>
+ <configElement name="sysId" index="y" type="string"/>
<!-- RT config/instrumentation TBD -->
@@ -57,19 +57,20 @@
===============================================================
-->
<object name="broker" schemaId="2">
- <configElement name="sysId" type="string" access="RO" index="y" desc="System ID"/>
- <configElement name="port" type="uint16" access="RO" desc="TCP Port for AMQP Service"/>
- <configElement name="workerThreads" type="uint16" access="RO" desc="Thread pool size"/>
- <configElement name="maxConns" type="uint16" access="RO" desc="Maximum allowed connections"/>
- <configElement name="connBacklog" type="uint16" access="RO" desc="Connection backlog limit for listening socket"/>
- <configElement name="stagingThreshold" type="uint32" access="RO" desc="Broker stages messages over this size to disk"/>
- <configElement name="storeLib" type="string" access="RO" desc="Name of persistent storage library"/>
- <configElement name="asyncStore" type="bool" access="RO" desc="Use async persistent store"/>
- <configElement name="mgmtPubInterval" type="uint16" min="1" access="RW" unit="second" desc="Interval for management broadcasts"/>
- <configElement name="initialDiskPageSize" type="uint32" access="RO" desc="Number of disk pages allocated for storage"/>
+ <configElement name="systemRef" type="string" access="RO" index="y" desc="System ID"/>
+ <configElement name="port" type="uint16" access="RO" index="y" desc="TCP Port for AMQP Service"/>
+ <configElement name="workerThreads" type="uint16" access="RO" desc="Thread pool size"/>
+ <configElement name="maxConns" type="uint16" access="RO" desc="Maximum allowed connections"/>
+ <configElement name="connBacklog" type="uint16" access="RO" desc="Connection backlog limit for listening socket"/>
+ <configElement name="stagingThreshold" type="uint32" access="RO" desc="Broker stages messages over this size to disk"/>
+ <configElement name="storeLib" type="string" access="RO" desc="Name of persistent storage library"/>
+ <configElement name="asyncStore" type="bool" access="RO" desc="Use async persistent store"/>
+ <configElement name="mgmtPubInterval" type="uint16" min="1" access="RW" unit="second" desc="Interval for management broadcasts"/>
+ <configElement name="initialDiskPageSize" type="uint32" access="RO" desc="Number of disk pages allocated for storage"/>
<configElement name="initialPagesPerQueue" type="uint32" access="RO" desc="Number of disk pages allocated per queue"/>
- <configElement name="clusterName" type="string" access="RO" desc="Name of cluster this server is a member of, zero-length for standalone server"/>
- <configElement name="version" type="string" access="RO" desc="Running software version"/>
+ <configElement name="clusterName" type="string" access="RO"
+ desc="Name of cluster this server is a member of, zero-length for standalone server"/>
+ <configElement name="version" type="string" access="RO" desc="Running software version"/>
<method name="joinCluster">
<arg name="clusterName" type="string"/>
@@ -84,7 +85,8 @@
===============================================================
-->
<object name="vhost" schemaId="3">
- <configElement name="name" type="string" access="RC" index="y"/>
+ <configElement name="brokerRef" type="string" access="RC" index="y"/>
+ <configElement name="name" type="string" access="RC" index="y"/>
</object>
<!--
@@ -93,45 +95,45 @@
===============================================================
-->
<object name="queue" schemaId="4">
- <configElement name="vhostRef" type="string" access="RC" index="y"/>
- <configElement name="name" type="string" access="RC" index="y"/>
+ <configElement name="vhostRef" type="string" access="RC" index="y"/>
+ <configElement name="name" type="string" access="RC" index="y"/>
- <configElement name="durable" type="bool" access="RC"/>
- <configElement name="autoDelete" type="bool" access="RC"/>
- <configElement name="exclusive" type="bool" access="RC"/>
+ <configElement name="durable" type="bool" access="RC"/>
+ <configElement name="autoDelete" type="bool" access="RC"/>
+ <configElement name="exclusive" type="bool" access="RC"/>
<configElement name="pageMemoryLimit" type="uint32" access="RO"/>
- <instElement name="diskPageSize" type="uint32"/>
- <instElement name="diskPages" type="uint32"/>
- <instElement name="diskAvailableSize" type="uint32"/>
+ <instElement name="diskPageSize" type="uint32"/>
+ <instElement name="diskPages" type="uint32"/>
+ <instElement name="diskAvailableSize" type="uint32"/>
- <instElement name="msgTotalEnqueues" type="uint64" unit="message" desc="Total messages enqueued"/>
- <instElement name="msgTotalDequeues" type="uint64" unit="message" desc="Total messages dequeued"/>
- <instElement name="msgTxnEnqueues" type="uint64" unit="message" desc="Transactional messages enqueued"/>
- <instElement name="msgTxnDequeues" type="uint64" unit="message" desc="Transactional messages dequeued"/>
- <instElement name="msgPersistEnqueues" type="uint64" unit="message" desc="Persistent messages enqueued"/>
- <instElement name="msgPersistDequeues" type="uint64" unit="message" desc="Persistent messages dequeued"/>
- <instElement name="msgDepth" type="uint32_wm" unit="message" desc="Current size of queue in messages"/>
- <instElement name="byteTotalEnqueues" type="uint64" unit="octet" desc="Total messages enqueued"/>
- <instElement name="byteTotalDequeues" type="uint64" unit="octet" desc="Total messages dequeued"/>
- <instElement name="byteTxnEnqueues" type="uint64" unit="octet" desc="Transactional messages enqueued"/>
- <instElement name="byteTxnDequeues" type="uint64" unit="octet" desc="Transactional messages dequeued"/>
- <instElement name="bytePersistEnqueues" type="uint64" unit="octet" desc="Persistent messages enqueued"/>
- <instElement name="bytePersistDequeues" type="uint64" unit="octet" desc="Persistent messages dequeued"/>
- <instElement name="byteDepth" type="uint32_wm" unit="octet" desc="Current size of queue in bytes"/>
- <instElement name="enqueueTxnStarts" type="uint64" unit="transaction" desc="Total enqueue transactions started "/>
- <instElement name="enqueueTxnCommits" type="uint64" unit="transaction" desc="Total enqueue transactions committed"/>
- <instElement name="enqueueTxnRejects" type="uint64" unit="transaction" desc="Total enqueue transactions rejected"/>
- <instElement name="enqueueTxnCount" type="uint32_wm" unit="transaction" desc="Current pending enqueue transactions"/>
- <instElement name="dequeueTxnStarts" type="uint64" unit="transaction" desc="Total dequeue transactions started"/>
- <instElement name="dequeueTxnCommits" type="uint64" unit="transaction" desc="Total dequeue transactions committed"/>
- <instElement name="dequeueTxnRejects" type="uint64" unit="transaction" desc="Total dequeue transactions rejected"/>
- <instElement name="dequeueTxnCount" type="uint32_wm" unit="transaction" desc="Current pending dequeue transactions"/>
- <instElement name="consumers" type="uint32_wm" unit="consumer" desc="Current consumers on queue"/>
- <instElement name="bindings" type="uint32_wm" unit="binding" desc="Current bindings"/>
- <instElement name="unackedMessages" type="uint32_wm" unit="message" desc="Messages consumed but not yet acked"/>
+ <instElement name="msgTotalEnqueues" type="uint64" unit="message" desc="Total messages enqueued"/>
+ <instElement name="msgTotalDequeues" type="uint64" unit="message" desc="Total messages dequeued"/>
+ <instElement name="msgTxnEnqueues" type="uint64" unit="message" desc="Transactional messages enqueued"/>
+ <instElement name="msgTxnDequeues" type="uint64" unit="message" desc="Transactional messages dequeued"/>
+ <instElement name="msgPersistEnqueues" type="uint64" unit="message" desc="Persistent messages enqueued"/>
+ <instElement name="msgPersistDequeues" type="uint64" unit="message" desc="Persistent messages dequeued"/>
+ <instElement name="msgDepth" type="uint32_wm" unit="message" desc="Current size of queue in messages"/>
+ <instElement name="byteTotalEnqueues" type="uint64" unit="octet" desc="Total messages enqueued"/>
+ <instElement name="byteTotalDequeues" type="uint64" unit="octet" desc="Total messages dequeued"/>
+ <instElement name="byteTxnEnqueues" type="uint64" unit="octet" desc="Transactional messages enqueued"/>
+ <instElement name="byteTxnDequeues" type="uint64" unit="octet" desc="Transactional messages dequeued"/>
+ <instElement name="bytePersistEnqueues" type="uint64" unit="octet" desc="Persistent messages enqueued"/>
+ <instElement name="bytePersistDequeues" type="uint64" unit="octet" desc="Persistent messages dequeued"/>
+ <instElement name="byteDepth" type="uint32_wm" unit="octet" desc="Current size of queue in bytes"/>
+ <instElement name="enqueueTxnStarts" type="uint64" unit="transaction" desc="Total enqueue transactions started "/>
+ <instElement name="enqueueTxnCommits" type="uint64" unit="transaction" desc="Total enqueue transactions committed"/>
+ <instElement name="enqueueTxnRejects" type="uint64" unit="transaction" desc="Total enqueue transactions rejected"/>
+ <instElement name="enqueueTxnCount" type="uint32_wm" unit="transaction" desc="Current pending enqueue transactions"/>
+ <instElement name="dequeueTxnStarts" type="uint64" unit="transaction" desc="Total dequeue transactions started"/>
+ <instElement name="dequeueTxnCommits" type="uint64" unit="transaction" desc="Total dequeue transactions committed"/>
+ <instElement name="dequeueTxnRejects" type="uint64" unit="transaction" desc="Total dequeue transactions rejected"/>
+ <instElement name="dequeueTxnCount" type="uint32_wm" unit="transaction" desc="Current pending dequeue transactions"/>
+ <instElement name="consumers" type="uint32_wm" unit="consumer" desc="Current consumers on queue"/>
+ <instElement name="bindings" type="uint32_wm" unit="binding" desc="Current bindings"/>
+ <instElement name="unackedMessages" type="uint32_wm" unit="message" desc="Messages consumed but not yet acked"/>
- <method name="purge" desc="Discard all messages on queue"/>
+ <method name="purge" desc="Discard all messages on queue"/>
<method name="increaseDiskSize" desc="Increase number of disk pages allocated for this queue">
<arg name="pages" type="uint32" desc="New total page allocation"/>
</method>
@@ -143,18 +145,18 @@
===============================================================
-->
<object name="exchange" schemaId="5">
- <configElement name="vhostRef" type="string" access="RC" index="y"/>
- <configElement name="name" type="string" access="RC" index="y"/>
- <configElement name="type" type="string" access="RC"/>
+ <configElement name="vhostRef" type="string" access="RC" index="y"/>
+ <configElement name="name" type="string" access="RC" index="y"/>
+ <configElement name="type" type="string" access="RC"/>
- <instElement name="producers" type="uint32_wm" desc="Current producers on exchange"/>
- <instElement name="bindings" type="uint32_wm" desc="Current bindings"/>
- <instElement name="msgReceives" type="uint64" desc="Total messages received"/>
- <instElement name="msgDrops" type="uint64" desc="Total messages dropped (no matching key)"/>
- <instElement name="msgRoutes" type="uint64" desc="Total routed messages"/>
- <instElement name="byteReceives" type="uint64" desc="Total bytes received"/>
- <instElement name="byteDrops" type="uint64" desc="Total bytes dropped (no matching key)"/>
- <instElement name="byteRoutes" type="uint64" desc="Total routed bytes"/>
+ <instElement name="producers" type="uint32_wm" desc="Current producers on exchange"/>
+ <instElement name="bindings" type="uint32_wm" desc="Current bindings"/>
+ <instElement name="msgReceives" type="uint64" desc="Total messages received"/>
+ <instElement name="msgDrops" type="uint64" desc="Total messages dropped (no matching key)"/>
+ <instElement name="msgRoutes" type="uint64" desc="Total routed messages"/>
+ <instElement name="byteReceives" type="uint64" desc="Total bytes received"/>
+ <instElement name="byteDrops" type="uint64" desc="Total bytes dropped (no matching key)"/>
+ <instElement name="byteRoutes" type="uint64" desc="Total routed bytes"/>
</object>
<!--
@@ -163,10 +165,10 @@
===============================================================
-->
<object name="binding" schemaId="6">
- <configElement name="queueRef" type="string" access="RC" index="y"/>
- <configElement name="exchangeRef" type="string" access="RC" index="y"/>
- <configElement name="bindingKey" type="string" access="RC"/>
- <configElement name="arguments" type="fieldTable" access="RC"/>
+ <configElement name="queueRef" type="string" access="RC" index="y"/>
+ <configElement name="exchangeRef" type="string" access="RC" index="y"/>
+ <configElement name="bindingKey" type="string" access="RC"/>
+ <configElement name="arguments" type="fieldTable" access="RC"/>
<instElement name="msgMatched" type="uint64"/>
</object>
@@ -177,13 +179,13 @@
===============================================================
-->
<object name="client" schemaId="7">
- <configElement name="vhostRef" type="string" index="y"/>
- <configElement name="ipAddr" type="ipAddress" index="y"/>
- <configElement name="port" type="uint16" index="y"/>
+ <configElement name="vhostRef" type="string" index="y"/>
+ <configElement name="ipAddr" type="ipAddress" index="y"/>
+ <configElement name="port" type="uint16" index="y"/>
- <instElement name="authIdentity" type="string"/>
- <instElement name="msgsProduced" type="uint64"/>
- <instElement name="msgsConsumed" type="uint64"/>
+ <instElement name="authIdentity" type="string"/>
+ <instElement name="msgsProduced" type="uint64"/>
+ <instElement name="msgsConsumed" type="uint64"/>
<instElement name="bytesProduced" type="uint64"/>
<instElement name="bytesConsumed" type="uint64"/>
@@ -197,12 +199,12 @@
===============================================================
-->
<object name="session" schemaId="8">
- <configElement name="vhostRef" type="string" index="y"/>
- <configElement name="name" type="string" index="y"/>
- <configElement name="clientRef" type="string" access="RO"/>
+ <configElement name="vhostRef" type="string" index="y"/>
+ <configElement name="name" type="string" index="y"/>
+ <configElement name="clientRef" type="string" access="RO"/>
<configElement name="detachedLifespan" type="uint32" access="RO"/>
- <instElement name="attached" type="bool"/>
+ <instElement name="attached" type="bool"/>
<instElement name="remainingLifespan" type="uint32"/>
<instElement name="framesOutstanding" type="uint32"/>
@@ -219,13 +221,13 @@
-->
<object name="destination" schemaId="9">
<configElement name="sessionRef" type="string" index="y"/>
- <configElement name="name" type="string" index="y"/>
+ <configElement name="name" type="string" index="y"/>
- <instElement name="flowMode" type="enum(credit,window)"/>
- <instElement name="maxMsgCredits" type="uint32"/>
- <instElement name="maxByteCredits" type="uint32"/>
+ <instElement name="flowMode" type="enum(credit,window)"/>
+ <instElement name="maxMsgCredits" type="uint32"/>
+ <instElement name="maxByteCredits" type="uint32"/>
- <instElement name="msgCredits" type="uint32"/>
+ <instElement name="msgCredits" type="uint32"/>
<instElement name="byteCredits" type="uint32"/>
<method name="throttle" desc="Apply extra rate limiting to destination: 0 = Normal, 10 = Maximum">
@@ -242,9 +244,9 @@
-->
<object name="producer" schemaId="10">
<configElement name="destinationRef" type="string" index="y"/>
- <configElement name="exchangeRef" type="string" index="y"/>
+ <configElement name="exchangeRef" type="string" index="y"/>
- <instElement name="msgsProduced" type="uint64"/>
+ <instElement name="msgsProduced" type="uint64"/>
<instElement name="bytesProduced" type="uint64"/>
</object>
@@ -254,13 +256,14 @@
===============================================================
-->
<object name="consumer" schemaId="11">
- <configElement name="destinationRef" type="string" index="y"/>
- <configElement name="queueRef" type="string" index="y"/>
+ <configElement name="destinationRef" type="string" index="y"/>
+ <configElement name="queueRef" type="string" index="y"/>
- <instElement name="msgsConsumed" type="uint64"/>
- <instElement name="bytesConsumed" type="uint64"/>
+ <instElement name="msgsConsumed" type="uint64"/>
+ <instElement name="bytesConsumed" type="uint64"/>
<instElement name="unackedMessages" type="uint32_wm" desc="Messages consumed but not yet acked"/>
<method name="close"/>
</object>
-</schema>
\ No newline at end of file
+</schema>
+
17 years, 1 month
rhmessaging commits: r1217 - mgmt/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2007-11-02 12:29:36 -0400 (Fri, 02 Nov 2007)
New Revision: 1217
Modified:
mgmt/cumin/python/cumin/broker.py
mgmt/cumin/python/cumin/broker.strings
mgmt/cumin/python/cumin/widgets.strings
Log:
Hooks broker status up to real dummy data and makes it use
CuminStatus.
Modified: mgmt/cumin/python/cumin/broker.py
===================================================================
--- mgmt/cumin/python/cumin/broker.py 2007-11-02 16:22:00 UTC (rev 1216)
+++ mgmt/cumin/python/cumin/broker.py 2007-11-02 16:29:36 UTC (rev 1217)
@@ -223,10 +223,16 @@
return value
+class BrokerStatus(CuminStatus):
+ pass
+
class BrokerView(Widget):
def __init__(self, app, name):
super(BrokerView, self).__init__(app, name)
+ self.status = BrokerStatus(app, "status")
+ self.add_child(self.status)
+
self.tabs = TabSet(app, "tabs")
self.add_child(self.tabs)
Modified: mgmt/cumin/python/cumin/broker.strings
===================================================================
--- mgmt/cumin/python/cumin/broker.strings 2007-11-02 16:22:00 UTC (rev 1216)
+++ mgmt/cumin/python/cumin/broker.strings 2007-11-02 16:29:36 UTC (rev 1217)
@@ -141,12 +141,8 @@
</script>
[BrokerView.html]
-<div class="mstatus green" id="{id}">
- <h2>Broker Status</h2>
+{status}
- <div>0 errors, 0 warnings</div>
-</div>
-
<h1>{title}</h1>
<table class="props">
Modified: mgmt/cumin/python/cumin/widgets.strings
===================================================================
--- mgmt/cumin/python/cumin/widgets.strings 2007-11-02 16:22:00 UTC (rev 1216)
+++ mgmt/cumin/python/cumin/widgets.strings 2007-11-02 16:29:36 UTC (rev 1217)
@@ -12,3 +12,10 @@
<script>
wooly.doc().elem("{id}").node.elements[1].focus();
</script>
+
+[CuminStatus.html]
+<div id="{id}" class="{class}">
+ <h2>Status</h2>
+
+ <div>{status_info}</div>
+</div>
17 years, 1 month