You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by mu...@apache.org on 2013/01/31 15:23:00 UTC
[19/50] [abbrv] git commit: refs/heads/events-framework -
CLOUDSTACK-537: cloudstack UI - Advanced SG-enabled zone - VM Wizard - step 5
- when total number of selected sg networks is greater than 0 and total
number of selected networks is greater than 1,
CLOUDSTACK-537: cloudstack UI - Advanced SG-enabled zone - VM Wizard - step 5 - when total number of selected sg networks is greater than 0 and total number of selected networks is greater than 1, pop up client-side validation error message "Can't create a vm with multiple networks one of which is Security Group enabled".
Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/867cb4aa
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/867cb4aa
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/867cb4aa
Branch: refs/heads/events-framework
Commit: 867cb4aa817f8e0135225f3bab6b953c814c49e2
Parents: c02801b
Author: Jessica Wang <je...@citrix.com>
Authored: Tue Jan 29 16:44:58 2013 -0800
Committer: Jessica Wang <je...@citrix.com>
Committed: Tue Jan 29 16:44:58 2013 -0800
----------------------------------------------------------------------
ui/scripts/instanceWizard.js | 2 +-
ui/scripts/ui-custom/instanceWizard.js | 8 +++++++-
2 files changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/867cb4aa/ui/scripts/instanceWizard.js
----------------------------------------------------------------------
diff --git a/ui/scripts/instanceWizard.js b/ui/scripts/instanceWizard.js
index 35a9b6c..e5e2fb7 100644
--- a/ui/scripts/instanceWizard.js
+++ b/ui/scripts/instanceWizard.js
@@ -64,7 +64,7 @@
return $.grep(network.service, function(service) {
return service.name == 'SecurityGroup';
}).length;
- }).length;
+ }).length; //return total number of selected sg networks
},
// Data providers for each wizard step
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/867cb4aa/ui/scripts/ui-custom/instanceWizard.js
----------------------------------------------------------------------
diff --git a/ui/scripts/ui-custom/instanceWizard.js b/ui/scripts/ui-custom/instanceWizard.js
index 6e99384..a30b619 100644
--- a/ui/scripts/ui-custom/instanceWizard.js
+++ b/ui/scripts/ui-custom/instanceWizard.js
@@ -827,9 +827,15 @@
data: cloudStack.serializeForm($form)
});
- if (!advSGFilter) {
+ if (advSGFilter == 0) { //when total number of selected sg networks is 0, then 'Select Security Group' is skipped, go to step 6 directly
showStep(6);
}
+ else { //when total number of selected sg networks > 0
+ if($activeStep.find('input[type=checkbox]:checked').size() > 1) { //when total number of selected networks > 1
+ cloudStack.dialog.notice({ message: "Can't create a vm with multiple networks one of which is Security Group enabled" });
+ return false;
+ }
+ }
}
}