You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@chukwa.apache.org by as...@apache.org on 2010/11/10 20:37:34 UTC
svn commit: r1033666 - in /incubator/chukwa/trunk: CHANGES.txt
src/web/hicc/js/flot.extend.js
Author: asrabkin
Date: Wed Nov 10 19:37:33 2010
New Revision: 1033666
URL: http://svn.apache.org/viewvc?rev=1033666&view=rev
Log:
CHUKWA-544. HICC graph should handle single series or multiple series more gracefully. Contributed by Eric Yang.
Modified:
incubator/chukwa/trunk/CHANGES.txt
incubator/chukwa/trunk/src/web/hicc/js/flot.extend.js
Modified: incubator/chukwa/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/chukwa/trunk/CHANGES.txt?rev=1033666&r1=1033665&r2=1033666&view=diff
==============================================================================
--- incubator/chukwa/trunk/CHANGES.txt (original)
+++ incubator/chukwa/trunk/CHANGES.txt Wed Nov 10 19:37:33 2010
@@ -54,6 +54,8 @@ Trunk (unreleased changes)
BUG FIXES
+ CHUKWA-544. HICC graph should handle single series or multiple series more gracefully. (Eric Yang via asrabkin)
+
CHUKWA-447. Correct time units in ExecAdaptor. (Eric Yang via asrabkin)
CHUKWA-542. Disable hbase jar download from maven, and include hicc rest api in HICC web.xml (Eric Yang)
Modified: incubator/chukwa/trunk/src/web/hicc/js/flot.extend.js
URL: http://svn.apache.org/viewvc/incubator/chukwa/trunk/src/web/hicc/js/flot.extend.js?rev=1033666&r1=1033665&r2=1033666&view=diff
==============================================================================
--- incubator/chukwa/trunk/src/web/hicc/js/flot.extend.js (original)
+++ incubator/chukwa/trunk/src/web/hicc/js/flot.extend.js Wed Nov 10 19:37:33 2010
@@ -272,12 +272,21 @@ function refresh(url, parameters) {
* Initialize data from REST API.
*/
function loadData() {
+ _chartSeriesSize=0;
for(var i=0;i<_series.length;i++) {
$.getJSON(_rest[i], function(json) {
- var name=json.name;
- _series[_chartSeriesSize].label=name
- _series[_chartSeriesSize].data=json.data;
- _chartSeriesSize++;
+ if(json.constructor.toString().indexOf("Array") != -1) {
+ for(var index=0;index<json.length;index++) {
+ _series[_chartSeriesSize].label=json[index].name;
+ _series[_chartSeriesSize].data=json[index].data;
+ _chartSeriesSize++;
+ }
+ } else {
+ var name=json.name;
+ _series[_chartSeriesSize].label=name;
+ _series[_chartSeriesSize].data=json.data;
+ _chartSeriesSize++;
+ }
wholePeriod();
});
}