[rhmessaging-commits] rhmessaging commits: r3717 - in mgmt/trunk/cumin/python/cumin: grid and 1 other directory.

rhmessaging-commits at lists.jboss.org rhmessaging-commits at lists.jboss.org
Wed Nov 18 14:49:32 EST 2009


Author: eallen
Date: 2009-11-18 14:49:32 -0500 (Wed, 18 Nov 2009)
New Revision: 3717

Modified:
   mgmt/trunk/cumin/python/cumin/grid/pool.py
   mgmt/trunk/cumin/python/cumin/widgets.py
Log:
Restore sticky pool for Grid tab using client_session

Modified: mgmt/trunk/cumin/python/cumin/grid/pool.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/grid/pool.py	2009-11-18 14:45:15 UTC (rev 3716)
+++ mgmt/trunk/cumin/python/cumin/grid/pool.py	2009-11-18 19:49:32 UTC (rev 3717)
@@ -56,7 +56,6 @@
         def render_content(self, session, data):
             pool = Identifiable(data["id"])
             href = self.page.main.grid.pool.get_href(session, pool)
-
             return fmt_link(href, data["name"])
 
     class JobsRunningColumn(SqlTableColumn):
@@ -140,6 +139,8 @@
 
     def do_process(self, session):
         self.limits.limit_count.process(session)
+        sticky = self.pool.get(session)
+        session.client_session.attributes["sticky_pool"] = sticky
 
         super(PoolView, self).do_process(session)
 

Modified: mgmt/trunk/cumin/python/cumin/widgets.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/widgets.py	2009-11-18 14:45:15 UTC (rev 3716)
+++ mgmt/trunk/cumin/python/cumin/widgets.py	2009-11-18 19:49:32 UTC (rev 3717)
@@ -73,6 +73,13 @@
         return lsess.marshal()
 
     def render_tab_href(self, session, tab):
+        if tab.name == "grid":
+            try:
+                pool = session.client_session.attributes["sticky_pool"]
+                return self.page.main.grid.pool.get_href(session, pool)
+            except KeyError:
+                pass
+
         branch = session.branch()
         tab.mode.set(branch, None)
         tab.show(branch)



More information about the rhmessaging-commits mailing list