You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by al...@apache.org on 2014/02/21 17:42:50 UTC

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

Repository: ambari
Updated Branches:
  refs/heads/trunk 54a9df72a -> 98ee4c6d6


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


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/98ee4c6d
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/98ee4c6d
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/98ee4c6d

Branch: refs/heads/trunk
Commit: 98ee4c6d60a32006641829f49343f59f9542c56d
Parents: 54a9df7
Author: Alex Antonenko <hi...@gmail.com>
Authored: Fri Feb 21 18:34:12 2014 +0200
Committer: Alex Antonenko <hi...@gmail.com>
Committed: Fri Feb 21 18:34:12 2014 +0200

----------------------------------------------------------------------
 ambari-web/app/mappers/jobs/hive_jobs_mapper.js | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/98ee4c6d/ambari-web/app/mappers/jobs/hive_jobs_mapper.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/mappers/jobs/hive_jobs_mapper.js b/ambari-web/app/mappers/jobs/hive_jobs_mapper.js
index 909e79d..23c7876 100644
--- a/ambari-web/app/mappers/jobs/hive_jobs_mapper.js
+++ b/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;