|
@@ -62,6 +62,14 @@ App.EnhancedConfigsMixin = Em.Mixin.create(App.ConfigWithOverrideRecommendationP
|
|
*/
|
|
*/
|
|
isControllerSupportsEnhancedConfigs: Em.computed.existsIn('name', ['wizardStep7Controller','mainServiceInfoConfigsController']),
|
|
isControllerSupportsEnhancedConfigs: Em.computed.existsIn('name', ['wizardStep7Controller','mainServiceInfoConfigsController']),
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * Stores name and file name of changed config
|
|
|
|
+ * This used only for capacity-scheduler
|
|
|
|
+ *
|
|
|
|
+ * @property {object}
|
|
|
|
+ */
|
|
|
|
+ currentlyChangedConfig: null,
|
|
|
|
+
|
|
dependenciesGroupMessage: Em.I18n.t('popup.dependent.configs.dependencies.for.groups'),
|
|
dependenciesGroupMessage: Em.I18n.t('popup.dependent.configs.dependencies.for.groups'),
|
|
/**
|
|
/**
|
|
* message fro alert box for dependent configs
|
|
* message fro alert box for dependent configs
|
|
@@ -172,6 +180,14 @@ App.EnhancedConfigsMixin = Em.Mixin.create(App.ConfigWithOverrideRecommendationP
|
|
if (updateDependencies) {
|
|
if (updateDependencies) {
|
|
dataToSend.changed_configurations = changedConfigs;
|
|
dataToSend.changed_configurations = changedConfigs;
|
|
}
|
|
}
|
|
|
|
+ if (Em.isArray(changedConfigs) && changedConfigs.mapProperty('type').uniq()[0] === 'capacity-scheduler') {
|
|
|
|
+ this.set('currentlyChangedConfig', {
|
|
|
|
+ name: 'capacity-scheduler',
|
|
|
|
+ fileName: 'capacity-scheduler.xml'
|
|
|
|
+ });
|
|
|
|
+ } else {
|
|
|
|
+ this.set('currentlyChangedConfig', null);
|
|
|
|
+ }
|
|
|
|
|
|
if (configGroup && !configGroup.get('isDefault') && configGroup.get('hosts.length') > 0) {
|
|
if (configGroup && !configGroup.get('isDefault') && configGroup.get('hosts.length') > 0) {
|
|
recommendations.config_groups = [this.buildConfigGroupJSON(this.get('selectedService.configs'), configGroup)];
|
|
recommendations.config_groups = [this.buildConfigGroupJSON(this.get('selectedService.configs'), configGroup)];
|
|
@@ -235,9 +251,13 @@ App.EnhancedConfigsMixin = Em.Mixin.create(App.ConfigWithOverrideRecommendationP
|
|
return this.get('selectedConfigGroup.isDefault') && !Em.isNone(this.get('recommendationsConfigs'))
|
|
return this.get('selectedConfigGroup.isDefault') && !Em.isNone(this.get('recommendationsConfigs'))
|
|
&& !this.get('stepConfigs').filter(function(stepConfig) {
|
|
&& !this.get('stepConfigs').filter(function(stepConfig) {
|
|
return stepConfig.get('changedConfigProperties').filter(function(c) {
|
|
return stepConfig.get('changedConfigProperties').filter(function(c) {
|
|
- return !this.get('changedProperties').map(function(changed) {
|
|
|
|
|
|
+ var changedConfigIds = this.get('changedProperties').map(function(changed) {
|
|
return App.config.configId(changed.propertyName, changed.propertyFileName);
|
|
return App.config.configId(changed.propertyName, changed.propertyFileName);
|
|
- }).contains(App.config.configId(c.get('name'), c.get('filename')));
|
|
|
|
|
|
+ });
|
|
|
|
+ if (this.get('currentlyChangedConfig')) {
|
|
|
|
+ return changedConfigIds.contains(App.config.configId(this.get('currentlyChangedConfig.name'), this.get('currentlyChangedConfig.fileName')));
|
|
|
|
+ }
|
|
|
|
+ return !changedConfigIds.contains(App.config.configId(c.get('name'), c.get('filename')));
|
|
}, this).length;
|
|
}, this).length;
|
|
}, this).length;
|
|
}, this).length;
|
|
},
|
|
},
|
|
@@ -414,13 +434,13 @@ App.EnhancedConfigsMixin = Em.Mixin.create(App.ConfigWithOverrideRecommendationP
|
|
}
|
|
}
|
|
}, this);
|
|
}, this);
|
|
},
|
|
},
|
|
-
|
|
|
|
|
|
+
|
|
saveInitialRecommendations: function() {
|
|
saveInitialRecommendations: function() {
|
|
this.get('recommendations').forEach(function (r) {
|
|
this.get('recommendations').forEach(function (r) {
|
|
this.get('initialRecommendations').pushObject(r);
|
|
this.get('initialRecommendations').pushObject(r);
|
|
}, this);
|
|
}, this);
|
|
},
|
|
},
|
|
-
|
|
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* disable saving recommended value for current config
|
|
* disable saving recommended value for current config
|
|
* @param config
|
|
* @param config
|