mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Removed hypervisor.type from the login response since this capability does make sense anymore in 2.2
This commit is contained in:
parent
df5d64bb85
commit
953c862713
@ -663,11 +663,6 @@ public class ApiServer implements HttpRequestHandler {
|
||||
|
||||
Account account = _ms.findAccountById(userAcct.getAccountId());
|
||||
|
||||
String hypervisorType = _ms.getConfigurationValue("hypervisor.type");
|
||||
if (hypervisorType == null) {
|
||||
hypervisorType = "kvm";
|
||||
}
|
||||
|
||||
// set the userId and account object for everyone
|
||||
session.setAttribute("userid", userAcct.getId());
|
||||
session.setAttribute("username", userAcct.getUsername());
|
||||
@ -677,7 +672,6 @@ public class ApiServer implements HttpRequestHandler {
|
||||
session.setAttribute("account", account.getAccountName());
|
||||
session.setAttribute("domainid", account.getDomainId());
|
||||
session.setAttribute("type", Short.valueOf(account.getType()).toString());
|
||||
session.setAttribute("hypervisortype", hypervisorType);
|
||||
|
||||
if (timezone != null) {
|
||||
session.setAttribute("timezone", timezone);
|
||||
|
||||
@ -692,11 +692,8 @@ $(document).ready(function() {
|
||||
g_domainid = json.loginresponse.domainid;
|
||||
g_timezone = json.loginresponse.timezone;
|
||||
g_timezoneoffset = json.loginresponse.timezoneoffset;
|
||||
if (json.loginresponse.hypervisortype != null)
|
||||
g_hypervisorType = json.loginresponse.hypervisortype;
|
||||
|
||||
$.cookie('sessionKey', g_sessionKey, { expires: 1});
|
||||
$.cookie('hypervisortype', g_hypervisorType, { expires: 1});
|
||||
$.cookie('username', g_username, { expires: 1});
|
||||
$.cookie('account', g_account, { expires: 1});
|
||||
$.cookie('domainid', g_domainid, { expires: 1});
|
||||
@ -775,7 +772,6 @@ $(document).ready(function() {
|
||||
g_username = $.cookie("username");
|
||||
g_account = $.cookie("account");
|
||||
g_domainid = $.cookie("domainid");
|
||||
g_hypervisorType = $.cookie("hypervisortype");
|
||||
g_timezone = $.cookie("timezone");
|
||||
g_directAttachSecurityGroupsEnabled = $.cookie("directattachsecuritygroupsenabled");
|
||||
g_userPublicTemplateEnabled = $.cookie("userpublictemplateenabled");
|
||||
@ -785,9 +781,6 @@ $(document).ready(function() {
|
||||
else
|
||||
g_timezoneoffset = null;
|
||||
|
||||
if (!g_hypervisorType || g_hypervisorType.length == 0)
|
||||
g_hypervisorType = "kvm";
|
||||
|
||||
if (!g_directAttachSecurityGroupsEnabled || g_directAttachSecurityGroupsEnabled.length == 0)
|
||||
g_directAttachSecurityGroupsEnabled = "false";
|
||||
|
||||
|
||||
@ -1961,11 +1961,9 @@ function vmVolumeJSONToTemplate(json, $template) {
|
||||
buildActionLinkForSubgridItem("Take Snapshot", vmVolumeActionMap, $actionMenu, $template);
|
||||
noAvailableActions = false;
|
||||
|
||||
var hasCreateTemplate = false;
|
||||
if(json.type=="ROOT") { //"create template" is allowed(when stopped), "detach disk" is disallowed.
|
||||
if (json.vmstate == "Stopped") {
|
||||
buildActionLinkForSubgridItem("Create Template", vmVolumeActionMap, $actionMenu, $template);
|
||||
hasCreateTemplate = true;
|
||||
noAvailableActions = false;
|
||||
}
|
||||
}
|
||||
@ -1974,11 +1972,6 @@ function vmVolumeJSONToTemplate(json, $template) {
|
||||
noAvailableActions = false;
|
||||
}
|
||||
|
||||
if (getHypervisorType() == "kvm" && hasCreateTemplate == false) {
|
||||
buildActionLinkForSubgridItem("Create Template", vmVolumeActionMap, $actionMenu, $template);
|
||||
noAvailableActions = false;
|
||||
}
|
||||
|
||||
// no available actions
|
||||
if(noAvailableActions == true) {
|
||||
$actionMenu.find("#action_list").append($("#no_available_actions").clone().show());
|
||||
|
||||
@ -1217,9 +1217,6 @@ var g_timezoneoffset = null;
|
||||
var g_timezone = null;
|
||||
|
||||
// capabilities
|
||||
var g_hypervisorType = "kvm";
|
||||
function getHypervisorType() { return g_hypervisorType; }
|
||||
|
||||
var g_directAttachSecurityGroupsEnabled = "false";
|
||||
function getDirectAttachSecurityGroupsEnabled() { return g_directAttachSecurityGroupsEnabled; }
|
||||
|
||||
|
||||
@ -1629,8 +1629,9 @@ function initAddPrimaryStorageShortcut($midmenuAddLink2, currentPageInRightPanel
|
||||
var $dialogAddPool = $("#dialog_add_pool_in_resource_page");
|
||||
|
||||
// if hypervisor is KVM, limit the server option to NFS for now
|
||||
if (getHypervisorType() == 'kvm')
|
||||
$dialogAddPool.find("#add_pool_protocol").empty().html('<option value="nfs">NFS</option>');
|
||||
// TODO: Fix this to use the hypervisor from the cluster
|
||||
//if (getHypervisorType() == 'kvm')
|
||||
// $dialogAddPool.find("#add_pool_protocol").empty().html('<option value="nfs">NFS</option>');
|
||||
bindEventHandlerToDialogAddPool($dialogAddPool);
|
||||
|
||||
$dialogAddPool.find("#zone_dropdown").bind("change", function(event) {
|
||||
|
||||
@ -82,8 +82,6 @@ function initAddServiceOfferingDialog() {
|
||||
$dialogAddService.find("#add_service_memory").val("");
|
||||
$dialogAddService.find("#add_service_offerha").val("false");
|
||||
|
||||
//(g_hypervisorType == "kvm")? $dialogAddService.find("#add_service_offerha_container").hide():$dialogAddService.find("#add_service_offerha_container").show();
|
||||
|
||||
$dialogAddService
|
||||
.dialog('option', 'buttons', {
|
||||
"Add": function() {
|
||||
|
||||
@ -1358,8 +1358,9 @@ function bindAddPrimaryStorageButtonOnZonePage($button, zoneId, zoneName) {
|
||||
var $dialogAddPool = $("#dialog_add_pool_in_zone_page");
|
||||
|
||||
// if hypervisor is KVM, limit the server option to NFS for now
|
||||
if (getHypervisorType() == 'kvm')
|
||||
$dialogAddPool.find("#add_pool_protocol").empty().html('<option value="nfs">NFS</option>');
|
||||
// TODO: Fix this to use the hypervisor from the cluster
|
||||
//if (getHypervisorType() == 'kvm')
|
||||
// $dialogAddPool.find("#add_pool_protocol").empty().html('<option value="nfs">NFS</option>');
|
||||
bindEventHandlerToDialogAddPool($dialogAddPool);
|
||||
|
||||
var $podSelect = $dialogAddPool.find("#pod_dropdown");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user