mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-03 04:12:31 +01:00
Removed large chunks of commented code
This commit is contained in:
parent
471a02d6a4
commit
3acdd916b0
@ -1960,15 +1960,6 @@
|
||||
converter: cloudStack.converters.toBooleanText
|
||||
},
|
||||
|
||||
/*
|
||||
isoid: {
|
||||
label: 'label.attached.iso',
|
||||
isEditable: false,
|
||||
converter: function(isoid) {
|
||||
return cloudStack.converters.toBooleanText(isoid != null);
|
||||
}
|
||||
},
|
||||
*/
|
||||
isoname: {
|
||||
label: 'label.attached.iso'
|
||||
},
|
||||
|
||||
@ -196,16 +196,6 @@
|
||||
preAction: function(args) {
|
||||
var region = args.context.regions[0];
|
||||
|
||||
/* e.g.
|
||||
region.endpoint == "http://localhost:8080/client/"
|
||||
document.location.href == "http://localhost:8080/client/#"
|
||||
*/
|
||||
/*
|
||||
if(document.location.href.indexOf(region.endpoint) != -1) {
|
||||
cloudStack.dialog.notice({ message: _l('You can not remove the region that you are currently in.') });
|
||||
return false;
|
||||
}
|
||||
*/
|
||||
return true;
|
||||
},
|
||||
action: function(args) {
|
||||
|
||||
@ -53,15 +53,6 @@
|
||||
vmdisplayname: {
|
||||
label: 'label.vm.display.name'
|
||||
}
|
||||
|
||||
/*
|
||||
state: {
|
||||
label: 'State',
|
||||
indicator: {
|
||||
'Ready': 'on'
|
||||
}
|
||||
}
|
||||
*/
|
||||
},
|
||||
|
||||
// List view actions
|
||||
|
||||
@ -519,7 +519,6 @@
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
//XenServer only (starts here)
|
||||
if (args.$form.find('.form-item[rel=xenserverToolsVersion61plus]').css("display") != "none") {
|
||||
$.extend(data, {
|
||||
@ -528,7 +527,6 @@
|
||||
}
|
||||
//XenServer only (ends here)
|
||||
|
||||
|
||||
//VMware only (starts here)
|
||||
if (args.$form.find('.form-item[rel=rootDiskControllerType]').css("display") != "none" && args.data.rootDiskControllerType != "") {
|
||||
$.extend(data, {
|
||||
@ -555,16 +553,6 @@
|
||||
args.response.success({
|
||||
data: items[0]
|
||||
});
|
||||
/*
|
||||
if(items.length > 1) {
|
||||
for(var i=1; i<items.length; i++) {
|
||||
var $midmenuItem2 = $("#midmenu_item").clone();
|
||||
templateToMidmenu(items[i], $midmenuItem2);
|
||||
bindClickToMidMenu($midmenuItem2, templateToRightPanel, templateGetMidmenuId);
|
||||
$("#midmenu_container").append($midmenuItem2.show());
|
||||
}
|
||||
}
|
||||
*/
|
||||
},
|
||||
error: function(XMLHttpResponse) {
|
||||
var errorMsg = parseXMLHttpResponse(XMLHttpResponse);
|
||||
@ -2691,13 +2679,6 @@
|
||||
allowedActions.push("edit");
|
||||
|
||||
allowedActions.push("copyTemplate");
|
||||
/*
|
||||
if(g_regionsecondaryenabled != true) {
|
||||
allowedActions.push("copyTemplate");
|
||||
}
|
||||
*/
|
||||
|
||||
//allowedActions.push("createVm"); // For Beta2, this simply doesn't work without a network.
|
||||
}
|
||||
|
||||
// "Download Template"
|
||||
@ -2732,11 +2713,6 @@
|
||||
allowedActions.push("edit");
|
||||
|
||||
allowedActions.push("copyISO");
|
||||
/*
|
||||
if(g_regionsecondaryenabled != true) {
|
||||
allowedActions.push("copyISO");
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
// "Create VM"
|
||||
|
||||
@ -36,10 +36,6 @@
|
||||
|
||||
$li.data('region-data', region);
|
||||
|
||||
/* e.g.
|
||||
region.endpoint == "http://localhost:8080/client/"
|
||||
document.location.href == "http://localhost:8080/client/#"
|
||||
*/
|
||||
if (document.location.href.indexOf(region.endpoint) != -1) {
|
||||
currentRegion = region;
|
||||
$li.addClass('active');
|
||||
|
||||
@ -1060,22 +1060,6 @@
|
||||
isOddRow = true;
|
||||
}
|
||||
|
||||
//???
|
||||
/*
|
||||
if("pollAgainIfValueIsIn" in value) {
|
||||
if ((content in value.pollAgainIfValueIsIn) && (value.pollAgainFn != null)) {
|
||||
//poll again
|
||||
var intervalKey = setInterval(function() {
|
||||
var toClearInterval = value.pollAgainFn(context);
|
||||
if(toClearInterval == true) {
|
||||
clearInterval(intervalKey);
|
||||
$('.detail-view .toolbar .button.refresh').click(); //click Refresh button to refresh detailView
|
||||
}
|
||||
}, 2000);
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
$name.html(_l(value.label));
|
||||
$value.html(_s(content));
|
||||
$value.attr('title', _s(content));
|
||||
|
||||
@ -275,7 +275,7 @@
|
||||
});
|
||||
} else {
|
||||
$newRow = replaceItem($instanceRow,
|
||||
args.data, //$.extend($instanceRow.data('json-obj'), args.data), /* $.extend($instanceRow.data('json-obj'), args.data) causes CLOUDSTACK-4687 */
|
||||
args.data,
|
||||
actionFilter);
|
||||
}
|
||||
} else {
|
||||
|
||||
@ -143,20 +143,6 @@
|
||||
$.extend(vm, { _subselect: $vmRow.find('.subselect select').val() });
|
||||
});
|
||||
|
||||
/*
|
||||
var array1 = [];
|
||||
for (var i = 0; i < vms.length; i++) {
|
||||
array1.push(vms[i].id);
|
||||
}
|
||||
var virtualmachineids = array1.join(',');
|
||||
var inputData = {
|
||||
id: args.context.internalLoadBalancers[0].id,
|
||||
virtualmachineids: virtualmachineids
|
||||
};
|
||||
*/
|
||||
//virtualmachineids parameter has been replaced with vmidipmap parameter, so comment out the lines above.
|
||||
|
||||
|
||||
var inputData = {
|
||||
id: args.context.internalLoadBalancers[0].id
|
||||
};
|
||||
@ -176,14 +162,6 @@
|
||||
for (var ipIndex = 0; ipIndex < selectedIPs.length; ipIndex++) {
|
||||
inputData['vmidipmap[' + vmidipmapIndex + '].vmid'] = selectedVMs[vmIndex].id;
|
||||
|
||||
//"ipAddresses" is not in args.context since this LB rule is under a VPC, not an address.
|
||||
/*
|
||||
if (args.context.ipAddresses[0].isportable) {
|
||||
inputData['vmidipmap[' + vmidipmapIndex + '].vmip'] = selectedIPs[ipIndex].split(',')[1];
|
||||
} else {
|
||||
inputData['vmidipmap[' + vmidipmapIndex + '].vmip'] = selectedIPs[ipIndex];
|
||||
}
|
||||
*/
|
||||
inputData['vmidipmap[' + vmidipmapIndex + '].vmip'] = selectedIPs[ipIndex];
|
||||
|
||||
vmidipmapIndex++;
|
||||
|
||||
@ -961,37 +961,15 @@
|
||||
});
|
||||
|
||||
if ($(this).val() == "VMware") {
|
||||
//$('li[input_sub_group="external"]', $dialogAddCluster).show();
|
||||
if (dvSwitchEnabled) {
|
||||
/*
|
||||
$fields.filter('[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');
|
||||
$form.find('.form-item[rel=vSwitchGuestName]').css('display','inline-block');
|
||||
|
||||
$form.find('.form-item[rel=overridepublictraffic]').find('input[type=checkbox]').css('display','inline-block');
|
||||
$form.find('.form-item[rel=overrideguesttraffic]').find('input[type=checkbox]').css('display','inline-block');
|
||||
*/
|
||||
|
||||
$form.find('.form-item[rel=overridepublictraffic]').css('display', 'inline-block');
|
||||
$form.find('.form-item[rel=overridepublictraffic]').find('input[type=checkbox]').removeAttr('checked');
|
||||
|
||||
$form.find('.form-item[rel=overrideguesttraffic]').css('display', 'inline-block');
|
||||
$form.find('.form-item[rel=overrideguesttraffic]').find('input[type=checkbox]').removeAttr('checked');
|
||||
|
||||
|
||||
|
||||
} else {
|
||||
/*
|
||||
$form.find('.form-item[rel=vSwitchPublicType]').css('display', 'none');
|
||||
$form.find('.form-item[rel=vSwitchGuestType]').css('display', 'none');
|
||||
$form.find('.form-item[rel=vSwitchPublicName]').css('display','none');
|
||||
$form.find('.form-item[rel=vSwitchGuestName]').css('display','none');
|
||||
*/
|
||||
$form.find('.form-item[rel=overridepublictraffic]').css('display', 'none');
|
||||
$form.find('.form-item[rel=overrideguesttraffic]').css('display', 'none');
|
||||
|
||||
}
|
||||
|
||||
$form.find('[rel=vCenterHost]').css('display', 'block');
|
||||
@ -1004,7 +982,6 @@
|
||||
} else {
|
||||
$vsmFields.css('display', 'none');
|
||||
}
|
||||
//$("#cluster_name_label", $dialogAddCluster).text("vCenter Cluster:");
|
||||
} else if ($(this).val() == "Ovm3") {
|
||||
$form.find('.form-item[rel=ovm3pool]').css('display', 'inline-block');
|
||||
$form.find('.form-item[rel=ovm3pool]').find('input[type=checkbox]').removeAttr('checked');
|
||||
@ -1013,22 +990,13 @@
|
||||
$form.find('.form-item[rel=ovm3cluster]').find('input[type=checkbox]').removeAttr('checked');
|
||||
$form.find('[rel=ovm3vip]').css('display', 'block');
|
||||
} else {
|
||||
//$('li[input_group="vmware"]', $dialogAddCluster).hide();
|
||||
|
||||
$form.find('.form-item[rel=overridepublictraffic]').css('display', 'none');
|
||||
$form.find('.form-item[rel=overrideguesttraffic]').css('display', 'none');
|
||||
//$form.find('.form-item[rel=vSwitchPublicType]').css('display', 'none');
|
||||
//$form.find('.form-item[rel=vSwitchGuestType]').css('display', 'none');
|
||||
//$form.find('.form-item[rel=vSwitchPublicName]').css('display', 'none');
|
||||
//$form.find('.form-item[rel=vSwitchGuestName]').css('display', 'none');
|
||||
|
||||
|
||||
$form.find('[rel=vCenterHost]').css('display', 'none');
|
||||
$form.find('[rel=vCenterUsername]').css('display', 'none');
|
||||
$form.find('[rel=vCenterPassword]').css('display', 'none');
|
||||
$form.find('[rel=vCenterDatacenter]').css('display', 'none');
|
||||
|
||||
//$("#cluster_name_label", $dialogAddCluster).text("Cluster:");
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -1075,79 +1043,6 @@
|
||||
|
||||
},
|
||||
|
||||
/*
|
||||
vSwitchPublicType: {
|
||||
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: " "});
|
||||
else {
|
||||
items.push({
|
||||
id: "vmwaredvs",
|
||||
description: "VMware vNetwork Distributed Virtual Switch"
|
||||
});
|
||||
items.push({
|
||||
id: "vmwaresvs",
|
||||
description: "VMware vNetwork Standard Virtual Switch"
|
||||
});
|
||||
items.push({
|
||||
id: "nexusdvs",
|
||||
description: "Cisco Nexus 1000v Distributed Virtual Switch"
|
||||
});
|
||||
|
||||
}
|
||||
args.response.success({
|
||||
data: items
|
||||
});
|
||||
},
|
||||
isHidden: true,
|
||||
dependsOn: 'overridepublictraffic'
|
||||
},
|
||||
*/
|
||||
|
||||
/*
|
||||
vSwitchPublicName: {
|
||||
label: 'Public Traffic vSwitch Name',
|
||||
dependsOn: 'overridepublictraffic',
|
||||
isHidden: true
|
||||
},
|
||||
*/
|
||||
|
||||
overrideguesttraffic: {
|
||||
label: 'label.override.guest.traffic',
|
||||
isBoolean: true,
|
||||
@ -1155,81 +1050,6 @@
|
||||
|
||||
},
|
||||
|
||||
/*
|
||||
vSwitchGuestType: {
|
||||
label: 'Guest Traffic vSwitch Type',
|
||||
select: function(args) {
|
||||
var items = []
|
||||
//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: "vmwaredvs",
|
||||
description: "VMware vNetwork Distributed Virtual Switch"
|
||||
});
|
||||
items.push({
|
||||
id: "vmwaresvs",
|
||||
description: "VMware vNetwork Standard Virtual Switch"
|
||||
});
|
||||
items.push({
|
||||
id: "nexusdvs",
|
||||
description: "Cisco Nexus 1000v Distributed Virtual Switch"
|
||||
});
|
||||
|
||||
}
|
||||
args.response.success({
|
||||
data: items
|
||||
});
|
||||
|
||||
},
|
||||
isHidden: true,
|
||||
dependsOn: 'overrideguesttraffic'
|
||||
|
||||
},
|
||||
*/
|
||||
|
||||
/*
|
||||
vSwitchGuestName: {
|
||||
label: 'Guest Traffic vSwitch Name',
|
||||
dependsOn: 'overrideguesttraffic',
|
||||
isHidden: true
|
||||
},
|
||||
*/
|
||||
|
||||
//Cisco Nexus Vswitch
|
||||
vsmipaddress: {
|
||||
label: 'label.cisco.nexus1000v.ip.address',
|
||||
@ -1265,25 +1085,20 @@
|
||||
var $form = args.$form;
|
||||
|
||||
if (selectedClusterObj.hypervisortype == "VMware") {
|
||||
//$('li[input_group="general"]', $dialogAddHost).hide();
|
||||
$form.find('[rel=hostname]').hide();
|
||||
$form.find('[rel=username]').hide();
|
||||
$form.find('[rel=password]').hide();
|
||||
|
||||
//$('li[input_group="vmware"]', $dialogAddHost).show();
|
||||
$form.find('[rel=vcenterHost]').css('display', 'block');
|
||||
|
||||
//$('li[input_group="baremetal"]', $dialogAddHost).hide();
|
||||
$form.find('[rel=baremetalCpuCores]').hide();
|
||||
$form.find('[rel=baremetalCpu]').hide();
|
||||
$form.find('[rel=baremetalMemory]').hide();
|
||||
$form.find('[rel=baremetalMAC]').hide();
|
||||
|
||||
//$('li[input_group="Ovm"]', $dialogAddHost).hide();
|
||||
$form.find('[rel=agentUsername]').hide();
|
||||
$form.find('[rel=agentPassword]').hide();
|
||||
|
||||
//$('li[input_group="Ovm3"]', $dialogAddHost).hide();
|
||||
$form.find('.form-item[rel=agentUsername]').hide();
|
||||
$form.find('.form-item[rel=agentPassword]').hide();
|
||||
$form.find('.form-item[rel=agentPort]').hide();
|
||||
@ -1291,25 +1106,20 @@
|
||||
$form.find('.form-item[rel=ovm3pool]').hide();
|
||||
$form.find('.form-item[rel=ovm3cluster]').hide();
|
||||
} else if (selectedClusterObj.hypervisortype == "BareMetal") {
|
||||
//$('li[input_group="general"]', $dialogAddHost).show();
|
||||
$form.find('[rel=hostname]').css('display', 'block');
|
||||
$form.find('[rel=username]').css('display', 'block');
|
||||
$form.find('[rel=password]').css('display', 'block');
|
||||
|
||||
//$('li[input_group="baremetal"]', $dialogAddHost).show();
|
||||
$form.find('[rel=baremetalCpuCores]').css('display', 'block');
|
||||
$form.find('[rel=baremetalCpu]').css('display', 'block');
|
||||
$form.find('[rel=baremetalMemory]').css('display', 'block');
|
||||
$form.find('[rel=baremetalMAC]').css('display', 'block');
|
||||
|
||||
//$('li[input_group="vmware"]', $dialogAddHost).hide();
|
||||
$form.find('[rel=vcenterHost]').hide();
|
||||
|
||||
//$('li[input_group="Ovm"]', $dialogAddHost).hide();
|
||||
$form.find('[rel=agentUsername]').hide();
|
||||
$form.find('[rel=agentPassword]').hide();
|
||||
|
||||
//$('li[input_group="Ovm3"]', $dialogAddHost).hide();
|
||||
$form.find('.form-item[rel=agentUsername]').hide();
|
||||
$form.find('.form-item[rel=agentPassword]').hide();
|
||||
$form.find('.form-item[rel=agentPort]').hide();
|
||||
@ -1317,46 +1127,37 @@
|
||||
$form.find('.form-item[rel=ovm3pool]').hide();
|
||||
$form.find('.form-item[rel=ovm3cluster]').hide();
|
||||
} else if (selectedClusterObj.hypervisortype == "Ovm") {
|
||||
//$('li[input_group="general"]', $dialogAddHost).show();
|
||||
$form.find('[rel=hostname]').css('display', 'block');
|
||||
$form.find('[rel=username]').css('display', 'block');
|
||||
$form.find('[rel=password]').css('display', 'block');
|
||||
|
||||
//$('li[input_group="vmware"]', $dialogAddHost).hide();
|
||||
$form.find('[rel=vcenterHost]').hide();
|
||||
|
||||
//$('li[input_group="baremetal"]', $dialogAddHost).hide();
|
||||
$form.find('[rel=baremetalCpuCores]').hide();
|
||||
$form.find('[rel=baremetalCpu]').hide();
|
||||
$form.find('[rel=baremetalMemory]').hide();
|
||||
$form.find('[rel=baremetalMAC]').hide();
|
||||
|
||||
//$('li[input_group="Ovm"]', $dialogAddHost).show();
|
||||
$form.find('[rel=agentUsername]').css('display', 'block');
|
||||
$form.find('[rel=agentUsername]').find('input').val("oracle");
|
||||
$form.find('[rel=agentPassword]').css('display', 'block');
|
||||
|
||||
//$('li[input_group="Ovm3"]', $dialogAddHost).hide();
|
||||
$form.find('.form-item[rel=agentPort]').hide();
|
||||
$form.find('.form-item[rel=ovm3vip]').hide();
|
||||
$form.find('.form-item[rel=ovm3pool]').hide();
|
||||
$form.find('.form-item[rel=ovm3cluster]').hide();
|
||||
} else if (selectedClusterObj.hypervisortype == "Ovm3") {
|
||||
//$('li[input_group="general"]', $dialogAddHost).show();
|
||||
$form.find('.form-item[rel=hostname]').css('display', 'inline-block');
|
||||
$form.find('.form-item[rel=username]').css('display', 'inline-block');
|
||||
$form.find('.form-item[rel=password]').css('display', 'inline-block');
|
||||
|
||||
//$('li[input_group="vmware"]', $dialogAddHost).hide();
|
||||
$form.find('.form-item[rel=vcenterHost]').hide();
|
||||
|
||||
//$('li[input_group="baremetal"]', $dialogAddHost).hide();
|
||||
$form.find('.form-item[rel=baremetalCpuCores]').hide();
|
||||
$form.find('.form-item[rel=baremetalCpu]').hide();
|
||||
$form.find('.form-item[rel=baremetalMemory]').hide();
|
||||
$form.find('.form-item[rel=baremetalMAC]').hide();
|
||||
|
||||
//$('li[input_group="Ovm3"]', $dialogAddHost).show();
|
||||
$form.find('.form-item[rel=agentUsername]').css('display', 'inline-block');
|
||||
$form.find('.form-item[rel=agentUsername]').find('input').val("oracle");
|
||||
$form.find('.form-item[rel=agentPassword]').css('display', 'inline-block');
|
||||
@ -1366,24 +1167,20 @@
|
||||
$form.find('.form-item[rel=ovm3pool]').css('display', 'inline-block');
|
||||
$form.find('.form-item[rel=ovm3cluster]').css('display', 'inline-block');
|
||||
} else {
|
||||
//$('li[input_group="general"]', $dialogAddHost).show();
|
||||
$form.find('[rel=hostname]').css('display', 'block');
|
||||
$form.find('[rel=username]').css('display', 'block');
|
||||
$form.find('[rel=password]').css('display', 'block');
|
||||
|
||||
//$('li[input_group="vmware"]', $dialogAddHost).hide();
|
||||
$form.find('[rel=vcenterHost]').hide();
|
||||
|
||||
//$('li[input_group="baremetal"]', $dialogAddHost).hide();
|
||||
$form.find('[rel=baremetalCpuCores]').hide();
|
||||
$form.find('[rel=baremetalCpu]').hide();
|
||||
$form.find('[rel=baremetalMemory]').hide();
|
||||
$form.find('[rel=baremetalMAC]').hide();
|
||||
|
||||
//$('li[input_group="Ovm"]', $dialogAddHost).hide();
|
||||
$form.find('[rel=agentUsername]').hide();
|
||||
$form.find('[rel=agentPassword]').hide();
|
||||
//$('li[input_group="Ovm3"]', $dialogAddHost).hide();
|
||||
|
||||
$form.find('.form-item[rel=agentPort]').hide();
|
||||
$form.find('.form-item[rel=ovm3vip]').hide();
|
||||
$form.find('.form-item[rel=ovm3pool]').hide();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user