incubator-chukwa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ey...@apache.org
Subject svn commit: r774552 - in /hadoop/chukwa/trunk/src: java/org/apache/hadoop/chukwa/hicc/Chart.java web/hicc/js/flot.extend.js
Date Wed, 13 May 2009 21:58:36 GMT
Author: eyang
Date: Wed May 13 21:58:35 2009
New Revision: 774552

URL: http://svn.apache.org/viewvc?rev=774552&view=rev
Log:
CHUKWA-82. Fixed Legend redraw. (Terence Kwan via Eric Yang)

Modified:
    hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/hicc/Chart.java
    hadoop/chukwa/trunk/src/web/hicc/js/flot.extend.js

Modified: hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/hicc/Chart.java
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/hicc/Chart.java?rev=774552&r1=774551&r2=774552&view=diff
==============================================================================
--- hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/hicc/Chart.java (original)
+++ hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/hicc/Chart.java Wed May 13 21:58:35
2009
@@ -231,7 +231,8 @@
           + "</center></div>\n");
       output.append("<div id=\"placeholder\" style=\"width:" + this.width
           + "px;height:" + this.height + "px;\"></div>\n");
-      output.append("<center><div id=\"placeholderLegend\"></div></center>\n");
+      output.append("<center><div id=\"placeholderLegend\" style=\"display:"+(legend?"block":"none")+";\"></div></center>\n");
+      output.append("<center><div id=\"statisLegend\" style=\"display:"+(legend?"block":"none")+";\"></div></center>\n");
       output.append("<center><div id=\"statisLegend\" style=\"display:"+(legend?"block":"none")+";\"></div></center>\n");
       output.append("<input type=\"hidden\" id=\"boxId\" value=\"iframe"
           + this.id + "\">\n");
@@ -432,7 +433,6 @@
     output.append(" ];\n");
     if (request != null && xf.getParameter("format") == null) {
 	output.append("$(document).ready(function() { \n");	
-	output.append("   calculateStatis();\n");
 	output.append("   wholePeriod();\n");
 	output.append("   $(window).resize(function() { wholePeriod(); });\n");
 	output.append("});\n");

Modified: hadoop/chukwa/trunk/src/web/hicc/js/flot.extend.js
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/src/web/hicc/js/flot.extend.js?rev=774552&r1=774551&r2=774552&view=diff
==============================================================================
--- hadoop/chukwa/trunk/src/web/hicc/js/flot.extend.js (original)
+++ hadoop/chukwa/trunk/src/web/hicc/js/flot.extend.js Wed May 13 21:58:35 2009
@@ -120,6 +120,8 @@
   document.getElementById('placeholder').style.width=cw+'px';
   document.getElementById('placeholder').style.height=ch+'px';
   $.plot($("#placeholder"), _series, _options);
+  // update statis
+  calculateStatis();
   total_height=height+$("#placeholderTitle").height();
   if (_options.legend.show) {
     total_height+=$("#placeholderLegend").height();



Mime
View raw message