Author: justi9
Date: 2008-12-05 16:46:33 -0500 (Fri, 05 Dec 2008)
New Revision: 2942
Modified:
mgmt/trunk/cumin/python/cumin/model.py
Log:
Make the see-all-pools link an action instead of a property
Modified: mgmt/trunk/cumin/python/cumin/model.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/model.py 2008-12-05 21:38:06 UTC (rev 2941)
+++ mgmt/trunk/cumin/python/cumin/model.py 2008-12-05 21:46:33 UTC (rev 2942)
@@ -1871,11 +1871,6 @@
def __init__(self, model):
super(CuminPool, self).__init__(model, "pool", Pool)
- prop = self.OtherPools(self, "others")
- prop.title = "See Other Pools"
- prop.escape = False
- prop.summary = True
-
prop = CuminProperty(self, "id")
prop.title = "Collector ID"
prop.summary = True
@@ -1904,6 +1899,9 @@
action = self.VisMachine(self, "machines")
action.navigable = False
+ action = self.SeeAllPools(self, "allpools")
+ action.summary = True
+
self.fake_stats = self.FakeJobStats(self, "fakestats")
self.fake_stats.navigable = False
@@ -1924,22 +1922,15 @@
def get_icon_href(self, session):
return "resource?name=cluster-36.png"
- class OtherPools(CuminProperty):
+ class SeeAllPools(CuminAction):
def get_title(self, session):
- return ""
-
- def value(self, session, object):
+ return "See All Pools"
+
+ def get_href(self, session, object):
branch = session.branch()
self.model.frame.view.show(branch)
- href = branch.marshal()
-
- html = """
- <ul class="ActionSet">
- <li><a href="%s">%s</a></li>
- </ul>"""
- return html % (href, self.title)
-
-
+ return branch.marshal()
+
def write_stat_xml(self, session, writer, object):
record = self.fake_stats.get_stat_record(session, object)
for stat in self.stats:
Show replies by date