You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by sr...@apache.org on 2013/10/01 01:12:23 UTC
git commit: AMBARI-3392. Host override value being shown in other
hosts configs as well. (srimanth)
Updated Branches:
refs/heads/trunk 7f6ece7bd -> 4cfd9f7a9
AMBARI-3392. Host override value being shown in other hosts configs as well. (srimanth)
Project: http://git-wip-us.apache.org/repos/asf/incubator-ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ambari/commit/4cfd9f7a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ambari/tree/4cfd9f7a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ambari/diff/4cfd9f7a
Branch: refs/heads/trunk
Commit: 4cfd9f7a90b44846bbd587e1ee7bb3a50c9089f2
Parents: 7f6ece7
Author: Srimanth Gunturi <sg...@hortonworks.com>
Authored: Mon Sep 30 16:08:38 2013 -0700
Committer: Srimanth Gunturi <sg...@hortonworks.com>
Committed: Mon Sep 30 16:08:38 2013 -0700
----------------------------------------------------------------------
ambari-web/app/controllers/main/host/configs_service.js | 12 ++++++------
ambari-web/app/controllers/main/service/info/configs.js | 8 ++++++--
2 files changed, 12 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/4cfd9f7a/ambari-web/app/controllers/main/host/configs_service.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/host/configs_service.js b/ambari-web/app/controllers/main/host/configs_service.js
index b32a25b..76935a1 100644
--- a/ambari-web/app/controllers/main/host/configs_service.js
+++ b/ambari-web/app/controllers/main/host/configs_service.js
@@ -69,17 +69,17 @@ App.MainHostServiceConfigsController = App.MainServiceInfoConfigsController.exte
* This method will *not load* the overridden properties. However it will
* replace the value shown for properties which this host has override for.
*/
- loadServiceConfigHostsOverrides: function (serviceConfig) {
+ loadServiceConfigHostsOverrides: function (serviceConfigs, loadedHostToOverrideSiteToTagMap) {
var thisHostName = this.get('host.hostName');
var configKeyToConfigMap = {};
- serviceConfig.configs.forEach(function (item) {
+ serviceConfigs.forEach(function (item) {
configKeyToConfigMap[item.name] = item;
});
var typeTagToHostMap = {};
var urlParams = [];
- for ( var hostname in this.loadedHostToOverrideSiteToTagMap) {
+ for ( var hostname in loadedHostToOverrideSiteToTagMap) {
if (hostname === thisHostName) {
- var overrideTypeTags = this.loadedHostToOverrideSiteToTagMap[hostname];
+ var overrideTypeTags = loadedHostToOverrideSiteToTagMap[hostname];
for ( var type in overrideTypeTags) {
var tag = overrideTypeTags[type];
typeTagToHostMap[type + "///" + tag] = hostname;
@@ -126,11 +126,11 @@ App.MainHostServiceConfigsController = App.MainServiceInfoConfigsController.exte
}
if (serviceConfig) {
// Value of this property is different for this host.
- console.log("loadServiceConfigHostsOverrides(" + this.get('host.hostName') + "): [" + hostname + "] OVERRODE(" + serviceConfig.name + "): " + serviceConfig.value + " -> " + hostOverrideValue);
+ console.log("loadServiceConfigHostsOverrides(" + hostname + "): [" + hostname + "] OVERRODE(" + serviceConfig.name + "): " + serviceConfig.value + " -> " + hostOverrideValue);
serviceConfig.value = hostOverrideValue;
serviceConfig.defaultValue = hostOverrideValue;
serviceConfig.isOriginalSCP = false;
- serviceConfig.selectedHostOptions = [this.get('host.hostName')];
+ serviceConfig.selectedHostOptions = [hostname];
}
}
});
http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/4cfd9f7a/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 a1b485a..99854c9 100644
--- a/ambari-web/app/controllers/main/service/info/configs.js
+++ b/ambari-web/app/controllers/main/service/info/configs.js
@@ -475,9 +475,8 @@ App.MainServiceInfoConfigsController = Em.Controller.extend({
this.addHostNamesToGlobalConfig();
var allConfigs = this.get('globalConfigs').concat(configs);
- //this.loadServiceConfigHostsOverrides(serviceConfigs, this.loadedHostToOverrideSiteToTagMap);
//STEP 9: Load and add host override configs
- App.config.loadServiceConfigHostsOverrides(allConfigs, this.loadedHostToOverrideSiteToTagMap);
+ this.loadServiceConfigHostsOverrides(allConfigs, this.loadedHostToOverrideSiteToTagMap);
var restartData = this.loadActualConfigsAndCalculateRestarts();
//STEP 10: creation of serviceConfig object which contains configs for current service
var serviceConfig = App.config.createServiceConfig(serviceName);
@@ -495,6 +494,11 @@ App.MainServiceInfoConfigsController = Em.Controller.extend({
this.checkForSecureConfig(this.get('selectedService'));
this.set('dataIsLoaded', true);
},
+
+ loadServiceConfigHostsOverrides: function(allConfigs, loadedHostToOverrideSiteToTagMap) {
+ App.config.loadServiceConfigHostsOverrides(allConfigs, loadedHostToOverrideSiteToTagMap);
+ },
+
/**
* Changes format from Object to Array
*