[rhmessaging-commits] rhmessaging commits: r1483 - in mgmt: notes and 1 other directory.
rhmessaging-commits at lists.jboss.org
rhmessaging-commits at lists.jboss.org
Thu Dec 13 16:09:41 EST 2007
Author: justi9
Date: 2007-12-13 16:09:41 -0500 (Thu, 13 Dec 2007)
New Revision: 1483
Modified:
mgmt/cumin/python/cumin/client.py
mgmt/cumin/python/cumin/client.strings
mgmt/cumin/python/cumin/formats.py
mgmt/cumin/python/cumin/model.py
mgmt/notes/justin-todo.txt
Log:
Changes to stats to reflect broker side changes.
Fixes the client page icon.
Modified: mgmt/cumin/python/cumin/client.py
===================================================================
--- mgmt/cumin/python/cumin/client.py 2007-12-13 20:25:38 UTC (rev 1482)
+++ mgmt/cumin/python/cumin/client.py 2007-12-13 21:09:41 UTC (rev 1483)
@@ -48,17 +48,17 @@
frame.show_view(branch).show_sessions(branch)
return fmt_link(branch.marshal(), len(client.sessions))
- def render_item_produced(self, session, client):
+ def render_item_from(self, session, client):
unit = self.unit.get(session)
- key = unit == "b" and "bytesProduced" or "msgsProduced"
+ key = unit == "b" and "bytesFromClient" or "framesFromClient"
value = self.app.model.client.get_stat(key).rate(client)
- return fmt_rate(value, unit == "b" and "byte" or "msg", "sec")
+ return fmt_rate(value, unit == "b" and "byte" or "frame", "sec")
- def render_item_consumed(self, session, client):
+ def render_item_to(self, session, client):
unit = self.unit.get(session)
- key = unit == "b" and "bytesConsumed" or "msgsConsumed"
+ key = unit == "b" and "bytesToClient" or "framesToClient"
value = self.app.model.client.get_stat(key).rate(client)
- return fmt_rate(value, unit == "b" and "byte" or "msg", "sec")
+ return fmt_rate(value, unit == "b" and "byte" or "frame", "sec")
def render_item_status(self, session, client):
return fmt_ostatus(client)
@@ -115,20 +115,20 @@
return "No, Cancel"
class ClientStatus(CuminStatus):
- def render_messages_produced(self, session, client):
- stat = self.app.model.client.get_stat("msgsProduced")
- return fmt_rate(stat.rate(client), "msg", "sec")
+ def render_frames_from(self, session, client):
+ stat = self.app.model.client.get_stat("framesFromClient")
+ return fmt_rate(stat.rate(client), "frame", "sec")
- def render_messages_consumed(self, session, client):
- stat = self.app.model.client.get_stat("msgsConsumed")
- return fmt_rate(stat.rate(client), "msg", "sec")
+ def render_frames_to(self, session, client):
+ stat = self.app.model.client.get_stat("framesToClient")
+ return fmt_rate(stat.rate(client), "frame", "sec")
- def render_bytes_produced(self, session, client):
- stat = self.app.model.client.get_stat("bytesProduced")
+ def render_bytes_from(self, session, client):
+ stat = self.app.model.client.get_stat("bytesFromClient")
return fmt_rate(stat.rate(client), "byte", "sec")
- def render_bytes_consumed(self, session, client):
- stat = self.app.model.client.get_stat("bytesConsumed")
+ def render_bytes_to(self, session, client):
+ stat = self.app.model.client.get_stat("bytesToClient")
return fmt_rate(stat.rate(client), "byte", "sec")
class ClientView(Widget):
@@ -197,11 +197,11 @@
return "History"
def render_produced_chart_url(self, session, client):
- return "client.png?id=%i;s=msgsProduced;s=bytesProduced" \
+ return "client.png?id=%i;s=framesFromClient;s=bytesFromClient" \
% client.id
def render_consumed_chart_url(self, session, client):
- return "client.png?id=%i;s=msgsConsumed;s=bytesConsumed" \
+ return "client.png?id=%i;s=framesToClient;s=bytesToClient" \
% client.id
class ClientSessionSet(ItemSet):
Modified: mgmt/cumin/python/cumin/client.strings
===================================================================
--- mgmt/cumin/python/cumin/client.strings 2007-12-13 20:25:38 UTC (rev 1482)
+++ mgmt/cumin/python/cumin/client.strings 2007-12-13 21:09:41 UTC (rev 1483)
@@ -13,8 +13,8 @@
<th><input type="checkbox"/></th>
<th>Address</th>
<th class="ralign">Sessions</th>
- <th class="ralign">{unit_plural} Produced</th>
- <th class="ralign">{unit_plural} Consumed</th>
+ <th class="ralign">{unit_plural} Sent</th>
+ <th class="ralign">{unit_plural} Received</th>
<th>Status</th>
</tr>
@@ -27,8 +27,8 @@
<td><input type="checkbox"/></td>
<td>{item_link}</td>
<td class="ralign">{item_sessions}</td>
- <td class="ralign">{item_produced}</td>
- <td class="ralign">{item_consumed}</td>
+ <td class="ralign">{item_from}</td>
+ <td class="ralign">{item_to}</td>
<td>{item_status}</td>
</tr>
@@ -40,8 +40,8 @@
var sdata = {
"tr": [
null,
- {"td": [s.msgsProduced.rate, s.bytesProduced.rate]},
- {"td": [s.msgsConsumed.rate, s.bytesConsumed.rate]}
+ {"td": [s.framesFromClient.rate, s.bytesFromClient.rate]},
+ {"td": [s.framesToClient.rate, s.bytesToClient.rate]}
]
};
@@ -59,18 +59,18 @@
<table>
<tr>
<th></th>
- <th style="width: 35%;" class="ralign">Messages</th>
+ <th style="width: 35%;" class="ralign">Frames</th>
<th style="width: 35%;" class="ralign">Bytes</th>
</tr>
<tr>
- <th>Produced</th>
- <td class="ralign">{messages_produced}</td>
- <td class="ralign">{bytes_produced}</td>
+ <th>Sent</th>
+ <td class="ralign">{frames_from}</td>
+ <td class="ralign">{bytes_from}</td>
</tr>
<tr>
- <th>Consumed</th>
- <td class="ralign">{messages_consumed}</td>
- <td class="ralign">{bytes_consumed}</td>
+ <th>Received</th>
+ <td class="ralign">{frames_to}</td>
+ <td class="ralign">{bytes_to}</td>
</tr>
</table>
</div>
@@ -100,7 +100,7 @@
{status}
-<h1><img src="client-36.png"/>{title}</h1>
+<h1><img src="resource?name=client-36.png"/>{title}</h1>
<table class="props">
<tr><th>Address</th><td>{address}</td></tr>
Modified: mgmt/cumin/python/cumin/formats.py
===================================================================
--- mgmt/cumin/python/cumin/formats.py 2007-12-13 20:25:38 UTC (rev 1482)
+++ mgmt/cumin/python/cumin/formats.py 2007-12-13 21:09:41 UTC (rev 1483)
@@ -89,11 +89,11 @@
def fmt_ostatus(object):
errs, warns = 0, 0
- if random() < 0.075:
- errs = 1
+ #if random() < 0.075:
+ # errs = 1
- if random() < 0.10:
- warns = 1
+ #if random() < 0.10:
+ # warns = 1
return fmt_status(errs, warns)
Modified: mgmt/cumin/python/cumin/model.py
===================================================================
--- mgmt/cumin/python/cumin/model.py 2007-12-13 20:25:38 UTC (rev 1482)
+++ mgmt/cumin/python/cumin/model.py 2007-12-13 21:09:41 UTC (rev 1483)
@@ -354,24 +354,24 @@
self.mint_stats_class = ClientStats
- stat = CuminStat(self, "bytesProduced", "int")
- stat.title = "Bytes Produced"
+ stat = CuminStat(self, "bytesFromClient", "int")
+ stat.title = "Bytes Sent"
stat.unit = "byte"
stat.categories = ("general")
- stat = CuminStat(self, "bytesConsumed", "int")
- stat.title = "Bytes Consumed"
+ stat = CuminStat(self, "bytesToClient", "int")
+ stat.title = "Bytes Received"
stat.unit = "byte"
stat.categories = ("general")
- stat = CuminStat(self, "msgsProduced", "int")
- stat.title = "Msgs. Produced"
- stat.unit = "message"
+ stat = CuminStat(self, "framesFromClient", "int")
+ stat.title = "Frames Sent"
+ stat.unit = "frame"
stat.categories = ("general")
- stat = CuminStat(self, "msgsConsumed", "int")
- stat.title = "Msgs. Produced"
- stat.unit = "message"
+ stat = CuminStat(self, "framesToClient", "int")
+ stat.title = "Frames Received"
+ stat.unit = "frame"
stat.categories = ("general")
class CuminSession(CuminClass):
Modified: mgmt/notes/justin-todo.txt
===================================================================
--- mgmt/notes/justin-todo.txt 2007-12-13 20:25:38 UTC (rev 1482)
+++ mgmt/notes/justin-todo.txt 2007-12-13 21:09:41 UTC (rev 1483)
@@ -14,16 +14,8 @@
* Add javascript for the check-all behavior
- * Email amqp-list, Jonathan, and Lana with doc requirements for mgmt
-
- * Paginate producers
-
- * Paginate consumers
-
* Paginate clients
- * Paginate sessions
-
* Deal with problem of calling method on broker that is not there
* Only put something in pending actions if the call succeeds
@@ -35,17 +27,23 @@
* Need to handle exceptions in broker connect thread, so it doesn't
stop trying
- * Add inactive state to some status lights
-
* Fix session and client naming
* Group form submit has different behaviors between hitting enter and
clicking submit
- * Add client icon
-
Deferred
+ * Add inactive state to some status lights
+
+ * Paginate producers
+
+ * Paginate consumers
+
+ * Paginate sessions
+
+ * Email amqp-list, Jonathan, and Lana with doc requirements for mgmt
+
* Ask tross to take some prints out of ManagedBroker.start
* Get rid of CuminClass.mint_stats_class
More information about the rhmessaging-commits
mailing list