AMBARI-7140. Configs: compare of Scheduler shows individual props, not block of content.(xiwang)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/30167824 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/30167824 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/30167824 Branch: refs/heads/branch-alerts-dev Commit: 30167824be48ed933a5943c3b1e21aa0780f6555 Parents: a599bb8 Author: Xi Wang <xiw...@apache.org> Authored: Wed Sep 3 15:22:32 2014 -0700 Committer: Xi Wang <xiw...@apache.org> Committed: Thu Sep 4 13:00:08 2014 -0700 ---------------------------------------------------------------------- .../controllers/main/service/info/configs.js | 27 +++++++++++++++----- 1 file changed, 21 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/30167824/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 0c58207..663fb36 100644 --- a/ambari-web/app/controllers/main/service/info/configs.js +++ b/ambari-web/app/controllers/main/service/info/configs.js @@ -568,16 +568,31 @@ App.MainServiceInfoConfigsController = Em.Controller.extend(App.ServerValidatorM }); json.items[0].configurations.forEach(function (configuration) { - for (var prop in configuration.properties) { - serviceVersionMap[prop] = { - name: prop, - value: configuration.properties[prop], + if (serviceName == 'YARN' && configuration.type == 'capacity-scheduler') { + // put all properties in a single textarea for capacity-scheduler + var value = ''; + for (var prop in configuration.properties) { + value += prop + '=' + configuration.properties[prop] + '\n'; + } + serviceVersionMap[configuration.type] = { + name: configuration.type, + value: value, type: configuration.type, tag: configuration.tag, version: configuration.version }; - if (Em.isNone(configNamesMap[prop])) { - allConfigs.push(this.getMockConfig(prop, serviceName, App.config.getOriginalFileName(configuration.type))); + } else { + for (var prop in configuration.properties) { + serviceVersionMap[prop] = { + name: prop, + value: configuration.properties[prop], + type: configuration.type, + tag: configuration.tag, + version: configuration.version + }; + if (Em.isNone(configNamesMap[prop])) { + allConfigs.push(this.getMockConfig(prop, serviceName, App.config.getOriginalFileName(configuration.type))); + } } } if (configuration.properties_attributes && configuration.properties_attributes.final) {