|
@@ -28,6 +28,14 @@ App.HighAvailabilityWizardStep3Controller = Em.Controller.extend({
|
|
isLoaded: false,
|
|
isLoaded: false,
|
|
versionLoaded: true,
|
|
versionLoaded: true,
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * Map of sites and properties to delete
|
|
|
|
+ * @type Object
|
|
|
|
+ */
|
|
|
|
+ configsToRemove: {
|
|
|
|
+ 'hdfs-site': ['dfs.namenode.secondary.http-address']
|
|
|
|
+ },
|
|
|
|
+
|
|
clearStep: function () {
|
|
clearStep: function () {
|
|
this.get('stepConfigs').clear();
|
|
this.get('stepConfigs').clear();
|
|
this.serverConfigData = {};
|
|
this.serverConfigData = {};
|
|
@@ -75,6 +83,7 @@ App.HighAvailabilityWizardStep3Controller = Em.Controller.extend({
|
|
|
|
|
|
onLoadConfigs: function (data) {
|
|
onLoadConfigs: function (data) {
|
|
this.set('serverConfigData',data);
|
|
this.set('serverConfigData',data);
|
|
|
|
+ this.removeConfigs(this.get('configsToRemove'));
|
|
this.tweakServiceConfigs(this.get('haConfig.configs'));
|
|
this.tweakServiceConfigs(this.get('haConfig.configs'));
|
|
this.renderServiceConfigs(this.get('haConfig'));
|
|
this.renderServiceConfigs(this.get('haConfig'));
|
|
this.set('isLoaded', true);
|
|
this.set('isLoaded', true);
|
|
@@ -134,6 +143,24 @@ App.HighAvailabilityWizardStep3Controller = Em.Controller.extend({
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * Find and remove config properties in <code>serverConfigData</code>
|
|
|
|
+ * @param configsToRemove - map of config sites and properties to remove
|
|
|
|
+ * @returns {Object}
|
|
|
|
+ */
|
|
|
|
+ removeConfigs:function (configsToRemove) {
|
|
|
|
+ var configs = this.get('serverConfigData');
|
|
|
|
+ Em.keys(configsToRemove).forEach(function(site){
|
|
|
|
+ var siteConfigs = configs.items.findProperty('type', site);
|
|
|
|
+ if (siteConfigs) {
|
|
|
|
+ configsToRemove[site].forEach(function (property) {
|
|
|
|
+ delete siteConfigs.properties[property];
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ return configs;
|
|
|
|
+ },
|
|
|
|
+
|
|
setConfigInitialValue: function(config,value) {
|
|
setConfigInitialValue: function(config,value) {
|
|
config.value = value;
|
|
config.value = value;
|
|
config.defaultValue = value;
|
|
config.defaultValue = value;
|