瀏覽代碼

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

Jaimin Jetly 11 年之前
父節點
當前提交
b986691a19
共有 1 個文件被更改,包括 6 次插入0 次删除
  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));
       });