asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ti...@apache.org
Subject asterixdb git commit: Encode queries with encodeURIComponent()
Date Mon, 13 Feb 2017 22:03:05 GMT
Repository: asterixdb
Updated Branches:
  refs/heads/master cf01bdb28 -> 40b2808ea


Encode queries with encodeURIComponent()

Change-Id: I6a04445b22258d9cc3bb258f60e91ed970e85d6a
Reviewed-on: https://asterix-gerrit.ics.uci.edu/1497
Sonar-Qube: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Ian Maxon <imaxon@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/asterixdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/asterixdb/commit/40b2808e
Tree: http://git-wip-us.apache.org/repos/asf/asterixdb/tree/40b2808e
Diff: http://git-wip-us.apache.org/repos/asf/asterixdb/diff/40b2808e

Branch: refs/heads/master
Commit: 40b2808ea1e83ee742b13a6cb31534cb28064d1f
Parents: cf01bdb
Author: Till Westmann <tillw@apache.org>
Authored: Fri Feb 10 14:10:23 2017 -0800
Committer: Till Westmann <tillw@apache.org>
Committed: Mon Feb 13 14:01:52 2017 -0800

----------------------------------------------------------------------
 asterixdb/asterix-app/src/main/resources/queryui/js/main.js | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/asterixdb/blob/40b2808e/asterixdb/asterix-app/src/main/resources/queryui/js/main.js
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/main/resources/queryui/js/main.js b/asterixdb/asterix-app/src/main/resources/queryui/js/main.js
index 7a041f9..793c06e 100644
--- a/asterixdb/asterix-app/src/main/resources/queryui/js/main.js
+++ b/asterixdb/asterix-app/src/main/resources/queryui/js/main.js
@@ -128,7 +128,7 @@ app.controller('queryCtrl', function ($rootScope, $scope, $http, recordFunctions
     }
 
     $scope.initDataverses = function () {
-        $http.get(SERVER_HOST + "/query?query=" + encodeURI(DATAVERSE_QUERY)).then(function
(response) {
+        $http.get(SERVER_HOST + "/query?query=" + encodeURIComponent(DATAVERSE_QUERY)).then(function
(response) {
                 for (i in response.data) {
                     $scope.dataverses.push(response.data[i].DataverseName);
                     $scope.selected_dataverse = $scope.dataverses[0];
@@ -147,8 +147,9 @@ app.controller('queryCtrl', function ($rootScope, $scope, $http, recordFunctions
     $scope.query = function () {
         var timer = new Date().getTime();
         $scope.save($scope.query_input, $scope.selected_dataverse);
-        $http.get(SERVER_HOST + "/query?query=" +
-            encodeURI("use dataverse " + $scope.selected_dataverse + ";" + $scope.query_input))
+        var uri = SERVER_HOST + "/query?query=" +
+            encodeURIComponent("use dataverse " + $scope.selected_dataverse + ";" + $scope.query_input)
+        $http.get(uri)
             .then(function (response) {
                     $scope.results = response.data;
                     console.log(response);


Mime
View raw message