chukwa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From asrab...@apache.org
Subject svn commit: r1033677 - in /incubator/chukwa/trunk: CHANGES.txt src/web/hicc/jsp/chart.jsp src/web/hicc/jsp/graph_explorer.jsp
Date Wed, 10 Nov 2010 19:44:37 GMT
Author: asrabkin
Date: Wed Nov 10 19:44:37 2010
New Revision: 1033677

URL: http://svn.apache.org/viewvc?rev=1033677&view=rev
Log:
CHUKWA-547. Adjustable Axes on HICC graphs. Contributed by Michael Chang.

Modified:
    incubator/chukwa/trunk/CHANGES.txt
    incubator/chukwa/trunk/src/web/hicc/jsp/chart.jsp
    incubator/chukwa/trunk/src/web/hicc/jsp/graph_explorer.jsp

Modified: incubator/chukwa/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/chukwa/trunk/CHANGES.txt?rev=1033677&r1=1033676&r2=1033677&view=diff
==============================================================================
--- incubator/chukwa/trunk/CHANGES.txt (original)
+++ incubator/chukwa/trunk/CHANGES.txt Wed Nov 10 19:44:37 2010
@@ -24,6 +24,8 @@ Trunk (unreleased changes)
 
   IMPROVEMENTS
 
+    CHUKWA-547. Adjustable Axes on HICC graphs. (Michael Chang via asrabkin)
+
     CHUKWA-548. Gray out options with no data. (Michael Chang via asrabkin)
 
     CHUKWA-546. SocketAdaptor. (Eric Yang via asrabkin)

Modified: incubator/chukwa/trunk/src/web/hicc/jsp/chart.jsp
URL: http://svn.apache.org/viewvc/incubator/chukwa/trunk/src/web/hicc/jsp/chart.jsp?rev=1033677&r1=1033676&r2=1033677&view=diff
==============================================================================
--- incubator/chukwa/trunk/src/web/hicc/jsp/chart.jsp (original)
+++ incubator/chukwa/trunk/src/web/hicc/jsp/chart.jsp Wed Nov 10 19:44:37 2010
@@ -97,6 +97,17 @@
       c.setXAxisLabel("Time");
     }
 
+    // set ymin and ymax
+    // TODO: check that these are numbers
+    if (request.getParameter("ymin") != null && 
+        request.getParameter("ymin").length() != 0) {
+      c.setYMin(new Double(xf.getParameter("ymin")));
+    }
+    if (request.getParameter("ymax") != null &&
+        request.getParameter("ymax").length() != 0) {
+      c.setYMax(new Double(xf.getParameter("ymax")));
+    }
+
     /*
      * Setup y axis display.
      */

Modified: incubator/chukwa/trunk/src/web/hicc/jsp/graph_explorer.jsp
URL: http://svn.apache.org/viewvc/incubator/chukwa/trunk/src/web/hicc/jsp/graph_explorer.jsp?rev=1033677&r1=1033676&r2=1033677&view=diff
==============================================================================
--- incubator/chukwa/trunk/src/web/hicc/jsp/graph_explorer.jsp (original)
+++ incubator/chukwa/trunk/src/web/hicc/jsp/graph_explorer.jsp Wed Nov 10 19:44:37 2010
@@ -139,7 +139,9 @@
         url[i] = "/hicc/v1/metrics/series/" + $('#table').val() + "/" + data[i] + "/rowkey/"
+ $('#row').val();
       } 
       var title = $('#title').val();
-      $('#graph').attr('src', "/hicc/jsp/chart.jsp?title="+title+"&data="+url.join("&data="));
+      var ymin = $('#ymin').val();
+      var ymax = $('#ymax').val();
+      $('#graph').attr('src', "/hicc/jsp/chart.jsp?title="+title+"&ymin="+ymin+"&ymax="+ymax+"&data="+url.join("&data="));
       $('#graph').load(function() {
         doIframe();
       });
@@ -177,6 +179,10 @@
             <select id="row" size="10">
             </select>
           </td>
+          <td>
+            Y-axis Min: <input type="text" id="ymin" /><br />
+            Y-axis Max: <input type="text" id="ymax" /><br />
+          </td>
         </tr>
         <tr>
           <td>



Mime
View raw message