Author: eallen
Date: 2009-04-27 17:05:58 -0400 (Mon, 27 Apr 2009)
New Revision: 3336
Modified:
mgmt/trunk/cumin/python/cumin/grid/pool.py
mgmt/trunk/cumin/python/cumin/grid/pool.strings
Log:
Added in Collector charts
Modified: mgmt/trunk/cumin/python/cumin/grid/pool.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/grid/pool.py 2009-04-27 21:05:26 UTC (rev 3335)
+++ mgmt/trunk/cumin/python/cumin/grid/pool.py 2009-04-27 21:05:58 UTC (rev 3336)
@@ -297,6 +297,16 @@
slot_map = self.PoolSlotMap(app, "pool_slot_map")
self.add_child(slot_map)
+ chart = self.JobStackedChart(app, "jobs")
+ chart.duration.param.default = "3600"
+ chart.stats = ("RunningJobs", "IdleJobs")
+ self.add_child(chart)
+
+ chart = self.SlotStackedChart(app, "slots")
+ chart.duration.param.default = "3600"
+ chart.stats = ("HostsClaimed", "HostsUnclaimed",
"HostsOwner")
+ self.add_child(chart)
+
def render_title(self, session):
return "Overview"
@@ -304,6 +314,24 @@
pool = self.frame.get_args(session)[0]
return pool.name
+ def get_collector_args(self, session):
+ pool = self.frame.get_args(session)[0]
+ return Collector.select("pool='%s'" % pool.id)
+
+ class JobStackedChart(StatStackedChart):
+ def render_title(self, session, *args):
+ return "Job Status"
+
+ def get_args(self, session):
+ return self.parent.get_collector_args(session)
+
+ class SlotStackedChart(StatStackedChart):
+ def render_title(self, session, *args):
+ return "Slot State"
+
+ def get_args(self, session):
+ return self.parent.get_collector_args(session)
+
class GridStats(Widget):
def __init__(self, app, name):
super(PoolStats.GridStats, self).__init__(app, name)
Modified: mgmt/trunk/cumin/python/cumin/grid/pool.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/grid/pool.strings 2009-04-27 21:05:26 UTC (rev 3335)
+++ mgmt/trunk/cumin/python/cumin/grid/pool.strings 2009-04-27 21:05:58 UTC (rev 3336)
@@ -63,6 +63,8 @@
</div>
<div class="col2">
{pool_slot_map}
+ {jobs}
+ {slots}
</div>
</div>
<div style="clear:left;"><!-- --></div>
Show replies by date