cloudstack 3.0 new UI - listcapabilitiesresponse.capability.securitygroupsenabled is obsolete. Remove it from UI code.

This commit is contained in:
Jessica Wang 2012-02-07 16:50:43 -08:00
parent 107ae09acb
commit fa7b4816b0
3 changed files with 4 additions and 20 deletions

View File

@ -65,8 +65,7 @@
g_username = $.cookie("username");
g_account = $.cookie("account");
g_domainid = $.cookie("domainid");
g_timezone = $.cookie("timezone");
g_directAttachSecurityGroupsEnabled = $.cookie("directattachsecuritygroupsenabled");
g_timezone = $.cookie("timezone");
g_userPublicTemplateEnabled = $.cookie("userpublictemplateenabled");
g_userfullname = $.cookie('userfullname');
g_userid = $.cookie('userid');
@ -74,10 +73,7 @@
if($.cookie("timezoneoffset") != null)
g_timezoneoffset = isNaN($.cookie("timezoneoffset"))?null: parseFloat($.cookie("timezoneoffset"));
else
g_timezoneoffset = null;
if (g_directAttachSecurityGroupsEnabled == null || g_directAttachSecurityGroupsEnabled.length == 0)
g_directAttachSecurityGroupsEnabled = "false";
g_timezoneoffset = null;
if (g_userPublicTemplateEnabled == null || g_userPublicTemplateEnabled.length == 0)
g_userPublicTemplateEnabled = "true";
@ -102,13 +98,7 @@
if (json.listcapabilitiesresponse.capability.userpublictemplateenabled != null) {
g_userPublicTemplateEnabled = json.listcapabilitiesresponse.capability.userpublictemplateenabled.toString(); //convert boolean to string if it's boolean
$.cookie('userpublictemplateenabled', g_userPublicTemplateEnabled, { expires: 1});
}
if (json.listcapabilitiesresponse.capability.securitygroupsenabled != null) {
g_directAttachSecurityGroupsEnabled = json.listcapabilitiesresponse.capability.securitygroupsenabled.toString(); //convert boolean to string if it's boolean
$.cookie('directattachsecuritygroupsenabled', g_directAttachSecurityGroupsEnabled, { expires: 1});
}
}
userValid = true;
},
error: function(xmlHTTP) {
@ -219,11 +209,6 @@
$.cookie('userpublictemplateenabled', g_userPublicTemplateEnabled, { expires: 1});
}
if (json.listcapabilitiesresponse.capability.securitygroupsenabled != null) {
g_directAttachSecurityGroupsEnabled = json.listcapabilitiesresponse.capability.securitygroupsenabled.toString(); //convert boolean to string if it's boolean
$.cookie('directattachsecuritygroupsenabled', g_directAttachSecurityGroupsEnabled, { expires: 1});
}
g_userProjectsEnabled = json.listcapabilitiesresponse.capability.allowusercreateprojects;
$.cookie('userProjectsEnabled', g_userProjectsEnabled, { expires: 1 });

View File

@ -243,7 +243,7 @@
}
});
if(includingSecurityGroupService == false || selectedHypervisor == "VMware" || g_directAttachSecurityGroupsEnabled != "true") {
if(includingSecurityGroupService == false || selectedHypervisor == "VMware") {
step5ContainerType = 'nothing-to-select';
}
else {

View File

@ -8,7 +8,6 @@ var g_enableLogging = false;
var g_timezoneoffset = null;
var g_timezone = null;
var g_supportELB = null;
var g_directAttachSecurityGroupsEnabled = "false";
var g_userPublicTemplateEnabled = "true";
//keyboard keycode