|
@@ -190,10 +190,10 @@ App.WizardStep8Controller = Em.Controller.extend({
|
|
|
}, this);
|
|
|
var dependentConfig = this.get('configMapping').filterProperty('foreignKey');
|
|
|
dependentConfig.forEach(function (_config) {
|
|
|
- this.setConfigValue(uiConfig, _config);
|
|
|
+ App.config.setConfigValue(uiConfig, this.get('content.serviceConfigProperties'), _config, this.get('globals'));
|
|
|
uiConfig.pushObject({
|
|
|
"id": "site property",
|
|
|
- "name": _config.name,
|
|
|
+ "name": _config._name || _config.name,
|
|
|
"value": _config.value,
|
|
|
"filename": _config.filename
|
|
|
});
|
|
@@ -322,64 +322,6 @@ App.WizardStep8Controller = Em.Controller.extend({
|
|
|
return value;
|
|
|
},
|
|
|
|
|
|
- /**
|
|
|
- * Set all site property that are derived from other site-properties
|
|
|
- */
|
|
|
- setConfigValue: function (uiConfig, config) {
|
|
|
- if (config.value == null) {
|
|
|
- return;
|
|
|
- }
|
|
|
- var fkValue = config.value.match(/<(foreignKey.*?)>/g);
|
|
|
- if (fkValue) {
|
|
|
- fkValue.forEach(function (_fkValue) {
|
|
|
- var index = parseInt(_fkValue.match(/\[([\d]*)(?=\])/)[1]);
|
|
|
- if (uiConfig.someProperty('name', config.foreignKey[index])) {
|
|
|
- var globalValue = uiConfig.findProperty('name', config.foreignKey[index]).value;
|
|
|
- config.value = config.value.replace(_fkValue, globalValue);
|
|
|
- } else if (this.get('content.serviceConfigProperties').someProperty('name', config.foreignKey[index])) {
|
|
|
- var globalValue;
|
|
|
- if (this.get('content.serviceConfigProperties').findProperty('name', config.foreignKey[index]).value === '') {
|
|
|
- globalValue = this.get('content.serviceConfigProperties').findProperty('name', config.foreignKey[index]).defaultValue;
|
|
|
- } else {
|
|
|
- globalValue = this.get('content.serviceConfigProperties').findProperty('name', config.foreignKey[index]).value;
|
|
|
- }
|
|
|
- config.value = config.value.replace(_fkValue, globalValue);
|
|
|
- }
|
|
|
- }, this);
|
|
|
- }
|
|
|
- if (fkValue = config.name.match(/<(foreignKey.*?)>/g)) {
|
|
|
- fkValue.forEach(function (_fkValue) {
|
|
|
- var index = parseInt(_fkValue.match(/\[([\d]*)(?=\])/)[1]);
|
|
|
- if (uiConfig.someProperty('name', config.foreignKey[index])) {
|
|
|
- var globalValue = uiConfig.findProperty('name', config.foreignKey[index]).value;
|
|
|
- config.name = config.name.replace(_fkValue, globalValue);
|
|
|
- } else if (this.get('content.serviceConfigProperties').someProperty('name', config.foreignKey[index])) {
|
|
|
- var globalValue;
|
|
|
- if (this.get('content.serviceConfigProperties').findProperty('name', config.foreignKey[index]).value === '') {
|
|
|
- globalValue = this.get('content.serviceConfigProperties').findProperty('name', config.foreignKey[index]).defaultValue;
|
|
|
- } else {
|
|
|
- globalValue = this.get('content.serviceConfigProperties').findProperty('name', config.foreignKey[index]).value;
|
|
|
- }
|
|
|
- config.name = config.name.replace(_fkValue, globalValue);
|
|
|
- }
|
|
|
- }, this);
|
|
|
- }
|
|
|
- //For properties in the configMapping file having foreignKey and templateName properties.
|
|
|
-
|
|
|
- var templateValue = config.value.match(/<(templateName.*?)>/g);
|
|
|
- if (templateValue) {
|
|
|
- templateValue.forEach(function (_value) {
|
|
|
- var index = parseInt(_value.match(/\[([\d]*)(?=\])/)[1]);
|
|
|
- if (this.get('globals').someProperty('name', config.templateName[index])) {
|
|
|
- var globalValue = this.get('globals').findProperty('name', config.templateName[index]).value;
|
|
|
- config.value = config.value.replace(_value, globalValue);
|
|
|
- } else {
|
|
|
- config.value = null;
|
|
|
- }
|
|
|
- }, this);
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
/**
|
|
|
* Load all info about cluster to <code>clusterInfo</code> variable
|
|
|
*/
|