CS-14385: cloudstack UI - Host page - add "HA Enabled" column which only shows When ha.tag global configuration is not empty.

This commit is contained in:
Jessica Wang 2012-04-24 17:05:42 -07:00
parent 1b42828f1a
commit a244fb6d42

View File

@ -5961,6 +5961,22 @@
tabs: {
details: {
title: 'label.details',
preFilter: function(args) {
var hiddenFields = [];
$.ajax({
url: createURL('listConfigurations&name=ha.tag'),
dataType: 'json',
async: false,
success: function(json) {
if(json.listconfigurationsresponse.configuration == null || json.listconfigurationsresponse.configuration[0].value == null || json.listconfigurationsresponse.configuration[0].value.length == 0) {
hiddenFields.push('hahost');
}
}
});
return hiddenFields;
},
fields: [
{
name: { label: 'label.name' }
@ -5969,16 +5985,15 @@
id: { label: 'label.id' },
resourcestate: { label: 'label.resource.state' },
state: { label: 'label.state' },
type: { label: 'label.type' },
zonename: { label: 'label.zone' },
podname: { label: 'label.pod' },
clustername: { label: 'label.cluster' },
ipaddress: { label: 'label.ip.address' },
version: { label: 'label.version' },
type: { label: 'label.type' },
hosttags: {
label: 'label.host.tags',
isEditable: true
},
hahost: {
label: 'label.ha.enabled',
converter: cloudStack.converters.toBooleanText
},
oscategoryid: {
label: 'label.os.preference',
isEditable: true,
@ -6000,6 +6015,11 @@
});
}
},
zonename: { label: 'label.zone' },
podname: { label: 'label.pod' },
clustername: { label: 'label.cluster' },
ipaddress: { label: 'label.ip.address' },
version: { label: 'label.version' },
disconnected: { label: 'label.last.disconnected' }
}
],