Browse Source

AMBARI-25486: Configs page not loading after Ambari upgrade (#3537)

Yu Hou 3 years ago
parent
commit
b201789e74
1 changed files with 7 additions and 1 deletions
  1. 7 1
      ambari-web/app/mappers/configs/config_groups_mapper.js

+ 7 - 1
ambari-web/app/mappers/configs/config_groups_mapper.js

@@ -120,7 +120,13 @@ App.configGroupsMapper = App.QuickDataMapper.create({
    * @private
    */
   _getAllHosts: function() {
-    return App.get('allHostNames.length') ? App.get('allHostNames') : Object.keys(App.get('router.installerController.content.hosts'));
+    var hosts;
+    try {
+      hosts = App.get('allHostNames.length') ? App.get('allHostNames') : Object.keys(App.get('router.installerController.content.hosts'));
+    } catch (e){
+      hosts = [];
+    }
+    return hosts;
   },
 
   /**