ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ababiic...@apache.org
Subject [1/4] ambari git commit: AMBARI-13142 UI configs clean up. (ababiichuk)
Date Mon, 21 Sep 2015 08:48:29 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 4f8c7170c -> 1f759df79


http://git-wip-us.apache.org/repos/asf/ambari/blob/1f759df7/ambari-web/test/controllers/wizard/step8_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/controllers/wizard/step8_test.js b/ambari-web/test/controllers/wizard/step8_test.js
index d5cbd40..f0fa894 100644
--- a/ambari-web/test/controllers/wizard/step8_test.js
+++ b/ambari-web/test/controllers/wizard/step8_test.js
@@ -754,70 +754,6 @@ describe('App.WizardStep8Controller', function () {
     });
   });
 
-  describe('#loadConfigs', function () {
-    beforeEach(function () {
-      sinon.stub(App.config, 'excludeUnsupportedConfigs', Em.K);
-      sinon.stub(installerStep8Controller, 'loadUiSideConfigs', Em.K);
-    });
-    afterEach(function () {
-      App.config.excludeUnsupportedConfigs.restore();
-      installerStep8Controller.loadUiSideConfigs.restore();
-    });
-    it('should stringify serviceConfigProperties', function () {
-      var serviceConfigProperties = [
-        {name: 'oozie_hostname', value: true},
-        {name: 'oozie_existing_oracle_host', value: true},
-        {name: 'hive_database', value: false},
-        {name: 'oozie_database', value: false}
-      ];
-      var services = Em.A([
-        Em.Object.create({serviceName: 's1'}),
-        Em.Object.create({serviceName: 's2'}),
-        Em.Object.create({serviceName: 's3'})
-      ]);
-      var content = Em.Object.create({
-        services: services,
-        serviceConfigProperties: serviceConfigProperties
-      });
-      installerStep8Controller.set('content', content);
-      installerStep8Controller.set('configs', Em.A([]));
-      installerStep8Controller.loadConfigs();
-      var expected = [
-        {'name': 'oozie_hostname', 'value': 'true'},
-        {'name': 'oozie_existing_oracle_host', 'value': 'true'},
-        {'name': 'hive_database', 'value': 'false'},
-        {'name': 'oozie_database', 'value': 'false'}
-      ];
-      expect(JSON.parse(JSON.stringify(serviceConfigProperties))).to.eql(expected);
-    });
-  });
-
-  describe('#configMapping', function () {
-    it('should object with isOverridable', function () {
-      var configMapping = [
-        {foreignKey: null, templateName: 't1', value: 'v1', name: 'c1', filename: 'f1'},
-        {foreignKey: null, templateName: 't2', value: 'v2', name: 'c2', filename: 'f2'},
-        {foreignKey: null, templateName: 't3', value: 'v3', name: 'c3', filename: 'f2'},
-        {foreignKey: null, templateName: 't4', value: 'v4', name: 'c4', filename: 'f1'}
-      ];
-      installerStep8Controller.set(configMapping);
-      var result = {
-        "name": "hadoop.proxyuser.<foreignKey[0]>.groups",
-        "templateName": [
-          "proxyuser_group"
-        ],
-        "foreignKey": [
-          "hive_user"
-        ],
-        "value": "<templateName[0]>",
-        "filename": "core-site.xml",
-        "isOverridable": true
-      };
-
-      expect(installerStep8Controller.get('configMapping')[0]).to.eql(result);
-    });
-  });
-
   describe('#loadStep', function () {
     beforeEach(function () {
       sinon.stub(installerStep8Controller, 'clearStep', Em.K);
@@ -866,180 +802,6 @@ describe('App.WizardStep8Controller', function () {
     });
   });
 
-  describe('#removeHiveConfigs', function () {
-    Em.A([
-        {
-          globals: [
-            {name: 'hive_database', value: 'New MySQL Database'},
-            {name: 'hive_database_type', value: 'mysql'},
-            {name: 'hive_ambari_host', value: 'h1'},
-            {name: 'hive_hostname', value: 'h2'}
-          ],
-          removed: Em.A(['hive_existing_mysql_database', 'hive_existing_oracle_database',
'hive_existing_postgresql_database', 'hive_master_hosts']),
-          m: 'hive_database: New MySQL Database',
-          host: 'h1'
-        },
-        {
-          globals: [
-            {name: 'hive_database', value: 'New PostgreSQL Database'},
-            {name: 'hive_database_type', value: 'postgresql'},
-            {name: 'hive_ambari_host', value: 'h1'},
-            {name: 'hive_hostname', value: 'h2'}
-          ],
-          removed: Em.A(['hive_existing_mysql_database', 'hive_existing_oracle_database',
'hive_existing_postgresql_database', 'hive_master_hosts']),
-          m: 'hive_database: New PostgreSQL Database',
-          host: 'h1'
-        },
-        {
-          globals: [
-            {name: 'hive_database', value: 'Existing MySQL Database'},
-            {name: 'hive_database_type', value: 'mysql'},
-            {name: 'hive_existing_mysql_host', value: 'h1'},
-            {name: 'hive_hostname', value: 'h2'}
-          ],
-          removed: Em.A(['hive_ambari_database', 'hive_existing_oracle_database', 'hive_existing_postgresql_database',
'hive_master_hosts']),
-          m: 'hive_database: Existing MySQL Database',
-          host: 'h1'
-        },
-        {
-          globals: [
-            {name: 'hive_database', value: 'Existing MSSQL Server database with SQL authentication'},
-            {name: 'hive_database_type', value: 'mssql_server'},
-            {name: 'hive_existing_mssql_server_host', value: 'h1'},
-            {name: 'hive_hostname', value: 'h2'}
-          ],
-          removed: Em.A(['hive_ambari_database', 'hive_existing_oracle_database', 'hive_existing_postgresql_database',
'hive_master_hosts']),
-          m: 'hive_database: Existing MSSQL Server Database',
-          host: 'h1'
-        },
-        {
-          globals: [
-            {name: 'hive_database', value: 'Existing MSSQL Server database with integrated
authentication'},
-            {name: 'hive_database_type', value: 'mssql_server2'},
-            {name: 'hive_existing_mssql_server_2_host', value: 'h1'},
-            {name: 'hive_hostname', value: 'h2'}
-          ],
-          removed: Em.A(['hive_ambari_database', 'hive_existing_oracle_database', 'hive_existing_postgresql_database',
'hive_master_hosts']),
-          m: 'hive_database: Existing MSSQL Server database with integrated authentication',
-          host: 'h1'
-        },
-        {
-          globals: [
-            {name: 'hive_database', value: 'Existing PostgreSQL Database'},
-            {name: 'hive_database_type', value: 'postgresql'},
-            {name: 'hive_existing_postgresql_host', value: 'h1'},
-            {name: 'hive_hostname', value: 'h2'}
-          ],
-          removed: Em.A(['hive_ambari_database', 'hive_existing_oracle_database', 'hive_existing_mysql_database',
'hive_master_hosts']),
-          m: 'hive_database: Existing PostgreSQL Database',
-          host: 'h1'
-        },
-        {
-          globals: [
-            {name: 'hive_database', value: 'Existing Oracle Database'},
-            {name: 'hive_database_type', value: 'oracle'},
-            {name: 'hive_existing_oracle_host', value: 'h1'},
-            {name: 'hive_hostname', value: 'h2'}
-          ],
-          removed: Em.A(['hive_ambari_database', 'hive_existing_mysql_database', 'hive_existing_postgresql_database',
'hive_master_hosts']),
-          m: 'hive_database: Existing Oracle Database',
-          host: 'h1'
-        }
-      ]).forEach(function (test) {
-        it(test.m, function () {
-          test.removed.forEach(function (c) {
-            test.globals.pushObject({name: c})
-          });
-          var configs = installerStep8Controller.removeHiveConfigs(test.globals);
-          test.removed.forEach(function(name) {
-            expect(Em.isNone(configs.findProperty('name', name))).to.equal(true);
-          });
-          expect(configs.findProperty('name', 'hive_hostname').value).to.equal(test.host);
-        });
-      });
-  });
-
-  describe('#removeOozieConfigs', function () {
-    Em.A([
-        {
-          globals: [
-            {name: 'oozie_database', value: 'New Derby Database'},
-            {name: 'oozie_ambari_host', value: 'h1'},
-            {name: 'oozie_hostname', value: 'h2'}
-          ],
-          removed: Em.A(['oozie_ambari_database', 'oozie_existing_mysql_database', 'oozie_existing_oracle_database',
-            'oozie_existing_postgresql_database']),
-          m: 'oozie_database: New Derby Database',
-          host: 'h1'
-        },
-        {
-          globals: [
-            {name: 'oozie_database', value: 'Existing MySQL Database'},
-            {name: 'oozie_existing_mysql_host', value: 'h1'},
-            {name: 'oozie_hostname', value: 'h2'}
-          ],
-          removed: Em.A(['oozie_ambari_database', 'oozie_existing_oracle_database', 'oozie_derby_database',
-            'oozie_existing_postgresql_database']),
-          m: 'oozie_database: Existing MySQL Database',
-          host: 'h1'
-        },
-        {
-          globals: [
-            {name: 'oozie_database', value: 'Existing PostgreSQL Database'},
-            {name: 'oozie_existing_postgresql_host', value: 'h1'},
-            {name: 'oozie_hostname', value: 'h2'}
-          ],
-          removed: Em.A(['oozie_ambari_database', 'oozie_existing_oracle_database', 'oozie_existing_mysql_database']),
-          m: 'oozie_database: Existing PostgreSQL Database',
-          host: 'h1'
-        },
-        {
-          globals: [
-            {name: 'oozie_database', value: 'Existing MSSQL Server database with SQL authentication'},
-            {name: 'oozie_existing_mssql_server_host', value: 'h1'},
-            {name: 'oozie_hostname', value: 'h2'}
-          ],
-          removed: Em.A(['oozie_existing_mssql_server_database', 'oozie_existing_mssql_server_2_database',
'oozie_existing_mysql_database']),
-          m: 'oozie_database: Existing MSSQL with SQL authentication Database',
-          host: 'h1'
-        },
-        {
-          globals: [
-            {name: 'oozie_database', value: 'Existing MSSQL Server database with integrated
authentication'},
-            {name: 'oozie_existing_mssql_server_2_host', value: 'h1'},
-            {name: 'oozie_hostname', value: 'h2'}
-          ],
-          removed: Em.A(['oozie_existing_mssql_server_database', 'oozie_existing_oracle_database',
'oozie_existing_mysql_database']),
-          m: 'oozie_database: Existing MSSQL with integrated authentication Database',
-          host: 'h1'
-        },
-        {
-          globals: [
-            {name: 'oozie_database', value: 'Existing Oracle Database'},
-            {name: 'oozie_existing_oracle_host', value: 'h1'},
-            {name: 'oozie_hostname', value: 'h2'}
-          ],
-          removed: Em.A(['oozie_ambari_database', 'oozie_existing_mysql_database', 'oozie_derby_database',
-            'oozie_existing_postgresql_database']),
-          m: 'oozie_database: Existing Oracle Database',
-          host: 'h1'
-        }
-      ]).forEach(function (test) {
-        it(test.m, function () {
-          test.removed.forEach(function (c) {
-            if (!test.globals.findProperty('name', c)) {
-              test.globals.pushObject({name: c})
-            }
-          });
-          var configs = installerStep8Controller.removeOozieConfigs(test.globals);
-          test.removed.forEach(function(name) {
-            expect(Em.isNone(configs.findProperty('name', name))).to.equal(true);
-          });
-          expect(configs.findProperty('name', 'oozie_hostname').value).to.equal(test.host);
-        });
-      });
-  });
-
   describe('#getRegisteredHosts', function() {
     Em.A([
         {
@@ -1642,41 +1404,6 @@ describe('App.WizardStep8Controller', function () {
     });
   });
 
-  describe('#loadUiSideConfigs', function() {
-    beforeEach(function() {
-      sinon.stub(App.config, 'setConfigValue', Em.K);
-      sinon.stub(installerStep8Controller, 'get').withArgs('content.serviceConfigProperties').returns([
-        { name: 'c9', filename: 'f3'}
-      ]);
-    });
-    afterEach(function() {
-      App.config.setConfigValue.restore();
-      installerStep8Controller.get.restore();
-    });
-
-    it('configs with foreignKey', function() {
-      var configMapping = [
-        {foreignKey: 'fk1', templateName: 't5', value: 'v5', name: 'c5', filename: 'f1'},
-        {foreignKey: 'fk2', templateName: 't6', value: 'v6', name: 'c6', filename: 'f1'},
-        {foreignKey: 'fk3', templateName: 't7', value: 'v7', name: 'c7', filename: 'f2'},
-        {foreignKey: 'fk4', templateName: 't8', value: 'v8', name: 'c8', filename: 'f2'},
-        {foreignKey: 'fk5', templateName: 't9', value: 'v9', name: 'c9', filename: 'f3'}
-      ];
-      var uiConfigs = installerStep8Controller.loadUiSideConfigs(configMapping);
-      // should ignore one config that was saved in contentServiceConfigProperties
-      expect(uiConfigs.length).to.equal(configMapping.length - 1);
-      expect(uiConfigs.findProperty('name', 'c9')).to.be.undefined;
-      expect(uiConfigs.everyProperty('id', 'site property')).to.be.true;
-      uiConfigs.forEach(function(c, index) {
-        if (Em.isNone(configMapping[index].foreignKey))
-          expect(c.overrides).to.be.an.array;
-        expect(c.value).to.equal(configMapping[index].value);
-        expect(c.name).to.equal(configMapping[index].name);
-        expect(c.filename).to.equal(configMapping[index].filename);
-      });
-    });
-  });
-
   describe('Queued requests', function() {
 
     beforeEach(function() {
@@ -1994,69 +1721,6 @@ describe('App.WizardStep8Controller', function () {
 
   });
 
-  describe("#resolveProxyuserDependecies()", function() {
-    it("No core-site configs", function() {
-      expect(installerStep8Controller.resolveProxyuserDependecies([], [])).to.be.empty;
-    });
-    it("Only proxyuser group config", function() {
-      var configs = [{
-        name: 'proxyuser_group'
-      }];
-      installerStep8Controller.set('configs', [{
-        name: 'proxyuser_group',
-        value: 'val1'
-      }]);
-      expect(installerStep8Controller.resolveProxyuserDependecies(configs, [])).to.be.empty;
-    });
-    it("Property should be added", function() {
-      var configs = [
-        {
-          name: 'proxyuser_group'
-        },
-        {
-          name: 'hadoop.proxyuser.user.hosts',
-          value: 'val2'
-        }
-      ];
-      installerStep8Controller.set('configs', [{
-        name: 'proxyuser_group',
-        value: 'val1'
-      }]);
-      expect(installerStep8Controller.resolveProxyuserDependecies(configs, [])).to.be.eql({
-        'hadoop.proxyuser.user.hosts': 'val2',
-        'proxyuser_group': 'val1'
-      });
-    });
-    it("Property should be skipped", function() {
-      var configs = [
-        {
-          name: 'proxyuser_group'
-        },
-        {
-          name: 'hadoop.proxyuser.user.hosts',
-          value: 'val2'
-        }
-      ];
-      installerStep8Controller.set('configs', [
-        {
-          name: 'proxyuser_group',
-          value: 'val1'
-        },
-        {
-          name: 'user1',
-          value: 'user'
-        }
-      ]);
-      installerStep8Controller.set('optionalCoreSiteConfigs', [
-        {
-          serviceName: 'S1',
-          user: 'user1'
-        }
-      ]);
-      expect(installerStep8Controller.resolveProxyuserDependecies(configs, [])).to.be.empty;
-    });
-  });
-
   describe('#isAllClusterDeleteRequestsCompleted', function () {
     it('should depend on completed cluster delete requests number', function () {
       installerStep8Controller.setProperties({
@@ -2188,12 +1852,6 @@ describe('App.WizardStep8Controller', function () {
           title: 'Installer, no configs to update'
         },
         {
-          controllerName: 'installerController',
-          notExecuted: ['createAdditionalClientComponents'],
-          fileNamesToUpdate: [''],
-          title: 'Installer, some configs to be updated'
-        },
-        {
           controllerName: 'addHostController',
           notExecuted: ['updateConfigurations', 'createConfigurations', 'applyConfigurationsToCluster',
'createAdditionalClientComponents'],
           title: 'Add Host Wizard'

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f759df7/ambari-web/test/mixins/wizard/addSeccurityConfigs_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/mixins/wizard/addSeccurityConfigs_test.js b/ambari-web/test/mixins/wizard/addSeccurityConfigs_test.js
index 380e3c9..40812df 100644
--- a/ambari-web/test/mixins/wizard/addSeccurityConfigs_test.js
+++ b/ambari-web/test/mixins/wizard/addSeccurityConfigs_test.js
@@ -80,7 +80,6 @@ describe('App.AddSecurityConfigs', function () {
       }]);
 
       expect(controller.loadUiSideSecureConfigs()).to.eql([{
-        "id": "site property",
         "name": 'config1',
         "value": 'value1',
         "filename": 'file1'
@@ -98,7 +97,6 @@ describe('App.AddSecurityConfigs', function () {
       }]);
 
       expect(controller.loadUiSideSecureConfigs()).to.eql([{
-        "id": "site property",
         "name": 'config1',
         "value": 'value2',
         "filename": 'file1'
@@ -127,7 +125,6 @@ describe('App.AddSecurityConfigs', function () {
       }]);
 
       expect(controller.loadUiSideSecureConfigs()).to.eql([{
-        "id": "site property",
         "name": 'config1',
         "value": 'value1',
         "filename": 'file1'
@@ -353,8 +350,7 @@ describe('App.AddSecurityConfigs', function () {
       controller.loadUsersFromServer();
       expect(controller.get('serviceUsers')).to.eql([{
         name: 'user1',
-        value: 'value1',
-        id: 'puppet var'
+        value: 'value1'
       }]);
       App.get.restore();
     });

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f759df7/ambari-web/test/mock_data_setup/configs_mock_data.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/mock_data_setup/configs_mock_data.js b/ambari-web/test/mock_data_setup/configs_mock_data.js
index 6c50628..741b04d 100644
--- a/ambari-web/test/mock_data_setup/configs_mock_data.js
+++ b/ambari-web/test/mock_data_setup/configs_mock_data.js
@@ -237,7 +237,6 @@ module.exports = {
         "description":"desc",
         "isSecureConfig":false,
         "category":"General",
-        "id":"site property",
         "displayName":"storm.zookeeper.servers"
       },
       {
@@ -249,7 +248,6 @@ module.exports = {
         "isOverridable":true,
         "showLabel":true,
         "serviceName":"STORM",
-        "id":"site property",
         "displayType":"advanced",
         "displayName":"single_line_property",
         "category":"AdvancedStormSite"
@@ -263,7 +261,6 @@ module.exports = {
         "isOverridable":true,
         "showLabel":true,
         "serviceName":"STORM",
-        "id":"site property",
         "displayType":"multiLine",
         "displayName":"multi_line_property",
         "category":"AdvancedStormSite"
@@ -278,7 +275,6 @@ module.exports = {
         "showLabel":true,
         "serviceName":"STORM",
         "isVisible":false,
-        "id":"puppet var",
         "displayName":null,
         "options":null
       },
@@ -299,7 +295,6 @@ module.exports = {
         "index":1,
         "isSecureConfig":false,
         "category":"DataNode",
-        "id":"site property",
         "displayName":"DataNode directories"
       },
       {
@@ -319,7 +314,6 @@ module.exports = {
         "description":"desc",
         "isSecureConfig":false,
         "category":"AdvancedHDFSLog4j",
-        "id":"site property",
         "displayName":"content"
       },
       {
@@ -339,7 +333,6 @@ module.exports = {
         "description":"desc",
         "isSecureConfig":false,
         "category":"AdvancedHDFSLog4j",
-        "id":"site property",
         "displayName":"content"
       },
       {
@@ -359,7 +352,6 @@ module.exports = {
         "description":"Storm log directory",
         "isSecureConfig":false,
         "category":"General",
-        "id":"puppet var",
         "displayName":"storm_log_dir"
       }
     ];

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f759df7/ambari-web/test/models/configs/objects/service_config_property_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/models/configs/objects/service_config_property_test.js b/ambari-web/test/models/configs/objects/service_config_property_test.js
index 00cf620..fd161dd 100644
--- a/ambari-web/test/models/configs/objects/service_config_property_test.js
+++ b/ambari-web/test/models/configs/objects/service_config_property_test.js
@@ -185,7 +185,6 @@ var serviceConfigProperty,
     },
     {
       initial: {
-        id: 'puppet var',
         value: '',
         savedValue: 'default',
         recommendedValue: 'recommended'

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f759df7/ambari-web/test/utils/config_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/utils/config_test.js b/ambari-web/test/utils/config_test.js
index ebadb29..76bfe3d 100644
--- a/ambari-web/test/utils/config_test.js
+++ b/ambari-web/test/utils/config_test.js
@@ -25,40 +25,6 @@ var modelSetup = setups.configs;
 
 describe('App.config', function () {
 
-  var loadServiceSpecificConfigs = function(context, serviceName) {
-    context.configGroups = modelSetup.setupConfigGroupsObject(serviceName);
-    context.advancedConfigs = modelSetup.setupAdvancedConfigsObject();
-    context.tags = modelSetup.setupServiceConfigTagsObject(serviceName);
-    context.result = App.config.mergePreDefinedWithLoaded(context.configGroups, context.advancedConfigs,
context.tags, App.Service.find().findProperty('id', serviceName).get('serviceName'));
-  };
-
-  var loadAllServicesConfigs = function(context, serviceNames) {
-    context.configGroups = modelSetup.setupConfigGroupsObject();
-  };
-
-  var loadServiceModelsData = function(serviceNames) {
-    serviceNames.forEach(function(serviceName) {
-      App.store.load(App.Service, {
-        id: serviceName,
-        service_name: serviceName
-      });
-    });
-  };
-
-  describe('#handleSpecialProperties', function () {
-    var config = {};
-    it('value should be transformed to "1024" from "1024m"', function () {
-      config = {
-        displayType: 'int',
-        value: '1024m',
-        savedValue: '1024m'
-      };
-      App.config.handleSpecialProperties(config);
-      expect(config.value).to.equal('1024');
-      expect(config.savedValue).to.equal('1024');
-    });
-  });
-
   describe('#fileConfigsIntoTextarea', function () {
     var filename = 'capacity-scheduler.xml';
     var configs = [
@@ -434,35 +400,6 @@ describe('App.config', function () {
   });
 
 
-  describe('#replaceConfigValues', function () {
-
-    var cases = [
-      {
-        name: 'name',
-        express: '<templateName[0]>',
-        value: '<templateName[0]>',
-        globValue: 'v',
-        expected: 'v',
-        title: 'default case'
-      },
-      {
-        name: 'templeton.hive.properties',
-        express: '<templateName[0]>',
-        value: 'hive.matestore.uris=<templateName[0]>',
-        globValue: 'thrift://h0:9933,thrift://h1:9933,thrift://h2:9933',
-        expected: 'hive.matestore.uris=thrift://h0:9933\\,thrift://h1:9933\\,thrift://h2:9933',
-        title: 'should escape commas for templeton.hive.properties'
-      }
-    ];
-
-    cases.forEach(function (item) {
-      it(item.title, function () {
-        expect(App.config.replaceConfigValues(item.name, item.express, item.value, item.globValue)).to.equal(item.expected);
-      });
-    });
-
-  });
-
   describe('#advancedConfigIdentityData', function () {
 
     var configs = [
@@ -616,148 +553,6 @@ describe('App.config', function () {
 
   });
 
-  describe('#setConfigValue', function () {
-
-    Em.A([
-        {
-          mappedConfigs: [
-            {
-              name: 'falcon_user',
-              value: 'fu'
-            }
-          ],
-          allConfigs: [],
-          m: 'in mapped, value used',
-          e: {
-            _name: 'hadoop.proxyuser.fu.groups',
-            value: 'fu',
-            noMatchSoSkipThisConfig: false
-          }
-        },
-        {
-          mappedConfigs: [],
-          allConfigs: [
-            {
-              name: 'falcon_user',
-              value: 'fu'
-            }
-          ],
-          m: 'in all, value used',
-          e: {
-            _name: 'hadoop.proxyuser.fu.groups',
-            value: 'fu',
-            noMatchSoSkipThisConfig: false
-          }
-        },
-        {
-          mappedConfigs: [],
-          allConfigs: [
-            {
-              name: 'falcon_user',
-              value: '',
-              recommendedValue: 'fu'
-            }
-          ],
-          m: 'in all, default value used',
-          e: {
-            _name: 'hadoop.proxyuser.fu.groups',
-            value: 'fu',
-            noMatchSoSkipThisConfig: false
-          }
-        },
-        {
-          mappedConfigs: [],
-          allConfigs: [],
-          m: 'not found',
-          e: {
-            _name: 'hadoop.proxyuser.<foreignKey[0]>.groups',
-            value: '<foreignKey[0]>',
-            noMatchSoSkipThisConfig: true
-          }
-        }
-      ]).forEach(function (test) {
-        it(test.m, function () {
-          var config = {
-            name: "hadoop.proxyuser.<foreignKey[0]>.groups",
-            templateName: ["proxyuser_group"],
-            foreignKey: ["falcon_user"],
-            noMatchSoSkipThisConfig: false,
-            value: "<foreignKey[0]>"
-          };
-          App.config.setConfigValue(test.mappedConfigs, test.allConfigs, config);
-          expect(config.value).to.equal(test.e.value);
-          if(test.e.noMatchSoSkipThisConfig) {
-            expect(Em.isNone(config._name)).to.be.true;
-          }
-          else {
-            expect(config._name).to.equal(test.e._name);
-          }
-          expect(config.noMatchSoSkipThisConfig).to.equal(test.e.noMatchSoSkipThisConfig);
-        });
-
-        Em.A([
-          {
-            mappedConfigs: [],
-            allConfigs: [
-              {
-                name: 'falcon_user',
-                value: 'fu'
-              },
-              {
-                name: 'proxyuser_group',
-                value: 'pg'
-              }
-            ],
-            m: 'in all, template in all',
-            e: {
-              _name: 'hadoop.proxyuser.fu.groups',
-              value: 'fupg'
-            }
-          },
-            {
-              mappedConfigs: [
-                {
-                  name: 'falcon_user',
-                  value: 'fu'
-                },
-                {
-                  name: 'proxyuser_group',
-                  value: 'pg'
-                }
-              ],
-              allConfigs: [],
-              m: 'in mapped, template in mapped',
-              e: {
-                _name: 'hadoop.proxyuser.fu.groups',
-                value: 'fupg'
-              }
-            },
-            {
-              mappedConfigs: [],
-              allConfigs: [],
-              m: 'not found (template not found too)',
-              e: {
-                _name: 'hadoop.proxyuser.<foreignKey[0]>.groups',
-                value: null
-              }
-            }
-        ]).forEach(function (test) {
-            it(test.m, function () {
-              var config = {
-                name: "hadoop.proxyuser.<foreignKey[0]>.groups",
-                templateName: ["proxyuser_group"],
-                foreignKey: ["falcon_user"],
-                noMatchSoSkipThisConfig: false,
-                value: "<foreignKey[0]><templateName[0]>"
-              };
-              App.config.setConfigValue(test.mappedConfigs, test.allConfigs, config);
-            });
-          });
-
-    });
-
-  });
-
   describe('#shouldSupportFinal', function () {
 
     var cases = [
@@ -1276,8 +1071,7 @@ describe('App.config', function () {
       isUserProperty: false,
       isRequired: true,
       group: null,
-      id: 'site property',
-      isRequiredByAgent: true,
+      isRequiredByAgent:  true,
       isReconfigurable: true,
       unit: null,
       hasInitialValue: false,

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f759df7/ambari-web/test/utils/configs/config_property_helper_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/utils/configs/config_property_helper_test.js b/ambari-web/test/utils/configs/config_property_helper_test.js
index 7870faf..9541c65 100644
--- a/ambari-web/test/utils/configs/config_property_helper_test.js
+++ b/ambari-web/test/utils/configs/config_property_helper_test.js
@@ -344,7 +344,7 @@ describe('configPropertyHelper', function () {
           name: 'kafka.ganglia.metrics.host',
           value: 'localhost'
         });
-        configPropertyHelper.initialValue(serviceConfigProperty, item.localDB);
+        configPropertyHelper.initialValue(serviceConfigProperty, item.localDB, []);
         expect(serviceConfigProperty.get('value')).to.equal(item.expected);
       });
     });
@@ -361,7 +361,7 @@ describe('configPropertyHelper', function () {
           value: item.receivedValue,
           options: item.options
         });
-        configPropertyHelper.initialValue(serviceConfigProperty, {});
+        configPropertyHelper.initialValue(serviceConfigProperty, {}, []);
         expect(serviceConfigProperty.get('value')).to.equal(item.value);
         expect(serviceConfigProperty.get('options').findProperty('displayName', 'New MySQL
Database').hidden).to.equal(item.hidden);
         App.get.restore();
@@ -385,7 +385,7 @@ describe('configPropertyHelper', function () {
               };
             }
           }
-        });
+        }, []);
         expect(serviceConfigProperty.get('value')).to.equal(item.value);
         expect(serviceConfigProperty.get('recommendedValue')).to.equal(item.recommendedValue);
       });
@@ -394,13 +394,13 @@ describe('configPropertyHelper', function () {
 
     it(cases['hivemetastore_host'].title, function () {
       serviceConfigProperty.set('name', 'hivemetastore_host');
-      configPropertyHelper.initialValue(serviceConfigProperty, cases['hivemetastore_host'].localDB);
+      configPropertyHelper.initialValue(serviceConfigProperty, cases['hivemetastore_host'].localDB,
[]);
       expect(serviceConfigProperty.get('value')).to.eql(cases['hivemetastore_host'].value);
     });
 
     it(cases['hive_master_hosts'].title, function () {
       serviceConfigProperty.set('name', 'hive_master_hosts');
-      configPropertyHelper.initialValue(serviceConfigProperty, cases['hive_master_hosts'].localDB);
+      configPropertyHelper.initialValue(serviceConfigProperty, cases['hive_master_hosts'].localDB,
[]);
       expect(serviceConfigProperty.get('value')).to.equal(cases['hive_master_hosts'].value);
     });
 
@@ -409,7 +409,7 @@ describe('configPropertyHelper', function () {
         name: 'hive.metastore.uris',
         recommendedValue: cases['hive.metastore.uris'].recommendedValue
       });
-      configPropertyHelper.initialValue(serviceConfigProperty, cases['hive.metastore.uris'].localDB,
cases['hive.metastore.uris'].dependencies);
+      configPropertyHelper.initialValue(serviceConfigProperty, cases['hive.metastore.uris'].localDB,
[{name:'hive.metastore.uris', recommendedValue:cases['hive.metastore.uris'].dependencies['hive.metastore.uris'],
 filename: 'hive-site.xml'}]);
       expect(serviceConfigProperty.get('value')).to.equal(cases['hive.metastore.uris'].value);
       expect(serviceConfigProperty.get('recommendedValue')).to.equal(cases['hive.metastore.uris'].value);
     });
@@ -420,7 +420,7 @@ describe('configPropertyHelper', function () {
         recommendedValue: cases['templeton.hive.properties'].recommendedValue,
         value: cases['templeton.hive.properties'].recommendedValue
       });
-      configPropertyHelper.initialValue(serviceConfigProperty, cases['templeton.hive.properties'].localDB,
cases['templeton.hive.properties'].dependencies);
+      configPropertyHelper.initialValue(serviceConfigProperty, cases['templeton.hive.properties'].localDB,
 [{name:'hive.metastore.uris', recommendedValue:cases['templeton.hive.properties'].dependencies['hive.metastore.uris'],
 filename: 'hive-site.xml'}]);
       expect(serviceConfigProperty.get('value')).to.equal(cases['templeton.hive.properties'].value);
       expect(serviceConfigProperty.get('recommendedValue')).to.equal(cases['templeton.hive.properties'].value);
     });
@@ -430,20 +430,20 @@ describe('configPropertyHelper', function () {
         name: 'yarn.resourcemanager.zk-address',
         recommendedValue: cases['yarn.resourcemanager.zk-address'].recommendedValue
       });
-      configPropertyHelper.initialValue(serviceConfigProperty, cases['yarn.resourcemanager.zk-address'].localDB,
cases['yarn.resourcemanager.zk-address'].dependencies);
+      configPropertyHelper.initialValue(serviceConfigProperty, cases['yarn.resourcemanager.zk-address'].localDB,
 [{name:'clientPort', recommendedValue:cases['yarn.resourcemanager.zk-address'].dependencies['clientPort'],
 filename: 'zoo.cfg.xml'}]);
       expect(serviceConfigProperty.get('value')).to.equal(cases['yarn.resourcemanager.zk-address'].value);
       expect(serviceConfigProperty.get('recommendedValue')).to.equal(cases['yarn.resourcemanager.zk-address'].value);
     });
 
     it(cases['oozieserver_host'].title, function () {
       serviceConfigProperty.set('name', 'oozieserver_host');
-      configPropertyHelper.initialValue(serviceConfigProperty, cases['oozieserver_host'].localDB);
+      configPropertyHelper.initialValue(serviceConfigProperty, cases['oozieserver_host'].localDB,
[]);
       expect(serviceConfigProperty.get('value')).to.eql(cases['oozieserver_host'].value);
     });
 
     it(cases['knox_gateway_host'].title, function () {
       serviceConfigProperty.set('name', 'knox_gateway_host');
-      configPropertyHelper.initialValue(serviceConfigProperty, cases['knox_gateway_host'].localDB);
+      configPropertyHelper.initialValue(serviceConfigProperty, cases['knox_gateway_host'].localDB,
[]);
       expect(serviceConfigProperty.get('value')).to.eql(cases['knox_gateway_host'].value);
     });
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f759df7/ambari-web/test/views/common/configs/service_configs_by_category_view_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/views/common/configs/service_configs_by_category_view_test.js
b/ambari-web/test/views/common/configs/service_configs_by_category_view_test.js
index e0b2409..f9ec764 100644
--- a/ambari-web/test/views/common/configs/service_configs_by_category_view_test.js
+++ b/ambari-web/test/views/common/configs/service_configs_by_category_view_test.js
@@ -263,7 +263,6 @@ describe('App.ServiceConfigsByCategoryView', function () {
           displayType: 'advanced',
           isSecureConfig: true,
           category: 'c0',
-          id: 'site property',
           serviceName: 's0',
           savedValue: null,
           supportsFinal: true,
@@ -292,7 +291,6 @@ describe('App.ServiceConfigsByCategoryView', function () {
           displayType: 'multiLine',
           isSecureConfig: false,
           category: 'c1',
-          id: 'site property',
           serviceName: 's1',
           savedValue: null,
           supportsFinal: false,
@@ -334,7 +332,7 @@ describe('App.ServiceConfigsByCategoryView', function () {
         view.createProperty(item.propertyObj);
         expect(view.get('serviceConfigs').filterProperty('name', item.propertyObj.name)).to.have.length(1);
         expect(view.get('serviceConfigs').findProperty('name', item.propertyObj.name).getProperties([
-          'name', 'displayName', 'value', 'displayType', 'isSecureConfig', 'category', 'id',
'serviceName', 'savedValue',
+          'name', 'displayName', 'value', 'displayType', 'isSecureConfig', 'category', 'serviceName',
'savedValue',
           'supportsFinal', 'filename', 'isUserProperty', 'isNotSaved', 'isRequired', 'group',
'isOverridable'
         ])).to.eql(item.result);
       });


Mime
View raw message