chukwa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From asrab...@apache.org
Subject svn commit: r1036734 - in /incubator/chukwa/trunk: CHANGES.txt src/web/hicc/jsp/graph_explorer.jsp
Date Fri, 19 Nov 2010 04:16:42 GMT
Author: asrabkin
Date: Fri Nov 19 04:16:41 2010
New Revision: 1036734

URL: http://svn.apache.org/viewvc?rev=1036734&view=rev
Log:
CHUKWA-552.  Handle % signs in series names. Contributed by Michael Chang.

Modified:
    incubator/chukwa/trunk/CHANGES.txt
    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=1036734&r1=1036733&r2=1036734&view=diff
==============================================================================
--- incubator/chukwa/trunk/CHANGES.txt (original)
+++ incubator/chukwa/trunk/CHANGES.txt Fri Nov 19 04:16:41 2010
@@ -60,6 +60,8 @@ Trunk (unreleased changes)
 
   BUG FIXES
 
+    CHUKWA-552.  Handle % signs in series names. (Michael Chang via asrabkin)
+
     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)

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=1036734&r1=1036733&r2=1036734&view=diff
==============================================================================
--- incubator/chukwa/trunk/src/web/hicc/jsp/graph_explorer.jsp (original)
+++ incubator/chukwa/trunk/src/web/hicc/jsp/graph_explorer.jsp Fri Nov 19 04:16:41 2010
@@ -49,7 +49,7 @@
       $('#table').children().each(
         function() {
           var table = $(this).text();
-          $.ajax({ url: "/hicc/v1/metrics/schema/"+table, 
+          $.ajax({ url: encodeURI("/hicc/v1/metrics/schema/"+table), 
                    dataType: "json", 
                    success: checkDataLength($(this))
           });
@@ -62,7 +62,7 @@
       var size = $('#family option').size();
       $('#family').find('option').remove();
       var table = $('#table').val();
-      $.ajax({ url: "/hicc/v1/metrics/schema/"+table, dataType: "json", success: function(data){
+      $.ajax({ url: encodeURI("/hicc/v1/metrics/schema/"+table), dataType: "json", success:
function(data){
         for(var i in data) {
           $('#family').append("<option>"+data[i]+"</option>");
         }
@@ -71,7 +71,7 @@
         $('#family').children().each(
           function() {
             var family = $(this).text();
-            $.ajax({ url: "/hicc/v1/metrics/schema/"+table+"/"+family, 
+            $.ajax({ url: encodeURI("/hicc/v1/metrics/schema/"+table+"/"+family), 
                      dataType: "json", 
                      success: checkDataLength($(this))
             });
@@ -87,7 +87,7 @@
       var family = $('#family').val();
       $('#family :selected').each(function(i, selected) {
         var family = $(selected).val();
-        var url = "/hicc/v1/metrics/schema/"+table+"/"+family;
+        var url = encodeURI("/hicc/v1/metrics/schema/"+table+"/"+family);
         $.ajax({ url: url, dataType: "json", success: function(data){
           for(var i in data) {
             $('#column').append("<option>"+data[i]+"</option>");
@@ -98,7 +98,7 @@
           $('#column').children().each(
             function() {
               var column = $(this).text();
-              $.ajax({ url: "/hicc/v1/metrics/schema/"+table+"/"+family+"/"+column, 
+              $.ajax({ url: encodeURI("/hicc/v1/metrics/schema/"+table+"/"+family+"/"+column),

                        dataType: "json", 
                        success: checkDataLength($(this))
               });
@@ -112,11 +112,10 @@
       var size = $('#row option').size();
       $('#row').find('option').remove();
       var table = $('#table').val();
-      var family = $('#family').val();
       var column = $('#column').val();
       $('#column :selected').each(function(i, selected) {
         var column = $(selected).val();
-        var url = "/hicc/v1/metrics/rowkey/"+table+"/"+column;
+        var url = encodeURI("/hicc/v1/metrics/rowkey/"+table+"/"+column);
         $.ajax({ url: url, dataType: "json", success: function(data){
           for(var i in data) {
             $('#row').not(":contains('"+data[i]+"')").append("<option>"+data[i]+"</option>");
@@ -136,12 +135,13 @@
       });
       var url = [];
       for(var i in data) {
-        url[i] = "/hicc/v1/metrics/series/" + $('#table').val() + "/" + data[i] + "/rowkey/"
+ $('#row').val();
+        url[i] = encodeURI("/hicc/v1/metrics/series/" + $('#table').val() + "/" + data[i]
+ "/rowkey/" + $('#row').val());
       } 
       var title = $('#title').val();
       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="));
+      var chart_path = "/hicc/jsp/chart.jsp?title=" + title + "&ymin=" + ymin + "&ymax="
+ ymax + "&data=" + url.join("&data=")
+      $('#graph').attr('src', encodeURI(chart_path));
       $('#graph').load(function() {
         doIframe();
       });



Mime
View raw message