Author: justi9
Date: 2007-11-06 13:56:24 -0500 (Tue, 06 Nov 2007)
New Revision: 1252
Modified:
mgmt/cumin/python/cumin/__init__.py
mgmt/cumin/python/cumin/client.py
mgmt/cumin/python/cumin/client.strings
mgmt/notes/justin-todo.txt
Log:
Adds charts for clients.
Modified: mgmt/cumin/python/cumin/__init__.py
===================================================================
--- mgmt/cumin/python/cumin/__init__.py 2007-11-06 18:38:06 UTC (rev 1251)
+++ mgmt/cumin/python/cumin/__init__.py 2007-11-06 18:56:24 UTC (rev 1252)
@@ -12,6 +12,7 @@
from page import CuminPage
from queue import QueueXmlPage, QueueChartPage
from exchange import ExchangeChartPage
+from client import ClientChartPage
class Cumin(Application):
def __init__(self, model):
@@ -37,6 +38,7 @@
self.add_page(QueueXmlPage(self, "queue.xml"))
self.add_page(QueueChartPage(self, "queue.png"))
self.add_page(ExchangeChartPage(self, "exchange.png"))
+ self.add_page(ClientChartPage(self, "client.png"))
class RandomIntegerPage(Page):
def __init__(self, app, name):
Modified: mgmt/cumin/python/cumin/client.py
===================================================================
--- mgmt/cumin/python/cumin/client.py 2007-11-06 18:38:06 UTC (rev 1251)
+++ mgmt/cumin/python/cumin/client.py 2007-11-06 18:56:24 UTC (rev 1252)
@@ -125,6 +125,14 @@
def render_title(self, session, client):
return "History"
+ def render_produced_chart_url(self, session, client):
+ return "client.png?id=%i;m=msgsProduced;m=bytesProduced" \
+ % client.id
+
+ def render_consumed_chart_url(self, session, client):
+ return "client.png?id=%i;m=msgsConsumed;m=bytesConsumed" \
+ % client.id
+
class ClientSessionSet(ItemSet):
def render_title(self, session, client):
return "Sessions (%i)" % len(client.session_items())
@@ -148,3 +156,11 @@
def render_item_status(self, session, session_):
return fmt_status(len(session_.errors), len(session_.warnings))
+
+class ClientChartPage(CuminChartPage):
+ def __init__(self, app, name):
+ super(ClientChartPage, self).__init__(app, name)
+
+ self.client = ClientParameter(app, "id")
+ self.add_parameter(self.client)
+ self.set_object_parameter(self.client)
Modified: mgmt/cumin/python/cumin/client.strings
===================================================================
--- mgmt/cumin/python/cumin/client.strings 2007-11-06 18:38:06 UTC (rev 1251)
+++ mgmt/cumin/python/cumin/client.strings 2007-11-06 18:56:24 UTC (rev 1252)
@@ -69,6 +69,17 @@
</tr>
</table>
+[StatisticsHistory.html]
+<h2>Produced</h2>
+<div class="iblock chart">
+ <img src="{produced_chart_url}"/>
+</div>
+
+<h2>Consumed</h2>
+<div class="iblock chart">
+ <img src="{consumed_chart_url}"/>
+</div>
+
[ClientSessionSet.html]
<div class="sactions">
<h2>Act on Selected Sessions:</h2>
Modified: mgmt/notes/justin-todo.txt
===================================================================
--- mgmt/notes/justin-todo.txt 2007-11-06 18:38:06 UTC (rev 1251)
+++ mgmt/notes/justin-todo.txt 2007-11-06 18:56:24 UTC (rev 1252)
@@ -15,7 +15,7 @@
in the render_title calls. Perhaps introduce a get_title to solve
this.
- * Add charts for clients
+ * Remove the extra pages we no longer use
Deferred
Show replies by date