Author: eallen
Date: 2009-07-16 08:33:53 -0400 (Thu, 16 Jul 2009)
New Revision: 3496
Modified:
mgmt/trunk/cumin/python/cumin/stat.py
Log:
Check for a value of None when calculating max and min for stacked charts
Modified: mgmt/trunk/cumin/python/cumin/stat.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/stat.py 2009-07-15 20:03:09 UTC (rev 3495)
+++ mgmt/trunk/cumin/python/cumin/stat.py 2009-07-16 12:33:53 UTC (rev 3496)
@@ -1024,6 +1024,8 @@
for dt, value, dev in samples[stat]:
if dt == last_dt:
continue
+ if value == None:
+ value = 0
last_dt = dt
if stat not in points:
points[stat] = list()
@@ -1091,7 +1093,8 @@
self.control_min = Parameter(app, "low")
ten_min_of_day = 10.0 / (24.0 * 60.0)
- self.control_min.default = str(1.0 - ten_min_of_day)
+ one_hour = 1 / 24.0
+ self.control_min.default = str(1.0 - one_hour)
self.add_parameter(self.control_min)
self.control_max = Parameter(app, "high")
Show replies by date