Updated Branches: refs/heads/trunk 4bbd5ea37 -> 8d1d814de
AMBARI-4649. Jobs: js error in hive_jobs_mapper when we receive less entities, than there was (alexantonenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8d1d814d Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8d1d814d Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8d1d814d Branch: refs/heads/trunk Commit: 8d1d814de9dbed9060fc7bd1af63df42bbd0ec16 Parents: 4bbd5ea Author: Alex Antonenko <hiv...@gmail.com> Authored: Thu Feb 13 15:15:18 2014 +0200 Committer: Alex Antonenko <hiv...@gmail.com> Committed: Thu Feb 13 15:15:18 2014 +0200 ---------------------------------------------------------------------- ambari-web/app/mappers/jobs/hive_jobs_mapper.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/8d1d814d/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 8eebe7a..c33312b 100644 --- a/ambari-web/app/mappers/jobs/hive_jobs_mapper.js +++ b/ambari-web/app/mappers/jobs/hive_jobs_mapper.js @@ -51,10 +51,10 @@ App.hiveJobsMapper = App.QuickDataMapper.create({ hiveJobs.push(hiveJob); }); // Delete IDs not seen from server - var currentModels = model.find(); - currentModels.forEach(function(m) { - if (!currentEntityMap[m.get('id')]) { - this.deleteRecord(m); + var hiveJobsModel = model.find().toArray(); + hiveJobsModel.forEach(function(job) { + if (job && !currentEntityMap[job.get('id')]) { + this.deleteRecord(job); } }, this); }