cloudstack 3.0 UI - autoscale - add validation that LB name, public port, private port field have to be filled before creating autoscale.

This commit is contained in:
Jessica Wang 2012-07-31 18:02:48 -07:00
parent cedf4f4c47
commit 1dc3a3910c
1 changed files with 7 additions and 0 deletions

View File

@ -636,6 +636,13 @@
actions: {
apply: function(args) {
//validation (begin) *****
if(!('multiRules' in args.context)) { //from a new LB
if(args.formData.name == '' || args.formData.publicport == '' || args.formData.privateport == '') {
args.response.error('Name, Public Port, Private Port of Load Balancing are required. Please close this dialog box and fill Name, Public Port, Private Port first.');
return;
}
}
if(isAdmin() || isDomainAdmin()) { //only admin and domain-admin has access to listUers API
var havingApiKeyAndSecretKey = false;
$.ajax({