Author: justi9
Date: 2007-11-06 11:12:13 -0500 (Tue, 06 Nov 2007)
New Revision: 1243
Modified:
mgmt/cumin/python/cumin/client.py
mgmt/cumin/python/cumin/client.strings
mgmt/notes/justin-todo.txt
Log:
Adds a sessions column to the clients list.
Modified: mgmt/cumin/python/cumin/client.py
===================================================================
--- mgmt/cumin/python/cumin/client.py 2007-11-06 15:59:13 UTC (rev 1242)
+++ mgmt/cumin/python/cumin/client.py 2007-11-06 16:12:13 UTC (rev 1243)
@@ -21,8 +21,11 @@
self.page().show_client(branch, client).show_view(branch)
return fmt_olink(branch, client.address)
- def render_item_status(self, session, client):
- return fmt_status(len(client.errors), len(client.warnings))
+ def render_item_sessions(self, session, client):
+ branch = session.branch()
+ frame = self.page().show_client(branch, client)
+ frame.show_view(branch).show_sessions(branch)
+ return fmt_link(branch.marshal(), len(client.session_items()))
def render_item_messages_produced(self, session, client):
return client.get_measurement("msgsProduced").get_value()
@@ -36,6 +39,9 @@
def render_item_bytes_consumed(self, session, client):
return client.get_measurement("bytesConsumed").get_value()
+ def render_item_status(self, session, client):
+ return fmt_status(len(client.errors), len(client.warnings))
+
class ClientFrame(CuminFrame):
def __init__(self, app, name):
super(ClientFrame, self).__init__(app, name)
@@ -65,8 +71,13 @@
self.add_child(self.tabs)
self.tabs.add_tab(ClientStatistics(app, "stats"))
- self.tabs.add_tab(ClientSessionSet(app, "bindings"))
+ self.sessions = ClientSessionSet(app, "sessions")
+ self.tabs.add_tab(self.sessions)
+
+ def show_sessions(self, session):
+ return self.tabs.show_mode(session, self.sessions)
+
def render_title(self, session, client):
return "Client '%s'" % client.address
Modified: mgmt/cumin/python/cumin/client.strings
===================================================================
--- mgmt/cumin/python/cumin/client.strings 2007-11-06 15:59:13 UTC (rev 1242)
+++ mgmt/cumin/python/cumin/client.strings 2007-11-06 16:12:13 UTC (rev 1243)
@@ -10,6 +10,7 @@
<tr>
<th><input type="checkbox"/></th>
<th>Address</th>
+ <th class="ralign">Sessions</th>
<th class="ralign">Msgs. Produced</th>
<th class="ralign">Bytes Produced</th>
<th class="ralign">Msgs. Consumed</th>
@@ -25,6 +26,7 @@
<tr>
<td><input type="checkbox"/></td>
<td>{item_link}</td>
+ <td class="ralign">{item_sessions}</td>
<td class="ralign">{item_messages_produced}</td>
<td class="ralign">{item_messages_consumed}</td>
<td class="ralign">{item_bytes_produced}</td>
Modified: mgmt/notes/justin-todo.txt
===================================================================
--- mgmt/notes/justin-todo.txt 2007-11-06 15:59:13 UTC (rev 1242)
+++ mgmt/notes/justin-todo.txt 2007-11-06 16:12:13 UTC (rev 1243)
@@ -18,6 +18,8 @@
in the render_title calls. Perhaps introduce a get_title to solve
this.
+ * Display the unit for session remaining lifespan
+
Deferred
* Make the status lights also be links to an appropriate view
Show replies by date