mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Merge release branch 4.7 to master
* 4.7: CLOUDSTACK-9237: Create LB Healthcheck issues - button alignment and error message goes outside the window CLOUDSTACK-9235: Autoscale button is missing in VPC CLOUDSTACK-9229: Autoscale policy creation failing in VPC due to zoneid missing in createAutoScaleVmProfile
This commit is contained in:
commit
ce4ea45ce0
@ -596,7 +596,7 @@ public class LoadBalancingRulesManagerImpl<Type> extends ManagerBase implements
|
|||||||
*/
|
*/
|
||||||
if (!validateHealthCheck(cmd)) {
|
if (!validateHealthCheck(cmd)) {
|
||||||
throw new InvalidParameterValueException(
|
throw new InvalidParameterValueException(
|
||||||
"Failed to create HealthCheck policy: Validation Failed (HealthCheck Policy is not supported by LB Provider for the LB rule id :)" + cmd.getLbRuleId());
|
"Failed to create HealthCheck policy: Validation Failed (HealthCheck Policy is not supported by LB Provider for the LB rule id :" + cmd.getLbRuleId() + ")");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Validation : check for the multiple hc policies to the rule id */
|
/* Validation : check for the multiple hc policies to the rule id */
|
||||||
|
|||||||
@ -1116,7 +1116,7 @@
|
|||||||
var apiCmd, apiCmdRes;
|
var apiCmd, apiCmdRes;
|
||||||
if (!('multiRules' in args.context)) { //from a new LB
|
if (!('multiRules' in args.context)) { //from a new LB
|
||||||
var data = {
|
var data = {
|
||||||
zoneid: args.context.networks[0].zoneid, //get zoneid from args.context.networks[0] instead of args.context.ipAddresses[0] because args.context.ipAddresses is null when adding AutoScale rule from Add Load Balancer tab in Network page
|
zoneid: args.context.networks[0].zoneid ? args.context.networks[0].zoneid : args.context.ipAddresses[0].zoneid, //get zoneid from args.context.networks[0]. If it is not null then get it from args.context.ipAddresses[0] because args.context.ipAddresses is null when adding AutoScale rule from Add Load Balancer tab in Network page
|
||||||
serviceofferingid: args.data.serviceOfferingId,
|
serviceofferingid: args.data.serviceOfferingId,
|
||||||
templateid: args.data.templateNames,
|
templateid: args.data.templateNames,
|
||||||
destroyvmgraceperiod: args.data.destroyVMgracePeriod,
|
destroyvmgraceperiod: args.data.destroyVMgracePeriod,
|
||||||
|
|||||||
@ -3673,22 +3673,7 @@
|
|||||||
success: function(json) {
|
success: function(json) {
|
||||||
var networkOffering = json.listnetworkofferingsresponse.networkoffering[0];
|
var networkOffering = json.listnetworkofferingsresponse.networkoffering[0];
|
||||||
var services = networkOffering.service;
|
var services = networkOffering.service;
|
||||||
if (services != null) {
|
lbProviderIsNetscaler = checkIfNetScalerProviderIsEnabled(services);
|
||||||
for (var i = 0; i < services.length; i++) {
|
|
||||||
if (services[i].name == 'Lb') {
|
|
||||||
var providers = services[i].provider;
|
|
||||||
if (providers != null) {
|
|
||||||
for (var k = 0; k < providers.length; k++) {
|
|
||||||
if (providers[k].name == 'Netscaler') {
|
|
||||||
lbProviderIsNetscaler = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (lbProviderIsNetscaler == true) { //AutoScale is only supported on Netscaler (but not on any other provider like VirtualRouter)
|
if (lbProviderIsNetscaler == true) { //AutoScale is only supported on Netscaler (but not on any other provider like VirtualRouter)
|
||||||
@ -3697,8 +3682,16 @@
|
|||||||
return 2; //hide Autoscale button (both header and form)
|
return 2; //hide Autoscale button (both header and form)
|
||||||
}
|
}
|
||||||
} else { //from VPC section
|
} else { //from VPC section
|
||||||
//VPC doesn't support autoscale
|
var lbProviderIsNetscaler;
|
||||||
return 2;
|
var services = args.context.vpc[0].service;
|
||||||
|
|
||||||
|
lbProviderIsNetscaler = checkIfNetScalerProviderIsEnabled(services);
|
||||||
|
|
||||||
|
if (lbProviderIsNetscaler == true) { //AutoScale is only supported on Netscaler (but not on any other provider like VirtualRouter)
|
||||||
|
return false; //show AutoScale button
|
||||||
|
} else {
|
||||||
|
return 2; //hide Autoscale button (both header and form)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@ -333,7 +333,7 @@
|
|||||||
|
|
||||||
var $loading = $('<div>').addClass('loading-overlay').appendTo($autoscalerDialog);
|
var $loading = $('<div>').addClass('loading-overlay').appendTo($autoscalerDialog);
|
||||||
$autoscalerDialog.dialog({
|
$autoscalerDialog.dialog({
|
||||||
title: 'label.autoscale.configuration.wizard',
|
title: _l('label.autoscale.configuration.wizard'),
|
||||||
width: 825,
|
width: 825,
|
||||||
height: 600,
|
height: 600,
|
||||||
draggable: true,
|
draggable: true,
|
||||||
|
|||||||
@ -35,9 +35,9 @@
|
|||||||
var topFieldForm, bottomFieldForm, $topFieldForm, $bottomFieldForm;
|
var topFieldForm, bottomFieldForm, $topFieldForm, $bottomFieldForm;
|
||||||
var topfields = forms.topFields;
|
var topfields = forms.topFields;
|
||||||
|
|
||||||
var $healthCheckDesc = $('<div>' + 'label.health.check.message.desc' + '</div>').addClass('health-check-description');
|
var $healthCheckDesc = $('<div>' + _l('label.health.check.message.desc') + '</div>').addClass('health-check-description');
|
||||||
var $healthCheckConfigTitle = $('<div><br><br>' + 'label.health.check.configurations.options' + '</div>').addClass('health-check-config-title');
|
var $healthCheckConfigTitle = $('<div><br><br>' + _l('label.health.check.configurations.options') + '</div>').addClass('health-check-config-title');
|
||||||
var $healthCheckAdvancedTitle = $('<div><br><br>' + 'label.health.check.advanced.options' + '</div>').addClass('health-check-advanced-title');
|
var $healthCheckAdvancedTitle = $('<div><br><br>' + _l('label.health.check.advanced.options') + '</div>').addClass('health-check-advanced-title');
|
||||||
|
|
||||||
var $healthCheckDialog = $('<div>').addClass('health-check');
|
var $healthCheckDialog = $('<div>').addClass('health-check');
|
||||||
$healthCheckDialog.append($healthCheckDesc);
|
$healthCheckDialog.append($healthCheckDesc);
|
||||||
@ -200,7 +200,7 @@
|
|||||||
error: function(json) {
|
error: function(json) {
|
||||||
|
|
||||||
cloudStack.dialog.notice({
|
cloudStack.dialog.notice({
|
||||||
message: _s(json.responseText)
|
message: parseXMLHttpResponse(json)
|
||||||
}); //Error message in the API needs to be improved
|
}); //Error message in the API needs to be improved
|
||||||
$healthCheckDialog.dialog('close');
|
$healthCheckDialog.dialog('close');
|
||||||
$('.overlay').remove();
|
$('.overlay').remove();
|
||||||
@ -361,8 +361,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
$healthCheckDialog.dialog({
|
$healthCheckDialog.dialog({
|
||||||
title: 'label.health.check.wizard',
|
title: _l('label.health.check.wizard'),
|
||||||
width: 600,
|
width: 630,
|
||||||
height: 600,
|
height: 600,
|
||||||
draggable: true,
|
draggable: true,
|
||||||
closeonEscape: false,
|
closeonEscape: false,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user