Explorar o código

HUE-1958 [pig] Do not take $ sign as a parameter in regexps

Romain Rigaux %!s(int64=11) %!d(string=hai) anos
pai
achega
96a085b507

+ 2 - 1
apps/pig/static/js/pig.ko.js

@@ -66,7 +66,7 @@ var PigScript = function (pigScript) {
   };
   self.getParameters = function () {
     var params = {};
-    var variables = this.script().match(/\$\D(\w*)/g);
+    var variables = this.script().match(/\$[^\d'"](\w*)/g);
     var macro_defines = this.script().match(/define [^ ]+ \(([^\)]*)\)/gi); // no multiline
     var macro_returns = this.script().match(/returns +([^\{]*)/gi); // no multiline
 
@@ -507,6 +507,7 @@ var PigViewModel = function (props) {
 
   function callRun(script) {
     self.currentScript(script);
+    $(document).trigger("clearLogs");
     $(document).trigger("showLogs");
     $(document).trigger("running");
     $("#submitModal").modal("hide");

+ 0 - 4
desktop/core/src/desktop/lib/rest/resource.py

@@ -14,10 +14,6 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-try:
-  import json
-except ImportError:
-  import simplejson as json
 import logging
 import posixpath