Author: justi9
Date: 2007-11-06 10:52:45 -0500 (Tue, 06 Nov 2007)
New Revision: 1241
Modified:
mgmt/cumin/python/cumin/exchange.py
mgmt/cumin/python/cumin/queue.py
mgmt/notes/justin-todo.txt
Log:
Makes columns in lists of queues and exchanges links to appropriate
tabs.
Modified: mgmt/cumin/python/cumin/exchange.py
===================================================================
--- mgmt/cumin/python/cumin/exchange.py 2007-11-05 22:54:56 UTC (rev 1240)
+++ mgmt/cumin/python/cumin/exchange.py 2007-11-06 15:52:45 UTC (rev 1241)
@@ -54,10 +54,16 @@
return fmt_olink(branch, exchange)
def render_item_producers(self, session, exchange):
- return len(exchange.producer_items())
+ branch = session.branch()
+ frame = self.page().show_exchange(branch, exchange)
+ frame.show_view(branch).show_producers(branch)
+ return fmt_link(branch.marshal(), len(exchange.producer_items()))
def render_item_bindings(self, session, exchange):
- return len(exchange.binding_items())
+ branch = session.branch()
+ frame = self.page().show_exchange(branch, exchange)
+ frame.show_view(branch).show_bindings(branch)
+ return fmt_link(branch.marshal(), len(exchange.binding_items()))
def render_item_received(self, session, exchange):
unit = self.unit.get(session)
Modified: mgmt/cumin/python/cumin/queue.py
===================================================================
--- mgmt/cumin/python/cumin/queue.py 2007-11-05 22:54:56 UTC (rev 1240)
+++ mgmt/cumin/python/cumin/queue.py 2007-11-06 15:52:45 UTC (rev 1241)
@@ -41,10 +41,16 @@
return queue.name
def render_item_consumers(self, session, queue):
- return queue.get_measurement("consumers").get_value()
+ branch = session.branch()
+ frame = self.page().show_queue(branch, queue)
+ frame.show_view(branch).show_consumers(branch)
+ return fmt_link(branch.marshal(), len(queue.consumer_items()))
def render_item_bindings(self, session, queue):
- return len(queue.binding_items())
+ branch = session.branch()
+ frame = self.page().show_queue(branch, queue)
+ frame.show_view(branch).show_bindings(branch)
+ return fmt_link(branch.marshal(), len(queue.binding_items()))
def render_item_enqueued(self, session, queue):
unit = self.unit.get(session)
Modified: mgmt/notes/justin-todo.txt
===================================================================
--- mgmt/notes/justin-todo.txt 2007-11-05 22:54:56 UTC (rev 1240)
+++ mgmt/notes/justin-todo.txt 2007-11-06 15:52:45 UTC (rev 1241)
@@ -1,7 +1,5 @@
Current
- * exch, queue: make consumer, producer, and bindings columns links
-
* Add ability to send a test message to a queue
* Use page attributes for session errors, redirect