Repository: ambari Updated Branches: refs/heads/trunk 84df207bd -> 922d38bf4
AMBARI-6034. Services -> Configs page for Yarn, HIVE, MapReduce services is not displayed (Buzhor Denys via alexantonenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/922d38bf Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/922d38bf Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/922d38bf Branch: refs/heads/trunk Commit: 922d38bf4b6123a3e3b2f88f6f4e2519b7cba9b9 Parents: 84df207 Author: Alex Antonenko <[email protected]> Authored: Thu Jun 5 19:34:43 2014 +0300 Committer: Alex Antonenko <[email protected]> Committed: Thu Jun 5 19:38:32 2014 +0300 ---------------------------------------------------------------------- .../controllers/main/service/info/configs.js | 48 +++++++++----------- ambari-web/app/controllers/wizard.js | 8 ---- 2 files changed, 21 insertions(+), 35 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/922d38bf/ambari-web/app/controllers/main/service/info/configs.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/controllers/main/service/info/configs.js b/ambari-web/app/controllers/main/service/info/configs.js index 878e322..d616bd3 100644 --- a/ambari-web/app/controllers/main/service/info/configs.js +++ b/ambari-web/app/controllers/main/service/info/configs.js @@ -339,14 +339,6 @@ App.MainServiceInfoConfigsController = Em.Controller.extend({ return (configGroupA.name > configGroupB.name); }); this.get('configGroups').unshift(defaultConfigGroup); - lazyLoading.run({ - initSize: 20, - chunkSize: 50, - delay: 50, - destination: this.get('configGroups').objectAt(0).get('hosts'), - source: defaultConfigGroupHosts, - context: Em.Object.create() - }); this.set('selectedConfigGroup', selectedConfigGroup); }, @@ -717,26 +709,28 @@ App.MainServiceInfoConfigsController = Em.Controller.extend({ setRecommendedDefaults: function (advancedConfigs) { var s = this.get('serviceConfigsData').findProperty('serviceName', this.get('content.serviceName')); this.getInfoForDefaults(); - var localDB = this.get('defaultsInfo'); - var recommendedDefaults = {}; - if (s.defaultsProviders) { - s.defaultsProviders.forEach(function (defaultsProvider) { - var d = defaultsProvider.getDefaults(localDB); - for (var name in d) { - if (!!d[name]) { - recommendedDefaults[name] = d[name]; - } else { - var defaultValueFromStack = advancedConfigs.findProperty('name', name); - // If property default value is not declared on client, fetch it from stack definition - // If it's not declared with any valid value in both server stack and client, then js reference error is expected to be thrown - recommendedDefaults[name] = defaultValueFromStack.value + this.addObserver('defaultsInfo.hosts.length', this, function() { + var localDB = this.get('defaultsInfo'); + var recommendedDefaults = {}; + if (s.defaultsProviders) { + s.defaultsProviders.forEach(function (defaultsProvider) { + var d = defaultsProvider.getDefaults(localDB); + for (var name in d) { + if (!!d[name]) { + recommendedDefaults[name] = d[name]; + } else { + var defaultValueFromStack = advancedConfigs.findProperty('name', name); + // If property default value is not declared on client, fetch it from stack definition + // If it's not declared with any valid value in both server stack and client, then js reference error is expected to be thrown + recommendedDefaults[name] = defaultValueFromStack.value + } } - } - }); - } - if (s.configsValidator) { - s.configsValidator.set('recommendedDefaults', recommendedDefaults); - } + }); + } + if (s.configsValidator) { + s.configsValidator.set('recommendedDefaults', recommendedDefaults); + } + }); }, /** http://git-wip-us.apache.org/repos/asf/ambari/blob/922d38bf/ambari-web/app/controllers/wizard.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/controllers/wizard.js b/ambari-web/app/controllers/wizard.js index 00dba5e..7b222ed 100644 --- a/ambari-web/app/controllers/wizard.js +++ b/ambari-web/app/controllers/wizard.js @@ -868,14 +868,6 @@ App.WizardController = Em.Controller.extend(App.LocalStorage, { }, this); this.setDBProperty('serviceConfigGroups', serviceConfigGroups); this.set('content.configGroups', serviceConfigGroups); - lazyLoading.run({ - initSize: 20, - chunkSize: 50, - delay: 50, - destination: this.get('content.configGroups'), - source: serviceConfigGroups, - context: this - }); }, /** * return slaveComponents bound to hosts
