You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bf...@apache.org on 2013/02/28 21:47:54 UTC
[12/50] [abbrv] git commit: refs/heads/ui-multiple-nics - dvswitch UI
integration Complete - Set 4
dvswitch UI integration Complete - Set 4
Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/08b2f773
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/08b2f773
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/08b2f773
Branch: refs/heads/ui-multiple-nics
Commit: 08b2f7734bc9c7968954a1235b32881e017861bf
Parents: c289380
Author: Pranav Saxena <pr...@citrix.com>
Authored: Wed Feb 27 23:44:02 2013 +0530
Committer: Pranav Saxena <pr...@citrix.com>
Committed: Wed Feb 27 23:44:02 2013 +0530
----------------------------------------------------------------------
ui/scripts/system.js | 68 ++++++++++++++++++++++++++++++++++++---
ui/scripts/zoneWizard.js | 71 ++++++++++++++++++++++++++++++++++++++---
2 files changed, 129 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/08b2f773/ui/scripts/system.js
----------------------------------------------------------------------
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index 24a1c59..c564b0b 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -7407,7 +7407,7 @@
if ($(this).val() == "VMware") {
//$('li[input_sub_group="external"]', $dialogAddCluster).show();
- if(dvSwitchEnabled ){
+ if(dvSwitchEnabled == false){
// $form.find('.form-item[rel=vSwitchPublicType]').css('display', 'inline-block');
// $form.find('.form-item[rel=vSwitchGuestType]').css('display', 'inline-block');
// $form.find('.form-item[rel=vSwitchPublicName]').css('display','inline-block');
@@ -7539,14 +7539,42 @@
vSwitchPublicType:{
label: 'Public Traffic vSwitch Type',
select: function(args) {
- var items = []
+ var vSwitchEnabled = false;
+ var items = []
+ $.ajax({
+ url: createURL('listConfigurations'),
+ data: {
+ name: 'vmware.use.nexus.vswitch'
+ },
+ async: false,
+ success: function(json) {
+ if (json.listconfigurationsresponse.configuration[0].value == 'true') {
+ vSwitchEnabled = true;
+ }
+ }
+ });
+
+ if(vSwitchEnabled) {
+
+ items.push({ id:" nexusdvs" , description: "Cisco Nexus 1000v Distributed Virtual Switch"});
+
+ items.push({id: "vmwaresvs", description: "VMware vNetwork Standard Virtual Switch"});
+ items.push({id: "vmwaredvs", description: "VMware vNetwork Distributed Virtual Switch"});
+
- // items.push({id: "" , description:" " });
+
+ }
+
+ // items.push({id: "" , description:" " });
+ else{
items.push({id: "vmwaresvs", description: "VMware vNetwork Standard Virtual Switch"});
items.push({id: "vmwaredvs", description: "VMware vNetwork Distributed Virtual Switch"});
-
+
+
items.push({ id:" nexusdvs" , description: "Cisco Nexus 1000v Distributed Virtual Switch"});
+ }
+
args.response.success({data: items});
},
isHidden:true,
@@ -7574,11 +7602,41 @@
select: function(args) {
var items = []
// items.push({id: "" , description:" " });
+
+ var vSwitchEnabled = false;
+ $.ajax({
+ url: createURL('listConfigurations'),
+ data: {
+ name: 'vmware.use.nexus.vswitch'
+ },
+ async: false,
+ success: function(json) {
+ if (json.listconfigurationsresponse.configuration[0].value == 'true') {
+ vSwitchEnabled = true;
+ }
+ }
+ });
+
+
+ if(vSwitchEnabled){
+ items.push({ id:" nexusdvs" , description: "Cisco Nexus 1000v Distributed Virtual Switch"});
+
items.push({id: "vmwaresvs", description: "VMware vNetwork Standard Virtual Switch"});
- items.push({id: "vmwaredvs", description: "VMware vNetwork Distributed Virtual Switch"});
+ items.push({id: "vmwaredvs", description: "VMware vNetwork Distributed Virtual Switch"});
+
+ }
+
+
+ else{
+
+ items.push({id: "vmwaresvs", description: "VMware vNetwork Standard Virtual Switch"});
+ items.push({id: "vmwaredvs", description: "VMware vNetwork Distributed Virtual Switch"});
+
items.push({ id:" nexusdvs" , description: "Cisco Nexus 1000v Distributed Virtual Switch"});
+
+ }
args.response.success({data: items});
},
isHidden:true,
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/08b2f773/ui/scripts/zoneWizard.js
----------------------------------------------------------------------
diff --git a/ui/scripts/zoneWizard.js b/ui/scripts/zoneWizard.js
index 95a7550..b18334a 100755
--- a/ui/scripts/zoneWizard.js
+++ b/ui/scripts/zoneWizard.js
@@ -772,7 +772,7 @@
if($(this).val() == "VMware") {
//$('li[input_sub_group="external"]', $dialogAddCluster).show();
- if(dvSwitchEnabled ){
+ if(dvSwitchEnabled == false){
/* $form.find('.form-item[rel=vSwitchPublicType]').css('display', 'inline-block');
$form.find('.form-item[rel=vSwitchGuestType]').css('display', 'inline-block');
@@ -871,11 +871,41 @@
label: 'Public Traffic vSwitch Type',
select: function(args) {
var items = []
+ var vSwitchEnabled = false;
+ $.ajax({
+ url: createURL('listConfigurations'),
+ data: {
+ name: 'vmware.use.nexus.vswitch'
+ },
+ async: false,
+ success: function(json) {
+ if (json.listconfigurationsresponse.configuration[0].value == 'true') {
+ vSwitchEnabled = true;
+ }
+ }
+ });
+
+ if(vSwitchEnabled) {
+
+ items.push({ id:" nexusdvs" , description: "Cisco Nexus 1000v Distributed Virtual Switch"});
+
+ items.push({id: "vmwaresvs", description: "VMware vNetwork Standard Virtual Switch"});
+ items.push({id: "vmwaredvs", description: "VMware vNetwork Distributed Virtual Switch"});
- items.push({id: " ", description: " "});
+
+
+ }
+
+ // items.push({id: " ", description: " "});
+ else{
items.push({id: "vmwaresvs", description: "VMware vNetwork Standard Virtual Switch"});
items.push({id: "vmwaredvs", description: "VMware vNetwork Distributed Virtual Switch"});
+
+
+ items.push({ id:" nexusdvs" , description: "Cisco Nexus 1000v Distributed Virtual Switch"});
+
+ }
args.response.success({data: items});
},
isHidden:true,
@@ -902,11 +932,42 @@
label: 'Guest Traffic vSwitch Type',
select: function(args) {
var items = []
- items.push({ id:" ", description:" "});
+ //items.push({ id:" ", description:" "});
+
+ var vSwitchEnabled = false;
+ var items = []
+ $.ajax({
+ url: createURL('listConfigurations'),
+ data: {
+ name: 'vmware.use.nexus.vswitch'
+ },
+ async: false,
+ success: function(json) {
+ if (json.listconfigurationsresponse.configuration[0].value == 'true') {
+ vSwitchEnabled = true;
+ }
+ }
+ });
+
+ if(vSwitchEnabled) {
+
+ items.push({ id:" nexusdvs" , description: "Cisco Nexus 1000v Distributed Virtual Switch"});
+
+ items.push({id: "vmwaresvs", description: "VMware vNetwork Standard Virtual Switch"});
+ items.push({id: "vmwaredvs", description: "VMware vNetwork Distributed Virtual Switch"});
+
+
+
+
+ }
+ else{
items.push({id: "vmwaresvs", description: "VMware vNetwork Standard Virtual Switch"});
items.push({id: "vmwaredvs", description: "VMware vNetwork Distributed Virtual Switch"});
+ items.push({ id:" nexusdvs" , description: "Cisco Nexus 1000v Distributed Virtual Switch"});
+
+ }
args.response.success({data: items});
}, isHidden:true,
@@ -3033,7 +3094,7 @@
//dvswitch is enabled
if(args.data.cluster.vSwitchPublicType != "")
- array1.push('&vswitchtypepublic=' + args.data.cluster.vSwitchPublicType);
+ array1.push('&publicvswitchtype=' + args.data.cluster.vSwitchPublicType);
if(args.data.cluster.vSwitchPublicName != "")
array1.push("&publicvswitchname=" +args.data.cluster.vSwitchPublicName);
@@ -3041,7 +3102,7 @@
if(args.data.cluster.vSwitchGuestType != "")
- array1.push('&vswitchtypeguest=' + args.data.cluster.vSwitchGuestType);
+ array1.push('&guestvswitchtype=' + args.data.cluster.vSwitchGuestType);
if(args.data.cluster.vSwitchGuestName !="")
array1.push("&guestvswitchname=" +args.data.cluster.vSwitchGuestName);