Author: justi9
Date: 2007-12-11 16:45:52 -0500 (Tue, 11 Dec 2007)
New Revision: 1457
Modified:
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/formats.py
mgmt/cumin/python/cumin/queue.py
mgmt/cumin/python/cumin/queue.strings
mgmt/notes/justin-todo.txt
Log:
Connects q,e, and c timestamps to the real data. Makes their
rendering a little prettier and more straightforward.
Modified: mgmt/cumin/python/cumin/client.py
===================================================================
--- mgmt/cumin/python/cumin/client.py 2007-12-11 21:04:27 UTC (rev 1456)
+++ mgmt/cumin/python/cumin/client.py 2007-12-11 21:45:52 UTC (rev 1457)
@@ -123,13 +123,14 @@
return client.ipAddr
def render_auth_id(self, session, client):
- return "e50e7dcaa8d6a039a"
+ return "e50e7dcaa8d6a039a" #XXX get rid of this
- def render_created_deleted(self, session, queue):
- return "%s - %s" % (fmt_datetime(datetime.utcnow()), "")
+ def render_created_deleted(self, session, client):
+ return "%s – %s" % (fmt_datetime(client.creationTime),
+ fmt_datetime(client.deletionTime))
- def render_updated(self, session, queue):
- return fmt_datetime(datetime.utcnow())
+ def render_updated(self, session, client):
+ return fmt_datetime(client.recTime)
class ClientStatistics(TabSet):
def __init__(self, app, name):
Modified: mgmt/cumin/python/cumin/client.strings
===================================================================
--- mgmt/cumin/python/cumin/client.strings 2007-12-11 21:04:27 UTC (rev 1456)
+++ mgmt/cumin/python/cumin/client.strings 2007-12-11 21:45:52 UTC (rev 1457)
@@ -103,7 +103,7 @@
<table class="props">
<tr><th>Address</th><td>{address}</td></tr>
<tr><th>Auth. ID</th><td>{auth_id}</td></tr>
- <tr><th>Created -
Deleted</th><td>{created_deleted}</td></tr>
+ <tr><th>Created –
Deleted</th><td>{created_deleted}</td></tr>
<tr><th>Updated</th><td>{updated}</td></tr>
<tr>
<th class="actions" colspan="2">
Modified: mgmt/cumin/python/cumin/exchange.py
===================================================================
--- mgmt/cumin/python/cumin/exchange.py 2007-12-11 21:04:27 UTC (rev 1456)
+++ mgmt/cumin/python/cumin/exchange.py 2007-12-11 21:45:52 UTC (rev 1457)
@@ -197,11 +197,12 @@
else:
return exchange.type
- def render_created_deleted(self, session, queue):
- return "%s - %s" % (fmt_datetime(datetime.utcnow()), "")
+ def render_created_deleted(self, session, exchange):
+ return "%s – %s" % (fmt_datetime(exchange.creationTime),
+ fmt_datetime(exchange.deletionTime))
- def render_updated(self, session, queue):
- return fmt_datetime(datetime.utcnow())
+ def render_updated(self, session, exchange):
+ return fmt_datetime(exchange.recTime)
class ExchangeBindingSet(ItemSet):
def get_title(self, session, exchange):
Modified: mgmt/cumin/python/cumin/exchange.strings
===================================================================
--- mgmt/cumin/python/cumin/exchange.strings 2007-12-11 21:04:27 UTC (rev 1456)
+++ mgmt/cumin/python/cumin/exchange.strings 2007-12-11 21:45:52 UTC (rev 1457)
@@ -162,7 +162,7 @@
<table class="props">
<tr><th>Name</th><td>{name}</td></tr>
<tr><th>Type</th><td>{type}</td></tr>
- <tr><th>Created -
Deleted</th><td>{created_deleted}</td></tr>
+ <tr><th>Created –
Deleted</th><td>{created_deleted}</td></tr>
<tr><th>Updated</th><td>{updated}</td></tr>
</table>
Modified: mgmt/cumin/python/cumin/formats.py
===================================================================
--- mgmt/cumin/python/cumin/formats.py 2007-12-11 21:04:27 UTC (rev 1456)
+++ mgmt/cumin/python/cumin/formats.py 2007-12-11 21:45:52 UTC (rev 1457)
@@ -7,8 +7,13 @@
return "<span class=\"count\">(%i)</count>" % count
def fmt_datetime(dtime):
- return dtime.strftime("%d %b %Y %H:%M")
+ if dtime:
+ tstamp = dtime.strftime("%d %b %Y %H:%M")
+ else:
+ tstamp = fmt_none()
+ return tstamp
+
# XXX change this to millis or nanos? whatever python wants to give us
def fmt_duration(secs):
"""Takes a duration in seconds, which can be a
float"""
Modified: mgmt/cumin/python/cumin/queue.py
===================================================================
--- mgmt/cumin/python/cumin/queue.py 2007-12-11 21:04:27 UTC (rev 1456)
+++ mgmt/cumin/python/cumin/queue.py 2007-12-11 21:45:52 UTC (rev 1457)
@@ -202,10 +202,11 @@
return fmt_predicate(queue.exclusive)
def render_created_deleted(self, session, queue):
- return "%s - %s" % (fmt_datetime(datetime.utcnow()), "")
+ return "%s – %s" % (fmt_datetime(queue.creationTime),
+ fmt_datetime(queue.deletionTime))
def render_updated(self, session, queue):
- return fmt_datetime(datetime.utcnow())
+ return fmt_datetime(queue.recTime)
def render_purge_href(self, session, queue):
branch = session.branch()
Modified: mgmt/cumin/python/cumin/queue.strings
===================================================================
--- mgmt/cumin/python/cumin/queue.strings 2007-12-11 21:04:27 UTC (rev 1456)
+++ mgmt/cumin/python/cumin/queue.strings 2007-12-11 21:45:52 UTC (rev 1457)
@@ -177,7 +177,7 @@
<tr><th>Name</th><td>{name}</td></tr>
<tr><th>Durable?</th><td>{durable}</td></tr>
<tr><th>Exclusive?</th><td>{exclusive}</td></tr>
- <tr><th>Created -
Deleted</th><td>{created_deleted}</td></tr>
+ <tr><th>Created –
Deleted</th><td>{created_deleted}</td></tr>
<tr><th>Updated</th><td>{updated}</td></tr>
<tr>
<th class="actions" colspan="2">
Modified: mgmt/notes/justin-todo.txt
===================================================================
--- mgmt/notes/justin-todo.txt 2007-12-11 21:04:27 UTC (rev 1456)
+++ mgmt/notes/justin-todo.txt 2007-12-11 21:45:52 UTC (rev 1457)
@@ -2,14 +2,8 @@
* "purge messages from queues"
- * "purge messages from queue"
-
- * Make mini status tables a little prettier
-
* Add legends to charts
- * Make sure queue accel. a proper rate value
-
* Better demo data
* Make group slider in broker browser work
@@ -26,8 +20,6 @@
* Put broker connects on their own, separate thread so they do not
delay startup
- * Connect queue, exchange, and broker dates to the data
-
* Render stats without values as something other than 0, say a --
* Render the "" exchange as "Default"
@@ -42,6 +34,8 @@
Deferred
+ * Make mini status tables a little prettier
+
* Add queue journal stats
* Queue: Add a msg enq rate msg deq rate chart