Эх сурвалжийг харах

HUE-4866 [editor] Do not able execute from a file when only query string is set

Romain Rigaux 9 жил өмнө
parent
commit
073fa17

+ 2 - 2
desktop/libs/notebook/src/notebook/static/notebook/js/notebook.ko.js

@@ -795,14 +795,14 @@ var EditorViewModel = (function() {
 
     self.wasBatchExecuted = ko.observable(typeof snippet.wasBatchExecuted != "undefined" && snippet.wasBatchExecuted != null ? snippet.wasBatchExecuted : false);
     self.isReady = ko.computed(function() {
-      return (self.statementType() == 'text' &&
+      return (self.statementType() == 'text' && (
           (self.isSqlDialect() && self.statement() !== '') ||
           (['jar', 'java', 'spark2', 'distcp'].indexOf(self.type()) == -1 && self.statement() !== '') ||
           (['jar', 'java'].indexOf(self.type()) != -1 && (self.properties().app_jar() != '' && self.properties().class() != '')) ||
           (['spark2'].indexOf(self.type()) != -1 && self.properties().jars().length > 0) ||
           (['shell'].indexOf(self.type()) != -1 && self.properties().command_path().length > 0) ||
           (['mapreduce'].indexOf(self.type()) != -1 && self.properties().app_jar().length > 0) ||
-          (['distcp'].indexOf(self.type()) != -1 && self.properties().source_path().length > 0 && self.properties().destination_path().length > 0)) ||
+          (['distcp'].indexOf(self.type()) != -1 && self.properties().source_path().length > 0 && self.properties().destination_path().length > 0))) ||
         (self.statementType() == 'file' && self.statementPath().length > 0);
     });
     self.lastExecuted = ko.observable(typeof snippet.lastExecuted != "undefined" && snippet.lastExecuted != null ? snippet.lastExecuted : 0);