[rhmessaging-commits] rhmessaging commits: r1485 - in mgmt: notes and 1 other directory.
rhmessaging-commits at lists.jboss.org
rhmessaging-commits at lists.jboss.org
Thu Dec 13 17:12:30 EST 2007
Author: justi9
Date: 2007-12-13 17:12:30 -0500 (Thu, 13 Dec 2007)
New Revision: 1485
Modified:
mgmt/cumin/python/cumin/exchange.py
mgmt/cumin/python/cumin/formats.py
mgmt/notes/justin-todo.txt
Log:
Renders the default exchange as "Default" instead of the empty string.
Fixes some misbehavior in fmt_olink.
Modified: mgmt/cumin/python/cumin/exchange.py
===================================================================
--- mgmt/cumin/python/cumin/exchange.py 2007-12-13 21:13:44 UTC (rev 1484)
+++ mgmt/cumin/python/cumin/exchange.py 2007-12-13 22:12:30 UTC (rev 1485)
@@ -63,7 +63,8 @@
def render_item_link(self, session, exchange):
branch = session.branch()
self.page().show_exchange(branch, exchange).show_view(branch)
- return fmt_olink(branch, exchange)
+ name = exchange.name or "<em>Default</em>"
+ return fmt_olink(branch, exchange, name=name)
def render_item_producers(self, session, exchange):
branch = session.branch()
@@ -126,7 +127,8 @@
return exchange
def get_title(self, session, exchange):
- return "Exchange '%s'" % exchange.name
+ return exchange.name and "Exchange '%s'" % exchange.name \
+ or "Default Exchange"
class ExchangeStatus(CuminStatus):
def render_data_url(self, session, exchange):
@@ -173,13 +175,13 @@
self.tabs.add_tab(self.bindings)
def show_producers(self, session):
- self.tabs.show_mode(session, self.producers);
+ return self.tabs.show_mode(session, self.producers);
def show_bindings(self, session):
- self.tabs.show_mode(session, self.bindings);
+ return self.tabs.show_mode(session, self.bindings);
def get_title(self, session, exchange):
- return "Exchange '%s'" % exchange.name
+ return self.parent().get_title(session, exchange)
def render_data_url(self, session, exchange):
return "exchange.xml?id=%i" % exchange.id
Modified: mgmt/cumin/python/cumin/formats.py
===================================================================
--- mgmt/cumin/python/cumin/formats.py 2007-12-13 21:13:44 UTC (rev 1484)
+++ mgmt/cumin/python/cumin/formats.py 2007-12-13 22:12:30 UTC (rev 1485)
@@ -111,9 +111,10 @@
(href, class_ and " class=\"%s\" " % class_ or " ", content)
def fmt_olink(session, object, selected=False, name=None):
- n = getattr(object, "name", name)
+ if name is None:
+ name = getattr(object, "name", fmt_none())
- if isinstance(n, basestring):
- n = fmt_shorten(n)
+ if isinstance(name, basestring):
+ name = fmt_shorten(name)
- return fmt_link(session.marshal(), n, selected and "selected")
+ return fmt_link(session.marshal(), name, selected and "selected")
Modified: mgmt/notes/justin-todo.txt
===================================================================
--- mgmt/notes/justin-todo.txt 2007-12-13 21:13:44 UTC (rev 1484)
+++ mgmt/notes/justin-todo.txt 2007-12-13 22:12:30 UTC (rev 1485)
@@ -10,8 +10,6 @@
* Render stats without values as something other than 0, say a --
- * Render the "" exchange as "Default"
-
* Add javascript for the check-all behavior
* Deal with problem of calling method on broker that is not there
@@ -30,6 +28,12 @@
* Group form submit has different behaviors between hitting enter and
clicking submit
+ * Fix client ajax
+
+ * Remove auth id for now
+
+ * Unit for clients should be frames vs. bytes
+
Deferred
* Add inactive state to some status lights
More information about the rhmessaging-commits
mailing list