You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by al...@apache.org on 2013/12/23 17:10:12 UTC
git commit: AMBARI-4154. Need to sort default dirs shown in UI during
Install. (Mikhail Bayuk via alexantonenko)
Updated Branches:
refs/heads/trunk 681694856 -> 3109a9219
AMBARI-4154. Need to sort default dirs shown in UI during Install. (Mikhail Bayuk via alexantonenko)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/3109a921
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/3109a921
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/3109a921
Branch: refs/heads/trunk
Commit: 3109a921905033df213a3ec22b49033aac030f1a
Parents: 6816948
Author: Alex Antonenko <hi...@gmail.com>
Authored: Mon Dec 23 18:10:01 2013 +0200
Committer: Alex Antonenko <hi...@gmail.com>
Committed: Mon Dec 23 18:10:01 2013 +0200
----------------------------------------------------------------------
ambari-web/app/utils/config.js | 13 +++++++++++++
1 file changed, 13 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/3109a921/ambari-web/app/utils/config.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/config.js b/ambari-web/app/utils/config.js
index 10ffd82..16cbdc2 100644
--- a/ambari-web/app/utils/config.js
+++ b/ambari-web/app/utils/config.js
@@ -274,6 +274,19 @@ App.config = Em.Object.create({
}
serviceConfigObj.displayName = configsPropertyDef ? configsPropertyDef.displayName : index;
this.calculateConfigProperties(serviceConfigObj, isAdvanced, advancedConfigs);
+ if(serviceConfigObj.get('displayType') == 'directories'
+ && (serviceConfigObj.get('category') == 'DataNode'
+ || serviceConfigObj.get('category') == 'NameNode')) {
+ var dirs = serviceConfigObj.get('value').split(',').sort();
+ serviceConfigObj.set('value', dirs.join(','));
+ serviceConfigObj.set('defaultValue', dirs.join(','));
+ }
+ if(serviceConfigObj.get('displayType') == 'directory'
+ && serviceConfigObj.get('category') == 'SNameNode') {
+ var dirs = serviceConfigObj.get('value').split(',').sort();
+ serviceConfigObj.set('value', dirs[0]);
+ serviceConfigObj.set('defaultValue', dirs[0]);
+ }
configs.push(serviceConfigObj);
} else {
mappingConfigs.push(serviceConfigObj);