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/04/22 16:55:42 UTC

[2/2] git commit: AMBARI-5523. Jobs controller not critical js error when "No jobs to display" (alexantonenko)

AMBARI-5523. Jobs controller not critical js error when "No jobs to display" (alexantonenko)


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

Branch: refs/heads/trunk
Commit: ca6e4de6d66ff9fc92c04424bb4878eebe6dfe1f
Parents: 86da4e6
Author: Alex Antonenko <hi...@gmail.com>
Authored: Tue Apr 22 17:49:20 2014 +0300
Committer: Alex Antonenko <hi...@gmail.com>
Committed: Tue Apr 22 17:49:20 2014 +0300

----------------------------------------------------------------------
 ambari-web/app/controllers/main/jobs_controller.js | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/ca6e4de6/ambari-web/app/controllers/main/jobs_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/jobs_controller.js b/ambari-web/app/controllers/main/jobs_controller.js
index 790a668..fd94f5e 100644
--- a/ambari-web/app/controllers/main/jobs_controller.js
+++ b/ambari-web/app/controllers/main/jobs_controller.js
@@ -366,6 +366,9 @@ App.MainJobsController = Em.Controller.extend({
   }),
 
   lastIDSuccessCallback: function(data, jqXHR, textStatus) {
+    if(!data.entities[0]){
+      return;
+    }
     var lastReceivedID = data.entities[0].entity;
     if(this.get('lastJobID') == '') {
       this.set('lastJobID', lastReceivedID);