From 1dc3a3910c751254d1429801b66323d7d9ebb888 Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Tue, 31 Jul 2012 18:02:48 -0700 Subject: [PATCH] cloudstack 3.0 UI - autoscale - add validation that LB name, public port, private port field have to be filled before creating autoscale. --- ui/scripts/autoscaler.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ui/scripts/autoscaler.js b/ui/scripts/autoscaler.js index 0a938677e2c..e982dd8ca63 100644 --- a/ui/scripts/autoscaler.js +++ b/ui/scripts/autoscaler.js @@ -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({