ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alexantone...@apache.org
Subject ambari git commit: AMBARI-11729. Configs: problem with multiple host link in compare mode (alexantonenko)
Date Sat, 06 Jun 2015 15:49:47 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 2f07bcb41 -> da9187063


AMBARI-11729. Configs: problem with multiple host link in compare mode (alexantonenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/da918706
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/da918706
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/da918706

Branch: refs/heads/trunk
Commit: da9187063093756b78e4c201d11ebbd9779320ff
Parents: 2f07bcb
Author: Alex Antonenko <hiveww@gmail.com>
Authored: Sat Jun 6 18:49:33 2015 +0300
Committer: Alex Antonenko <hiveww@gmail.com>
Committed: Sat Jun 6 18:49:43 2015 +0300

----------------------------------------------------------------------
 ambari-web/app/utils/config.js | 12 ++++++++++++
 1 file changed, 12 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/da918706/ambari-web/app/utils/config.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/config.js b/ambari-web/app/utils/config.js
index a2d05bb..1b49986 100644
--- a/ambari-web/app/utils/config.js
+++ b/ambari-web/app/utils/config.js
@@ -1223,6 +1223,18 @@ App.config = Em.Object.create({
       if (/\d+m$/.test(hostOverrideValue)) {
         return hostOverrideValue.slice(0, hostOverrideValue.length - 1);
       }
+    } else if (serviceConfig && 
+               serviceConfig.displayType === 'masterHosts' &&
+               typeof hostOverrideValue === 'string') {
+      try {
+        var value = JSON.parse(hostOverrideValue.replace(/'/g, "\""));
+        if (typeof value === 'object') { 
+          return value;
+        }
+      } catch(err) {
+        console.error(err);
+      }
+      
     }
     return hostOverrideValue;
   },


Mime
View raw message