You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by je...@apache.org on 2013/08/30 23:56:43 UTC
git commit: updated refs/heads/master to 94cd470
Updated Branches:
refs/heads/master d4d42bb22 -> 94cd470a0
CLOUDSTACK-4089: UI > zone wizard > VMware hypervisor > physical network > edit Public/Guest traffic type > vSwitchType dropdown > set default option upon configuration 'vmware.use.dvswtich' and 'vmware.use.nexus.vswitch'.
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/94cd470a
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/94cd470a
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/94cd470a
Branch: refs/heads/master
Commit: 94cd470a0ae52ca79b703b251c973a465232366c
Parents: d4d42bb
Author: Jessica Wang <je...@apache.org>
Authored: Fri Aug 30 14:52:44 2013 -0700
Committer: Jessica Wang <je...@apache.org>
Committed: Fri Aug 30 14:56:29 2013 -0700
----------------------------------------------------------------------
ui/scripts/ui-custom/zoneWizard.js | 40 ++++++++++++++++++++++++++++++++-
1 file changed, 39 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/94cd470a/ui/scripts/ui-custom/zoneWizard.js
----------------------------------------------------------------------
diff --git a/ui/scripts/ui-custom/zoneWizard.js b/ui/scripts/ui-custom/zoneWizard.js
index 254ea63..a1c5803 100644
--- a/ui/scripts/ui-custom/zoneWizard.js
+++ b/ui/scripts/ui-custom/zoneWizard.js
@@ -309,7 +309,45 @@
}
};
- if($trafficType.hasClass('guest') || $trafficType.hasClass('public')) {
+ if($trafficType.hasClass('guest') || $trafficType.hasClass('public')) {
+ if(trafficData.vSwitchType == null) {
+ var useDvs = false;
+ $.ajax({
+ url: createURL('listConfigurations'),
+ data: {
+ name: 'vmware.use.dvswitch'
+ },
+ async: false,
+ success: function(json) {
+ if (json.listconfigurationsresponse.configuration[0].value == 'true') {
+ useDvs = true;
+ }
+ }
+ });
+ if (useDvs == true) {
+ var useNexusDvs = false;
+ $.ajax({
+ url: createURL('listConfigurations'),
+ data: {
+ name: 'vmware.use.nexus.vswitch'
+ },
+ async: false,
+ success: function(json) {
+ if (json.listconfigurationsresponse.configuration[0].value == 'true') {
+ useNexusDvs = true;
+ }
+ }
+ });
+ if (useNexusDvs == true) {
+ trafficData.vSwitchType = 'nexusdvs';
+ } else {
+ trafficData.vSwitchType = 'vmwaredvs';
+ }
+ } else { //useDvs == false
+ trafficData.vSwitchType = 'vmwaresvs';
+ }
+ }
+
$.extend(fields, {
vSwitchType: {
label: 'vSwitch Type',