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-9834. Skip group modification checkbox is missing (alexantonenko)
Date Sat, 28 Feb 2015 01:38:13 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.0.0 ac44c1f99 -> b1892d0ca


AMBARI-9834. Skip group modification checkbox is missing (alexantonenko)


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

Branch: refs/heads/branch-2.0.0
Commit: b1892d0ca16a6672f9c422a075e610d87cdd76d1
Parents: ac44c1f
Author: Alex Antonenko <hiveww@gmail.com>
Authored: Fri Feb 27 21:22:55 2015 +0200
Committer: Alex Antonenko <hiveww@gmail.com>
Committed: Sat Feb 28 03:38:06 2015 +0200

----------------------------------------------------------------------
 .../HDP/2.0.6/configuration/cluster-env.xml     |  1 +
 .../HDPWIN/2.1/configuration/cluster-env.xml    |  1 +
 ambari-web/app/utils/config.js                  | 50 ++++++++++----------
 3 files changed, 28 insertions(+), 24 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/b1892d0c/ambari-server/src/main/resources/stacks/HDP/2.0.6/configuration/cluster-env.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/configuration/cluster-env.xml
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/configuration/cluster-env.xml
index d41ff98..1bfc1ee 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/configuration/cluster-env.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/configuration/cluster-env.xml
@@ -34,6 +34,7 @@
     <property>
         <name>ignore_groupsusers_create</name>
         <value>false</value>
+        <property-type>USER</property-type>
         <description>Whether to ignore failures on users and group creation</description>
     </property>
     <property>

http://git-wip-us.apache.org/repos/asf/ambari/blob/b1892d0c/ambari-server/src/main/resources/stacks/HDPWIN/2.1/configuration/cluster-env.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/configuration/cluster-env.xml
b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/configuration/cluster-env.xml
index a0c8673..f014f8d 100644
--- a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/configuration/cluster-env.xml
+++ b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/configuration/cluster-env.xml
@@ -45,6 +45,7 @@
   </property>
   <property>
     <name>ignore_groupsusers_create</name>
+    <property-type>USER</property-type>
     <value>false</value>
     <description>Whether to ignore failures on users and group creation</description>
   </property>

http://git-wip-us.apache.org/repos/asf/ambari/blob/b1892d0c/ambari-web/app/utils/config.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/config.js b/ambari-web/app/utils/config.js
index 0545bcf..548ed0c 100644
--- a/ambari-web/app/utils/config.js
+++ b/ambari-web/app/utils/config.js
@@ -213,7 +213,6 @@ App.config = Em.Object.create({
    */
   identifyCategory: function (config) {
     var category = null,
-      categoryName = "",
       serviceConfigMetaData = this.get('preDefinedServiceConfigs').findProperty('serviceName',
config.serviceName),
       configCategories = (serviceConfigMetaData && serviceConfigMetaData.get('configCategories'))
|| [];
 
@@ -730,7 +729,7 @@ App.config = Em.Object.create({
    some of the config defaults to previously user-entered data.
    **/
   tweakDynamicDefaults: function (localDB, serviceConfigProperty, config) {
-    var firstHost = null;
+    var firstHost;
     for (var host in localDB.hosts) {
       firstHost = host;
       break;
@@ -1000,7 +999,7 @@ App.config = Em.Object.create({
       propertyData.isOverridable = false;
       propertyData.isReconfigurable = false;
       propertyData.displayName = nameToDisplayNameMap[config.property_name] || App.format.normalizeName(config.property_name);
-      propertyData.displayType = 'user';
+      propertyData.displayType = config.property_name == 'ignore_groupsusers_create' ? 'checkbox'
: 'user';
       if (config.service_name) {
         var propertyIndex = config.service_name == 'MISC' ? 30 : App.StackService.find().mapProperty('serviceName').indexOf(config.service_name);
         propertyData.belongsToService = [config.service_name];
@@ -1234,27 +1233,30 @@ App.config = Em.Object.create({
    * @return {Object}
    */
   addUserProperty: function (stored, isAdvanced, advancedConfigs) {
-    var configData = {
-      id: stored.id,
-      name: stored.name,
-      displayName: App.format.normalizeName(stored.name),
-      serviceName: stored.serviceName,
-      value: stored.value,
-      defaultValue: stored.defaultValue,
-      displayType: stringUtils.isSingleLine(stored.value) ? 'advanced' : 'multiLine',
-      filename: stored.filename,
-      isUserProperty: stored.isUserProperty === true,
-      hasInitialValue: !!stored.hasInitialValue,
-      isOverridable: true,
-      overrides: stored.overrides,
-      isRequired: false,
-      isVisible: stored.isVisible,
-      isFinal: stored.isFinal,
-      defaultIsFinal: stored.defaultIsFinal,
-      supportsFinal: stored.supportsFinal,
-      showLabel: stored.showLabel !== false,
-      category: stored.category
-    };
+    var
+      skipChangeOfDisplayType = ['ignore_groupsusers_create'],
+      originalDispType = advancedConfigs.findProperty('name', stored.name) ? advancedConfigs.findProperty('name',
stored.name).displayType : stored.displayType;
+      configData = {
+        id: stored.id,
+        name: stored.name,
+        displayName: App.format.normalizeName(stored.name),
+        serviceName: stored.serviceName,
+        value: stored.value,
+        defaultValue: stored.defaultValue,
+        displayType: skipChangeOfDisplayType.contains(stored.name) ? originalDispType : (stringUtils.isSingleLine(stored.value)
? 'advanced' : 'multiLine'),
+        filename: stored.filename,
+        isUserProperty: stored.isUserProperty === true,
+        hasInitialValue: !!stored.hasInitialValue,
+        isOverridable: true,
+        overrides: stored.overrides,
+        isRequired: false,
+        isVisible: stored.isVisible,
+        isFinal: stored.isFinal,
+        defaultIsFinal: stored.defaultIsFinal,
+        supportsFinal: stored.supportsFinal,
+        showLabel: stored.showLabel !== false,
+        category: stored.category
+      };
 
     App.get('config').calculateConfigProperties(configData, isAdvanced, advancedConfigs);
     return configData;


Mime
View raw message