cloudstack 3.0 UI - autoscale - service offering, disk offering, security group can not be changed after autosccale is created. So, disable the 3 dropdowns in edit mode.

This commit is contained in:
Jessica Wang 2012-07-31 17:44:51 -07:00
parent 21f2d1b779
commit cedf4f4c47
1 changed files with 15 additions and 4 deletions

View File

@ -270,10 +270,21 @@
$loading.remove();
renderDialogContent(args);
if (args.data && args.data.isAdvanced) {
$autoscalerDialog.find('input[type=checkbox]').trigger('click');
$autoscalerDialog.find('input[type=checkbox]').attr('checked', 'checked');
}
if (args.data == null) { //from a new LB rule
$autoscalerDialog.find('select[name=serviceOfferingId]').removeAttr('disabled');
$autoscalerDialog.find('select[name=securityGroups]').removeAttr('disabled');
$autoscalerDialog.find('select[name=diskOfferingId]').removeAttr('disabled');
}
else { //from an existing LB rule
$autoscalerDialog.find('select[name=serviceOfferingId]').attr('disabled', true);
$autoscalerDialog.find('select[name=securityGroups]').attr('disabled', true);
$autoscalerDialog.find('select[name=diskOfferingId]').attr('disabled', true);
if(args.data.isAdvanced != null) {
$autoscalerDialog.find('input[type=checkbox]').trigger('click');
$autoscalerDialog.find('input[type=checkbox]').attr('checked', 'checked');
}
}
}
}
});