mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
CLOUDSTACK-483: Disable 'update' tab when host updates aren't supported
This commit is contained in:
parent
499a28cb43
commit
7f905cd94a
@ -8421,6 +8421,33 @@
|
||||
}
|
||||
|
||||
},
|
||||
tabFilter: function(args) {
|
||||
var hiddenTabs = [];
|
||||
var hostUpdatesEnabled = false;
|
||||
var host = args.context.hosts[0];
|
||||
|
||||
if (isAdmin()) {
|
||||
// Host updates are only supported on XenServer and when host.updates.enabled is true;
|
||||
$.ajax({
|
||||
url: createURL('listConfigurations'),
|
||||
data: {
|
||||
name: 'host.updates.enable'
|
||||
},
|
||||
async: false,
|
||||
success: function(json) {
|
||||
var config = json.listconfigurationsresponse.configuration[0];
|
||||
|
||||
hostUpdatesEnabled = config.value == 'true' ? true : false;
|
||||
}
|
||||
});
|
||||
|
||||
if (!hostUpdatesEnabled || host.hypervisor != 'XenServer') {
|
||||
hiddenTabs.push('hostUpdates');
|
||||
}
|
||||
}
|
||||
|
||||
return hiddenTabs;
|
||||
},
|
||||
tabs: {
|
||||
details: {
|
||||
title: 'label.details',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user