diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/application.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/application.js index 75b072adf1..3e8fcceedd 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/application.js +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/application.js @@ -65,6 +65,9 @@ export default Ember.Controller.extend({ }.property('model.clusterInfo'), userInfo: function() { - return this.model.userInfo.get('firstObject'); + if (this.model.userInfo) { + return this.model.userInfo.get('firstObject'); + } + return null; }.property('model.userInfo'), }); diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/application.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/application.js index e30baaa293..60d1efd6a7 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/application.js +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/application.js @@ -23,7 +23,9 @@ export default AbstractRoute.extend({ model() { return Ember.RSVP.hash({ clusterInfo: this.store.findAll('ClusterInfo', {reload: true}), - userInfo: this.store.findAll('cluster-user-info', {reload: true}) + userInfo: this.store.findAll('cluster-user-info', {reload: true}).catch(function() { + return null; + }) }); },