mirror of https://github.com/apache/cloudstack.git
Removed network type from the UI as it is no longer used anymore.
This commit is contained in:
parent
7a8cc8c087
commit
7270b2f285
|
|
@ -63,7 +63,6 @@ $(document).ready(function() {
|
|||
success: function(json) {
|
||||
$.cookie('username', json.loginresponse.username);
|
||||
$.cookie('role', json.loginresponse.type);
|
||||
$.cookie('networktype', json.loginresponse.networktype);
|
||||
$.cookie('hypervisortype', json.loginresponse.hypervisortype);
|
||||
$.cookie('domainid', '1'); //e.g. domainid of ROOT domain is 1
|
||||
$.cookie('account', json.loginresponse.account);
|
||||
|
|
|
|||
|
|
@ -528,8 +528,6 @@ $(document).ready(function() {
|
|||
g_domainid = json.loginresponse.domainid;
|
||||
g_timezone = json.loginresponse.timezone;
|
||||
g_timezoneoffset = json.loginresponse.timezoneoffset;
|
||||
if (json.loginresponse.networktype != null)
|
||||
g_networkType = json.loginresponse.networktype;
|
||||
if (json.loginresponse.hypervisortype != null)
|
||||
g_hypervisorType = json.loginresponse.hypervisortype;
|
||||
if (json.loginresponse.directattachnetworkgroupsenabled != null)
|
||||
|
|
@ -540,7 +538,6 @@ $(document).ready(function() {
|
|||
g_systemVmUseLocalStorage = json.loginresponse.systemvmuselocalstorage;
|
||||
|
||||
$.cookie('sessionKey', g_sessionKey, { expires: 1});
|
||||
$.cookie('networktype', g_networkType, { expires: 1});
|
||||
$.cookie('hypervisortype', g_hypervisorType, { expires: 1});
|
||||
$.cookie('username', g_username, { expires: 1});
|
||||
$.cookie('account', g_account, { expires: 1});
|
||||
|
|
@ -601,7 +598,6 @@ $(document).ready(function() {
|
|||
g_username = $.cookie("username");
|
||||
g_account = $.cookie("account");
|
||||
g_domainid = $.cookie("domainid");
|
||||
g_networkType = $.cookie("networktype");
|
||||
g_hypervisorType = $.cookie("hypervisortype");
|
||||
g_timezone = $.cookie("timezone");
|
||||
g_directAttachNetworkGroupsEnabled = $.cookie("directattachnetworkgroupsenabled");
|
||||
|
|
@ -613,9 +609,6 @@ $(document).ready(function() {
|
|||
else
|
||||
g_timezoneoffset = null;
|
||||
|
||||
if (!g_networkType || g_networkType.length == 0)
|
||||
g_networkType = "vnet";
|
||||
|
||||
if (!g_hypervisorType || g_hypervisorType.length == 0)
|
||||
g_hypervisorType = "kvm";
|
||||
|
||||
|
|
|
|||
|
|
@ -1136,9 +1136,6 @@ var g_timezoneoffset = null;
|
|||
var g_timezone = null;
|
||||
|
||||
// capabilities
|
||||
var g_networkType = "vnet"; // vnet, vlan, direct
|
||||
function getNetworkType() { return g_networkType; }
|
||||
|
||||
var g_hypervisorType = "kvm";
|
||||
function getHypervisorType() { return g_hypervisorType; }
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
var networkType = "Basic";
|
||||
function afterLoadZoneJSP($leftmenuItem1) {
|
||||
hideMiddleMenu();
|
||||
|
||||
|
|
@ -26,7 +26,8 @@
|
|||
var pods;
|
||||
var zoneObj = $leftmenuItem1.data("jsonObj");
|
||||
var zoneId = zoneObj.id;
|
||||
var zoneName = zoneObj.name;
|
||||
var zoneName = zoneObj.name;
|
||||
networkType = zoneObj.networktype;
|
||||
$.ajax({
|
||||
data: createURL("command=listPods&zoneid="+zoneId),
|
||||
dataType: "json",
|
||||
|
|
@ -46,8 +47,6 @@
|
|||
initDialog("dialog_confirmation_delete_secondarystorage");
|
||||
|
||||
// If the network type is vnet, don't show any vlan stuff.
|
||||
if (getNetworkType() == "vnet")
|
||||
$("#dialog_add_vlan_for_zone").attr("title", "Add Public IP Range");
|
||||
bindEventHandlerToDialogAddVlanForZone();
|
||||
|
||||
//switch between different tabs in zone page
|
||||
|
|
@ -376,13 +375,13 @@ function initAddVLANButton($button, $leftmenuItem1) {
|
|||
$("#tab_network").click();
|
||||
|
||||
var zoneObj = $leftmenuItem1.data("jsonObj");
|
||||
var dialogAddVlanForZone = $("#dialog_add_vlan_for_zone");
|
||||
var dialogAddVlanForZone = $("#dialog_add_vlan_for_zone");
|
||||
dialogAddVlanForZone.find("#info_container").hide();
|
||||
dialogAddVlanForZone.find("#zone_name").text(fromdb(zoneObj.name));
|
||||
dialogAddVlanForZone.find("#add_publicip_vlan_vlan_container, #add_publicip_vlan_domain_container, #add_publicip_vlan_account_container").hide();
|
||||
dialogAddVlanForZone.find("#add_publicip_vlan_tagged, #add_publicip_vlan_vlan, #add_publicip_vlan_gateway, #add_publicip_vlan_netmask, #add_publicip_vlan_startip, #add_publicip_vlan_endip, #add_publicip_vlan_account").val("");
|
||||
|
||||
if (getNetworkType() == 'vnet') {
|
||||
if (zoneObj.networktype == 'Basic') {
|
||||
dialogAddVlanForZone.find("#add_publicip_vlan_type_container").hide();
|
||||
} else {
|
||||
dialogAddVlanForZone.find("#add_publicip_vlan_pod_container").show();
|
||||
|
|
@ -746,7 +745,6 @@ function secondaryStorageJSONToTemplate(json, template) {
|
|||
function bindEventHandlerToDialogAddVlanForZone() {
|
||||
//direct VLAN shows only "tagged" option while public VLAN shows both "tagged" and "untagged" option.
|
||||
var dialogAddVlanForZone = $("#dialog_add_vlan_for_zone");
|
||||
|
||||
dialogAddVlanForZone.find("#add_publicip_vlan_type").change(function(event) {
|
||||
var addPublicipVlanTagged = dialogAddVlanForZone.find("#add_publicip_vlan_tagged").empty();
|
||||
|
||||
|
|
@ -773,7 +771,7 @@ function bindEventHandlerToDialogAddVlanForZone() {
|
|||
return false;
|
||||
});
|
||||
|
||||
if (getNetworkType() != "vnet") {
|
||||
if (networkType == "Advanced") {
|
||||
dialogAddVlanForZone.find("#add_publicip_vlan_tagged").change(function(event) {
|
||||
if ($(this).val() == "tagged") {
|
||||
dialogAddVlanForZone.find("#add_publicip_vlan_vlan_container").show();
|
||||
|
|
|
|||
Loading…
Reference in New Issue