Browse Source

AMBARI-4620: JS error thrown when disk_info for hosts is an empty array. (jaimin)

Jaimin Jetly 11 years ago
parent
commit
b986691a19
1 changed files with 6 additions and 0 deletions
  1. 6 0
      ambari-web/app/models/service_config.js

+ 6 - 0
ambari-web/app/models/service_config.js

@@ -551,6 +551,12 @@ App.ServiceConfigProperty = Ember.Object.extend({
 
       mountPointAsRoot = mountPointsPerHost.findProperty('mountpoint', '/');
 
+      // If Server does not send any host details information then atleast one mountpoint should be presumed as root
+      // This happens in a single container Linux Docker environment.
+      if (!mountPointAsRoot) {
+        mountPointAsRoot = {mountpoint: '/'};
+      }
+
       mountPointsPerHost = mountPointsPerHost.filter(function (mPoint) {
         return !(['/', '/home', '/boot'].contains(mPoint.mountpoint) || ['devtmpfs', 'tmpfs', 'vboxsf'].contains(mPoint.type));
       });