mirror of https://github.com/apache/cloudstack.git
Cleaned up some capabilities usage in the UI.
This commit is contained in:
parent
968d0ec382
commit
fdbd1c7e66
|
|
@ -67,7 +67,6 @@ $(document).ready(function() {
|
|||
$.cookie('domainid', '1'); //e.g. domainid of ROOT domain is 1
|
||||
$.cookie('account', json.loginresponse.account);
|
||||
$.cookie('directattachnetworkgroupsenabled', json.loginresponse.directattachnetworkgroupsenabled);
|
||||
$.cookie('directattacheduntaggedenabled', json.loginresponse.directattacheduntaggedenabled);
|
||||
|
||||
$.cookie('timezoneoffset', null); //comment this line and uncomment the next line if you want to set a specific timezone offset. Otherwise, default timezone from browser will be used.
|
||||
//$.cookie('timezoneoffset', '5.75'); //e.g. Timezone "Kathmandu" is 'UTC+05:45'. Thus, its timezoneoffset is '5.75'
|
||||
|
|
|
|||
|
|
@ -688,8 +688,6 @@ $(document).ready(function() {
|
|||
g_hypervisorType = json.loginresponse.hypervisortype;
|
||||
if (json.loginresponse.directattachsecuritygroupsenabled != null)
|
||||
g_directAttachSecurityGroupsEnabled = json.loginresponse.directattachsecuritygroupsenabled;
|
||||
if (json.loginresponse.directattacheduntaggedenabled != null)
|
||||
g_directAttachedUntaggedEnabled = json.loginresponse.directattacheduntaggedenabled;
|
||||
if (json.loginresponse.systemvmuselocalstorage != null)
|
||||
g_systemVmUseLocalStorage = json.loginresponse.systemvmuselocalstorage;
|
||||
|
||||
|
|
@ -702,7 +700,6 @@ $(document).ready(function() {
|
|||
$.cookie('timezoneoffset', g_timezoneoffset, { expires: 1});
|
||||
$.cookie('timezone', g_timezone, { expires: 1});
|
||||
$.cookie('directattachsecuritygroupsenabled', g_directAttachSecurityGroupsEnabled, { expires: 1});
|
||||
$.cookie('directattacheduntaggedenabled', g_directAttachedUntaggedEnabled, { expires: 1});
|
||||
$.cookie('systemvmuselocalstorage', g_systemVmUseLocalStorage, { expires: 1});
|
||||
|
||||
|
||||
|
|
@ -775,7 +772,6 @@ $(document).ready(function() {
|
|||
g_hypervisorType = $.cookie("hypervisortype");
|
||||
g_timezone = $.cookie("timezone");
|
||||
g_directAttachSecurityGroupsEnabled = $.cookie("directattachsecuritygroupsenabled");
|
||||
g_directAttachedUntaggedEnabled = $.cookie("directattacheduntaggedenabled");
|
||||
g_systemVmUseLocalStorage = $.cookie("systemvmuselocalstorage");
|
||||
g_userPublicTemplateEnabled = $.cookie("userpublictemplateenabled");
|
||||
|
||||
|
|
@ -790,9 +786,6 @@ $(document).ready(function() {
|
|||
if (!g_directAttachSecurityGroupsEnabled || g_directAttachSecurityGroupsEnabled.length == 0)
|
||||
g_directAttachSecurityGroupsEnabled = "false";
|
||||
|
||||
if (!g_directAttachedUntaggedEnabled || g_directAttachedUntaggedEnabled.length == 0)
|
||||
g_directAttachedUntaggedEnabled = "false";
|
||||
|
||||
if (!g_systemVmUseLocalStorage || g_systemVmUseLocalStorage.length == 0)
|
||||
g_systemVmUseLocalStorage = "false";
|
||||
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ function afterLoadIsoJSP() {
|
|||
$editFields = $detailsTab.find("#name_edit, #displaytext_edit, #ispublic_edit, #ostypename_edit, #isfeatured_edit");
|
||||
}
|
||||
else {
|
||||
if (g_userPublicTemplateEnabled == "true") {
|
||||
if (getUserPublicTemplateEnabled() == "true") {
|
||||
$readonlyFields = $detailsTab.find("#name, #displaytext, #ispublic, #ostypename");
|
||||
$editFields = $detailsTab.find("#name_edit, #displaytext_edit, #ispublic_edit, #ostypename_edit");
|
||||
} else {
|
||||
|
|
@ -126,7 +126,7 @@ function initAddIsoDialog() {
|
|||
|
||||
//add button ***
|
||||
$("#add_iso_button").unbind("click").bind("click", function(event) {
|
||||
if (g_userPublicTemplateEnabled == "true" || isAdmin()) {
|
||||
if (getUserPublicTemplateEnabled() == "true" || isAdmin()) {
|
||||
$("#dialog_add_iso #add_iso_public_container").show();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1215,12 +1215,12 @@ function getHypervisorType() { return g_hypervisorType; }
|
|||
var g_directAttachSecurityGroupsEnabled = "false";
|
||||
function getDirectAttachSecurityGroupsEnabled() { return g_directAttachSecurityGroupsEnabled; }
|
||||
|
||||
var g_directAttachedUntaggedEnabled = "false";
|
||||
function getDirectAttachUntaggedEnabled() { return g_directAttachedUntaggedEnabled; }
|
||||
|
||||
var g_systemVmUseLocalStorage = "false";
|
||||
function getSystemVmUseLocalStorage() { return g_systemVmUseLocalStorage; }
|
||||
|
||||
g_userPublicTemplateEnabled = "true"
|
||||
function getUserPublicTemplateEnabled() { return g_userPublicTemplateEnabled; }
|
||||
|
||||
//keyboard keycode
|
||||
var keycode_Enter = 13;
|
||||
|
||||
|
|
|
|||
|
|
@ -230,9 +230,6 @@ function podJsonClearDetailsTab(jsonObj) {
|
|||
|
||||
$thisTab.find("#gateway").text("");
|
||||
$thisTab.find("#gateway_edit").val("");
|
||||
|
||||
//if (getDirectAttachUntaggedEnabled() == "true")
|
||||
// $("#submenu_content_zones #action_add_directip_vlan").data("type", "pod").data("id", obj.id).data("name", obj.name).data("zoneid", obj.zoneid).show();
|
||||
}
|
||||
|
||||
function getIpRange(startip, endip) {
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ function afterLoadSnapshotJSP() {
|
|||
}
|
||||
|
||||
function initCreateTemplateFromSnapshotDialog() {
|
||||
if (g_userPublicTemplateEnabled == "true" || isAdmin()) {
|
||||
if (getUserPublicTemplateEnabled() == "true" || isAdmin()) {
|
||||
$("#dialog_create_template_from_snapshot #create_template_public_container").show();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ function afterLoadTemplateJSP() {
|
|||
$("#dialog_add_template #add_template_featured_container, #dialog_edit_template #edit_template_featured_container").show();
|
||||
}
|
||||
else {
|
||||
if (g_userPublicTemplateEnabled == "true") {
|
||||
if (getUserPublicTemplateEnabled() == "true") {
|
||||
$readonlyFields = $detailsTab.find("#name, #displaytext, #passwordenabled, #ispublic, #ostypename");
|
||||
$editFields = $detailsTab.find("#name_edit, #displaytext_edit, #passwordenabled_edit, #ispublic_edit, #ostypename_edit");
|
||||
} else {
|
||||
|
|
@ -105,7 +105,7 @@ function afterLoadTemplateJSP() {
|
|||
$("#add_template_button").unbind("click").bind("click", function(event) {
|
||||
$("#dialog_add_template #add_template_hypervisor").change();
|
||||
|
||||
if (g_userPublicTemplateEnabled == "true" || isAdmin()) {
|
||||
if (getUserPublicTemplateEnabled() == "true" || isAdmin()) {
|
||||
$("#dialog_add_template #add_template_public_container").show();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -630,7 +630,7 @@ function doDownloadVolume($actionLink, $detailsTab, $midmenuItem1) {
|
|||
}
|
||||
|
||||
function doCreateTemplateFromVolume($actionLink, $detailsTab, $midmenuItem1) {
|
||||
if (g_userPublicTemplateEnabled == "true" || isAdmin()) {
|
||||
if (getUserPublicTemplateEnabled() == "true" || isAdmin()) {
|
||||
$("#dialog_create_template #create_template_public_container").show();
|
||||
}
|
||||
|
||||
|
|
@ -1027,7 +1027,7 @@ function doCreateVolumeFromSnapshotInVolumePage($actionLink, $subgridItem) {
|
|||
}
|
||||
|
||||
function doCreateTemplateFromSnapshotInVolumePage($actionLink, $subgridItem) {
|
||||
if (g_userPublicTemplateEnabled == "true" || isAdmin()) {
|
||||
if (getUserPublicTemplateEnabled() == "true" || isAdmin()) {
|
||||
$("#dialog_create_template_from_snapshot #create_template_public_container").show();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue