Author: croberts
Date: 2012-11-30 19:15:55 +0000 (Fri, 30 Nov 2012)
New Revision: 5557
Modified:
trunk/cumin/python/cumin/stat.py
trunk/cumin/resources/app.js
Log:
BZ 880675: Fixing charts for older versions of python. Older version of python would put
True/False in the charts json output which isn't ideal for JavaScript to pickup. Our
solution is to send 0/1 in the output which will be interpreted by the JS as false/true.
This will work for all supported systems.
Modified: trunk/cumin/python/cumin/stat.py
===================================================================
--- trunk/cumin/python/cumin/stat.py 2012-11-30 16:14:16 UTC (rev 5556)
+++ trunk/cumin/python/cumin/stat.py 2012-11-30 19:15:55 UTC (rev 5557)
@@ -922,7 +922,11 @@
chart = self.get_chart(session, adapter, stats, samples, time_span, max_value,
min_value, append, end_seconds_ago)
#print "**********\n"+chart.create()
chart.graph_div = "%s_chart" % chart.id.replace(".",
"_")
- chart.stackSeries = self.stackSeries
+ # doing this the ugly way for python 2.4
+ if self.stackSeries == True:
+ chart.stackSeries = 1
+ else:
+ chart.stackSeries = 0
return chart.create()
def get_y_labels(self, absy, intervals, step):
Modified: trunk/cumin/resources/app.js
===================================================================
--- trunk/cumin/resources/app.js 2012-11-30 16:14:16 UTC (rev 5556)
+++ trunk/cumin/resources/app.js 2012-11-30 19:15:55 UTC (rev 5557)
@@ -587,7 +587,7 @@
dataContainer['x_axis_values'] = dataContainer['x_axis_values']
.append([ json.x_axis.labels.labels[i].text ]);
}
- dataContainer['stackSeries'] = json.stackSeries;
+ dataContainer['stackSeries'] = json.stackSeries == 1 ? true:false;
return dataContainer;
}
Show replies by date