소스 검색

HUE-2436 [oozie and jobsub] Django-1.6: Change oozie autocomplete to return a dict

Erick Tryzelaar 11 년 전
부모
커밋
32993e2
3개의 변경된 파일5개의 추가작업 그리고 5개의 파일을 삭제
  1. 2 2
      apps/jobsub/src/jobsub/templates/designs.mako
  2. 2 2
      apps/oozie/src/oozie/templates/editor/edit_workflow.mako
  3. 1 1
      apps/oozie/src/oozie/views/api.py

+ 2 - 2
apps/jobsub/src/jobsub/templates/designs.mako

@@ -947,8 +947,8 @@ $(document).ready(function(e) {
 
   // load the autocomplete properties
   var AUTOCOMPLETE_PROPERTIES;
-  $.getJSON("${ url('oozie:autocomplete_properties') }", function (properties) {
-    AUTOCOMPLETE_PROPERTIES = properties;
+  $.getJSON("${ url('oozie:autocomplete_properties') }", function (data) {
+    AUTOCOMPLETE_PROPERTIES = data.properties;
   });
 });
 </script>

+ 2 - 2
apps/oozie/src/oozie/templates/editor/edit_workflow.mako

@@ -1119,8 +1119,8 @@ $(document).ready(function () {
   }
 
   // load the autocomplete properties
-  $.getJSON("${ url('oozie:autocomplete_properties') }", function (properties) {
-    AUTOCOMPLETE_PROPERTIES = properties;
+  $.getJSON("${ url('oozie:autocomplete_properties') }", function (data) {
+    AUTOCOMPLETE_PROPERTIES = data.properties;
   });
 });
 

+ 1 - 1
apps/oozie/src/oozie/views/api.py

@@ -416,4 +416,4 @@ def workflows(request):
 
 
 def autocomplete_properties(request):
-  return JsonResponse(_STD_PROPERTIES)
+  return JsonResponse({ 'properties': _STD_PROPERTIES })