浏览代码

HUE-1175 [pig] Show parameter popup in case of parameters presence

Romain Rigaux 12 年之前
父节点
当前提交
26bb197
共有 2 个文件被更改,包括 5 次插入2 次删除
  1. 1 1
      apps/pig/static/js/pig.ko.js
  2. 4 1
      desktop/libs/liboozie/src/liboozie/conf.py

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

@@ -277,7 +277,7 @@ var PigViewModel = function (props) {
 
   self.runOrShowSubmissionModal = function runOrShowSubmissionModal() {
     var script = self.currentScript();
-    if (script.getParameters().length > 0) {
+    if (! $.isEmptyObject(script.getParameters())) {
       self.submissionVariables.removeAll();
       $.each(script.getParameters(), function (key, value) {
         self.submissionVariables.push({'name': key, 'value': value});

+ 4 - 1
desktop/libs/liboozie/src/liboozie/conf.py

@@ -15,6 +15,8 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+import sys
+
 from django.utils.translation import ugettext as _, ugettext_lazy as _t
 
 from desktop.lib.conf import Config, coerce_bool, validate_path
@@ -44,7 +46,8 @@ def get_oozie_status():
   status = 'down'
 
   try:
-    status = str(get_oozie().get_oozie_status())
+    if not 'test' in sys.argv: # Avoid tests hanging
+      status = str(get_oozie().get_oozie_status())
   except:
     pass