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/09/06 00:31:01 UTC
git commit: updated refs/heads/4.2-forward to eb9ab67
Updated Branches:
refs/heads/4.2-forward e1e6f9330 -> eb9ab676f
CLOUDSTACK-4089: zone wizard > hypervisor VMware > if zoneType is Basic, not show vSwitchType dropdown in Edit Traffic Type for Guest.
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/eb9ab676
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/eb9ab676
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/eb9ab676
Branch: refs/heads/4.2-forward
Commit: eb9ab676f6463df50e22460af2a3376f3206b0ee
Parents: e1e6f93
Author: Jessica Wang <je...@apache.org>
Authored: Thu Sep 5 15:26:33 2013 -0700
Committer: Jessica Wang <je...@apache.org>
Committed: Thu Sep 5 15:30:33 2013 -0700
----------------------------------------------------------------------
ui/scripts/ui-custom/zoneWizard.js | 130 ++++++++++++++++----------------
1 file changed, 66 insertions(+), 64 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/eb9ab676/ui/scripts/ui-custom/zoneWizard.js
----------------------------------------------------------------------
diff --git a/ui/scripts/ui-custom/zoneWizard.js b/ui/scripts/ui-custom/zoneWizard.js
index 695534f..bb33929 100644
--- a/ui/scripts/ui-custom/zoneWizard.js
+++ b/ui/scripts/ui-custom/zoneWizard.js
@@ -294,7 +294,7 @@
var trafficData = $trafficType.data('traffic-type-data') ?
$trafficType.data('traffic-type-data') : {};
var hypervisor = getData($trafficType.closest('.zone-wizard')).zone.hypervisor;
-
+ var zoneType = getData($trafficType.closest('.zone-wizard')).zone.networkType;
var fields;
if (hypervisor == 'VMware') {
@@ -309,69 +309,71 @@
}
};
- 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';
- fields.vSwitchName.defaultValue = 'epp0';
- } else {
- trafficData.vSwitchType = 'vmwaredvs';
- fields.vSwitchName.defaultValue = 'dvSwitch0';
- }
- } else { //useDvs == false
- trafficData.vSwitchType = 'vmwaresvs';
- fields.vSwitchName.defaultValue = 'vSwitch0';
- }
- }
-
- $.extend(fields, {
- vSwitchType: {
- label: 'vSwitch Type',
- select: function (args) {
- args.response.success({
- data: [{
- id: 'nexusdvs',
- description: 'Cisco Nexus 1000v Distributed Virtual Switch'
- }, {
- id: 'vmwaresvs',
- description: 'VMware vNetwork Standard Virtual Switch'
- }, {
- id: 'vmwaredvs',
- description: 'VMware vNetwork Distributed Virtual Switch'
- }]
- });
- },
- defaultValue: trafficData.vSwitchType
- }
- });
- }
+ if(zoneType == 'Advanced') {
+ 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';
+ fields.vSwitchName.defaultValue = 'epp0';
+ } else {
+ trafficData.vSwitchType = 'vmwaredvs';
+ fields.vSwitchName.defaultValue = 'dvSwitch0';
+ }
+ } else { //useDvs == false
+ trafficData.vSwitchType = 'vmwaresvs';
+ fields.vSwitchName.defaultValue = 'vSwitch0';
+ }
+ }
+
+ $.extend(fields, {
+ vSwitchType: {
+ label: 'vSwitch Type',
+ select: function (args) {
+ args.response.success({
+ data: [{
+ id: 'nexusdvs',
+ description: 'Cisco Nexus 1000v Distributed Virtual Switch'
+ }, {
+ id: 'vmwaresvs',
+ description: 'VMware vNetwork Standard Virtual Switch'
+ }, {
+ id: 'vmwaredvs',
+ description: 'VMware vNetwork Distributed Virtual Switch'
+ }]
+ });
+ },
+ defaultValue: trafficData.vSwitchType
+ }
+ });
+ }
+ }
} else {
fields = {
label: {