diff --git a/client/WEB-INF/classes/resources/messages.properties b/client/WEB-INF/classes/resources/messages.properties index 45b46b284b4..63e9c9c0915 100644 --- a/client/WEB-INF/classes/resources/messages.properties +++ b/client/WEB-INF/classes/resources/messages.properties @@ -452,6 +452,9 @@ label.total.CPU=Total CPU label.total.memory=Total Memory label.total.storage=Total Storage +#after 2012-02-12 +label.purpose=Purpose + #new labels (end) ********************************************************************************************** diff --git a/client/WEB-INF/classes/resources/messages_ja.properties b/client/WEB-INF/classes/resources/messages_ja.properties index 5dfb3db092d..c3c0146682b 100644 --- a/client/WEB-INF/classes/resources/messages_ja.properties +++ b/client/WEB-INF/classes/resources/messages_ja.properties @@ -453,6 +453,9 @@ label.total.CPU=Total CPU label.total.memory=Total Memory label.total.storage=Total Storage +#after 2012-02-12 +label.purpose=目的 + #new labels (end) ********************************************************************************************** diff --git a/ui/index.jsp b/ui/index.jsp index 0dde35ca9a4..3e090b86a68 100644 --- a/ui/index.jsp +++ b/ui/index.jsp @@ -2836,6 +2836,7 @@ dictionary = { 'message.zone.creation.complete.would.you.like.to.enable.this.zone': '', 'message.please.add.at.lease.one.traffic.range': '', 'message.you.must.have.at.least.one.physical.network': '', -'message.please.select.a.different.public.and.management.network.before.removing': '' +'message.please.select.a.different.public.and.management.network.before.removing': '', +'label.purpose': '' }; diff --git a/ui/scripts/network.js b/ui/scripts/network.js index bddd7778208..c26e789e809 100644 --- a/ui/scripts/network.js +++ b/ui/scripts/network.js @@ -896,9 +896,8 @@ } }, zonename: { label: 'label.zone' }, - //vlanname: { label: 'VLAN' }, - iselastic: { label: 'label.elastic', converter: cloudStack.converters.toBooleanText }, - account: { label: 'label.account' }, + //vlanname: { label: 'VLAN' }, + virtualmachinedisplayname: { label: 'label.vm.name' }, state: { converter: function(str) { // For localization @@ -1320,6 +1319,25 @@ tabs: { details: { title: 'label.details', + + preFilter: function(args) { + var hiddenFields = []; + var zoneObj; + $.ajax({ + url: createURL("listZones&id=" + args.context.ipAddresses[0].zoneid), + dataType: "json", + async: false, + success: function(json) { + zoneObj = json.listzonesresponse.zone[0]; + } + }); + if(zoneObj.networktype == "Advanced") { + hiddenFields.push("iselastic"); + hiddenFields.push("purpose"); + } + return hiddenFields; + }, + fields: [ { ipaddress: { label: 'IP' } @@ -1333,7 +1351,8 @@ state: { label: 'label.state' }, issourcenat: { label: 'label.source.nat', converter: cloudStack.converters.toBooleanText }, isstaticnat: { label: 'label.static.nat', converter: cloudStack.converters.toBooleanText }, - iselastic: { label: 'label.elastic', converter: cloudStack.converters.toBooleanText }, + iselastic: { label: 'label.elastic', converter: cloudStack.converters.toBooleanText }, //(basic zone only) + purpose: { label: 'label.purpose' }, //(basic zone only) When an IP is elastic, the purpose it serves can be Lb or static nat. virtualmachinedisplayname: { label: 'label.vm.name' }, domain: { label: 'label.domain' }, account: { label: 'label.account' },