فهرست منبع

AMBARI-4784. Jobs: After applying filters, if server response has only one record, apps table is not updated. (alexantonenko)

Alex Antonenko 11 سال پیش
والد
کامیت
98ee4c6d60
1فایلهای تغییر یافته به همراه7 افزوده شده و 1 حذف شده
  1. 7 1
      ambari-web/app/mappers/jobs/hive_jobs_mapper.js

+ 7 - 1
ambari-web/app/mappers/jobs/hive_jobs_mapper.js

@@ -25,7 +25,13 @@ App.hiveJobsMapper = App.QuickDataMapper.create({
       return;
     }
     var hiveJobs = []
-    if (json && json.entities) {
+    if (json) {
+      if(!json.entities) {
+        json.entities = [];
+        if(json.entity){
+          json.entities = [json];
+        }
+      }
       var currentEntityMap = {}
       json.entities.forEach(function(entity) {
         currentEntityMap[entity.entity] = entity.entity;