AMBARI-23302 Ambari Upgrade from 2.6.0.0 - 2.7.0.0 - Dashboard is unable to load...
authorababiichuk <ababiichuk@hortonworks.com>
Tue, 20 Mar 2018 13:55:59 +0000 (15:55 +0200)
committeraBabiichuk <ababiichuk@hortonworks.com>
Thu, 22 Mar 2018 10:22:43 +0000 (12:22 +0200)
ambari-web/app/controllers/global/cluster_controller.js
ambari-web/app/controllers/global/update_controller.js
ambari-web/app/mappers/service_metrics_mapper.js
ambari-web/app/views/main/dashboard/widgets/namenode_cpu.js
ambari-web/test/views/main/dashboard/widgets_test.js

index 5dfda04..349a73c 100644 (file)
@@ -254,6 +254,7 @@ App.ClusterController = Em.Controller.extend(App.ReloadPopupMixin, {
           // make second call, because first is light since it doesn't request host-component metrics
           updater.updateServiceMetric(function() {
             self.set('isHostComponentMetricsLoaded', true);
+            updater.updateHDFSNameSpaces();
           });
           // components config loading doesn't affect overall progress
           self.loadComponentWithStaleConfigs(function () {
index 40fadc1..620d6a8 100644 (file)
@@ -685,7 +685,7 @@ App.UpdateController = Em.Controller.extend({
   },
 
   updateHDFSNameSpaces: function () {
-    if (App.Service.find().someProperty('serviceName', 'HDFS')) {
+    if (App.Service.find().someProperty('serviceName', 'HDFS') && App.get('isHaEnabled')) {
       const siteName = 'hdfs-site',
         storedHdfsSiteconfigs = App.db.getConfigs().findProperty('type', siteName),
         tagName = storedHdfsSiteconfigs && storedHdfsSiteconfigs.tag;
index ddf03f2..d8c060f 100644 (file)
@@ -543,7 +543,7 @@ App.serviceMetricsMapper = App.QuickDataMapper.create({
           });
         } else {
           activeNameNodeConfigKeys.forEach(key => {
-            item[key].default = Em.get(firstHostComponent, activeNameNodeConfigKeys[key]);
+            item[key].default = Em.get(firstHostComponent, activeNameNodeConfig[key]);
           });
         }
 
index 394559d..3cac94e 100644 (file)
@@ -39,7 +39,7 @@ App.NameNodeCpuPieChartView = App.PieChartDashboardWidgetView.extend(App.NameNod
           this.set('nnHostName', nn.get('hostName'));
         }
       } else {
-        this.set('nnHostName', self.get('model.nameNode.hostName'));
+        this.set('nnHostName', this.get('model.nameNode.hostName'));
       }
       if (this.get('nnHostName')) {
         this.getValue();
index 54931a1..280c8a5 100644 (file)
@@ -34,7 +34,8 @@ describe('App.MainDashboardWidgetsView', function () {
       setDBProperty: Em.K,
       persistKey: 'key',
       widgetGroupsDeferred: {
-        done: Em.clb
+        done: Em.clb,
+        resolve: Em.K
       }
     });
   });