diff --git a/ui/scripts/system.js b/ui/scripts/system.js index 055ee5cc203..168a8cf2ee9 100644 --- a/ui/scripts/system.js +++ b/ui/scripts/system.js @@ -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' } } ],