cloudstack 3.0 UI - VPC feature - localize network.js (Reviewed-by: Brian)

This commit is contained in:
Jessica Wang 2012-08-24 11:59:25 -07:00
parent 30588b1ade
commit 654e06c49c
1 changed files with 78 additions and 79 deletions

View File

@ -301,7 +301,7 @@
}
},
vpcid: {
label: 'VPC',
label: 'label.vpc',
dependsOn: 'networkOfferingId',
select: function(args) {
var networkOfferingObj;
@ -387,13 +387,13 @@
fields: {
name: { label: 'label.name' },
account: { label: 'label.account' },
//zonename: { label: 'Zone' },
//zonename: { label: 'label.zone' },
type: { label: 'label.type' },
vlan: { label: 'label.vlan' },
cidr: { label: 'label.cidr' }
/*
state: {
label: 'State',
label: 'label.state',
indicator: {
'Implemented': 'on',
'Setup': 'on',
@ -775,7 +775,7 @@
return "No";
}
},
vlan: { label: 'VLAN ID' },
vlan: { label: 'label.vlan.id' },
networkofferingname: { label: 'label.network.offering' },
@ -817,8 +817,8 @@
gateway: { label: 'label.gateway' },
//netmask: { label: 'Netmask' },
cidr: { label: 'CIDR' },
//netmask: { label: 'label.netmask' },
cidr: { label: 'label.cidr' },
networkdomaintext: {
label: 'label.network.domain.text'
@ -832,7 +832,7 @@
account: { label: 'label.account' },
vpcid: {
label: 'VPC ID',
label: 'label.vpc.id',
converter: function(args) {
if(args != null)
return args;
@ -1086,10 +1086,10 @@
title: 'label.menu.ipaddresses',
listView: {
id: 'ipAddresses',
label: 'IPs',
label: 'label.ips',
fields: {
ipaddress: {
label: 'IP',
label: 'label.ips',
converter: function(text, item) {
if (item.issourcenat) {
return text + ' [' + _l('label.source.nat') + ']';
@ -1098,8 +1098,7 @@
return text;
}
},
zonename: { label: 'label.zone' },
//vlanname: { label: 'VLAN' },
zonename: { label: 'label.zone' },
virtualmachinedisplayname: { label: 'label.vm.name' },
state: {
converter: function(str) {
@ -1672,12 +1671,12 @@
fields: [
{
ipaddress: { label: 'IP' }
ipaddress: { label: 'label.ip' }
},
{
id: { label: 'label.id' },
associatednetworkid: { label: 'label.associated.network.id' },
networkname: { label: 'Associated Network' },
networkname: { label: 'label.associated.network' },
state: { label: 'label.state' },
networkid: { label: 'label.network.id' },
issourcenat: { label: 'label.source.nat', converter: cloudStack.converters.toBooleanText },
@ -2246,7 +2245,7 @@
}),
headerFields: {
tier: {
label: 'Tier',
label: 'label.tier',
select: function(args) {
if('vpc' in args.context) {
var data = {
@ -2697,7 +2696,7 @@
portForwarding: {
headerFields: {
tier: {
label: 'Tier',
label: 'label.tier',
select: function(args) {
if('vpc' in args.context) {
var data = {
@ -2849,7 +2848,7 @@
jobId: data.createportforwardingruleresponse.jobid
},
notification: {
label: 'Add port forwarding rule',
label: 'label.add.port.forwarding.rule',
poll: pollAsyncJobResult
}
});
@ -3194,7 +3193,7 @@
name: { label: 'label.name' }
},
{
id: { label: 'ID' },
id: { label: 'label.id' },
description: { label: 'label.description' },
domain: { label: 'label.domain' },
account: { label: 'label.account' }
@ -3274,7 +3273,7 @@
'endport': { edit: true, label: 'label.end.port' },
'icmptype': { edit: true, label: 'ICMP.type', isHidden: true },
'icmpcode': { edit: true, label: 'ICMP.code', isHidden: true },
'cidr': { edit: true, label: 'CIDR', isHidden: true },
'cidr': { edit: true, label: 'label.cidr', isHidden: true },
'accountname': {
edit: true,
label: 'label.account.and.security.group',
@ -3454,7 +3453,7 @@
'endport': { edit: true, label: 'label.end.port' },
'icmptype': { edit: true, label: 'ICMP.type', isHidden: true },
'icmpcode': { edit: true, label: 'ICMP.code', isHidden: true },
'cidr': { edit: true, label: 'CIDR', isHidden: true },
'cidr': { edit: true, label: 'label.cidr', isHidden: true },
'accountname': {
edit: true,
label: 'label.account.and.security.group',
@ -3623,17 +3622,17 @@
},
vpc: {
type: 'select',
title: 'VPC',
title: 'label.vpc',
id: 'vpc',
listView: {
id: 'vpc',
label: 'VPC',
label: 'label.vpc',
fields: {
name: { label: 'label.name' },
displaytext: { label: 'label.description' },
zonename: { label: 'label.zone' },
cidr: { label: 'label.cidr' },
state: {label: 'State', indicator: { 'Enabled': 'on', 'Disabled': 'off'}}
state: {label: 'label.state', indicator: { 'Enabled': 'on', 'Disabled': 'off'}}
},
dataProvider: function(args) {
var array1 = [];
@ -3660,17 +3659,17 @@
},
actions: {
add: {
label: 'Add VPC',
label: 'label.add.vpc',
messages: {
notification: function(args) {
return 'Add VPC';
return 'label.add.vpc';
}
},
createForm: {
title: 'Add VPC',
title: 'label.add.vpc',
messages: {
notification: function(args) {
return 'Add VPC';
return 'label.add.vpc';
}
},
fields: {
@ -3683,7 +3682,7 @@
validation: { required: true }
},
zoneid: {
label: 'Zone',
label: 'label.zone',
validation: { required: true },
select: function(args) {
var data = { listAll: true };
@ -3708,11 +3707,11 @@
}
},
cidr: {
label: 'Super CIDR for Guest Networks',
label: 'label.super.cidr.for.guest.networks',
validation: { required: true }
},
networkdomain: {
label: 'DNS domain for Guest Networks'
label: 'label.DNS.domain.for.guest.networks'
}
}
},
@ -3770,7 +3769,7 @@
},
configureVpc: {
label: 'Configure VPC',
label: 'label.configure.vpc',
textLabel: 'label.configure',
action: {
custom: cloudStack.uiCustom.vpc(cloudStack.vpc)
@ -3782,7 +3781,7 @@
name: 'label.details',
actions: {
configureVpc: {
label: 'Edit VPC',
label: 'label.edit.vpc',
textLabel: 'label.configure',
action: {
custom: cloudStack.uiCustom.vpc(cloudStack.vpc)
@ -3824,13 +3823,13 @@
},
restart: {
label: 'restart VPC',
label: 'label.restart.vpc',
messages: {
confirm: function(args) {
return 'Please confirm that you want to restart the VPC';
return 'message.restart.vpc';
},
notification: function(args) {
return 'restart VPC';
return 'label.restart.vpc';
}
},
action: function(args) {
@ -3863,13 +3862,13 @@
},
remove: {
label: 'remove VPC',
label: 'label.remove.vpc',
messages: {
confirm: function(args) {
return 'Please confirm that you want to delete the VPC';
return 'message.remove.vpc';
},
notification: function(args) {
return 'remove VPC';
return 'label.remove.vpc';
}
},
action: function(args) {
@ -3959,20 +3958,20 @@
title: 'VPC Router Details',
fields:[
{
name: {label:'Router Name'}
name: {label:'label.name'}
},
{
id:{ label:'ID'},
id:{ label:'label.id'},
zonename: { label: 'label.zone'},
dns1: {label: 'DNS'},
gateway: {label:'Gateway'},
publicip: {label: 'Public IP'},
guestipaddress:{ label: 'Guest IP'},
linklocalip: {label: 'Link Local IP'},
state: { label:'State'},
serviceofferingname: {label:'Service Offering'},
dns1: {label: 'label.dns'},
gateway: {label:'label.gateway'},
publicip: {label: 'label.public.ip'},
guestipaddress:{ label: 'label.guest.ip'},
linklocalip: {label: 'label.linklocal.ip'},
state: { label:'label.state'},
serviceofferingname: {label:'label.service.offering'},
isredundantrouter:{
label: 'Redundant Router',
label: 'label.redundant.router',
converter: function(booleanValue) {
if (booleanValue == true) {
return "<font color='red'>Yes</font>";
@ -4010,15 +4009,15 @@
vpnCustomerGateway: {
type: 'select',
title: 'VPN Customer Gateway',
title: 'label.vpn.customer.gateway',
listView: {
id: 'vpnCustomerGateway',
label: 'VPN Customer Gateway',
label: 'label.vpn.customer.gateway',
fields: {
name: { label: 'label.name' },
gateway: { label: 'label.gateway' },
cidrlist: { label: 'CIDR list' },
ipsecpsk: { label: 'IPsec Preshared-Key' }
cidrlist: { label: 'label.CIDR.list' },
ipsecpsk: { label: 'label.IPsec.preshared.key' }
},
dataProvider: function(args) {
var array1 = [];
@ -4046,14 +4045,14 @@
actions: {
add: {
label: 'Add VPN Customer Gateway',
label: 'label.add.vpn.customer.gateway',
messages: {
notification: function(args) {
return 'Add VPN Customer Gateway';
return 'label.add.vpn.customer.gateway';
}
},
createForm: {
title: 'Add VPN Customer Gateway',
title: 'label.add.vpn.customer.gateway',
fields: {
name: {
label: 'label.name',
@ -4064,18 +4063,18 @@
validation: { required: true }
},
cidrlist: {
label: 'CIDR list',
label: 'label.CIDR.list',
desc:'Please enter a comma separated list of CIDRs if more than one',
validation: { required: true }
},
ipsecpsk: {
label: 'IPsec Preshared-Key',
label: 'label.IPsec.preshared.key',
validation: { required: true }
},
//IKE Policy
ikeEncryption: {
label: 'IKE Encryption',
label: 'label.IKE.encryption',
select: function(args) {
var items = [];
items.push({id: '3des', description: '3des'});
@ -4086,7 +4085,7 @@
}
},
ikeHash: {
label: 'IKE Hash',
label: 'label.IKE.hash',
select: function(args) {
var items = [];
items.push({id: 'md5', description: 'md5'});
@ -4095,7 +4094,7 @@
}
},
ikeDh: {
label: 'IKE DH',
label: 'label.IKE.DH',
select: function(args) {
var items = [];
items.push({id: '', description: 'None'});
@ -4107,7 +4106,7 @@
//ESP Policy
espEncryption: {
label: 'ESP Encryption',
label: 'label.ESP.encryption',
select: function(args) {
var items = [];
items.push({id: '3des', description: '3des'});
@ -4118,7 +4117,7 @@
}
},
espHash: {
label: 'ESP Hash',
label: 'label.ESP.hash',
select: function(args) {
var items = [];
items.push({id: 'md5', description: 'md5'});
@ -4127,7 +4126,7 @@
}
},
perfectForwardSecrecy: {
label: 'Perfect Forward Secrecy',
label: 'label.perfect.forward.secrecy',
select: function(args) {
var items = [];
items.push({id: '', description: 'None'});
@ -4138,18 +4137,18 @@
},
ikelifetime: {
label: 'IKE lifetime (second)',
label: 'label.IKE.lifetime',
defaultValue: '86400',
validation: { required: false, number: true }
},
esplifetime: {
label: 'ESP Lifetime (second)',
label: 'label.ESP.lifetime',
defaultValue: '3600',
validation: { required: false, number: true }
},
dpd: {
label: 'Dead Peer Detection',
label: 'label.dead.peer.detection',
isBoolean: true,
isChecked: false
}
@ -4265,13 +4264,13 @@
},
remove: {
label: 'delete VPN Customer Gateway',
label: 'label.delete.VPN.customer.gateway',
messages: {
confirm: function(args) {
return 'Please confirm that you want to delete this VPN Customer Gateway';
return 'message.delete.VPN.customer.gateway';
},
notification: function(args) {
return 'delete VPN Customer Gateway';
return 'label.delete.VPN.customer.gateway';
}
},
action: function(args) {
@ -4316,19 +4315,19 @@
validation: { required: true }
},
cidrlist: {
label: 'CIDR list',
label: 'label.CIDR.list',
isEditable: true,
validation: { required: true }
},
ipsecpsk: {
label: 'IPsec Preshared-Key',
label: 'label.IPsec.preshared.key',
isEditable: true,
validation: { required: true }
},
//IKE Policy
ikeEncryption: {
label: 'IKE Encryption',
label: 'label.IKE.encryption',
isEditable: true,
select: function(args) {
var items = [];
@ -4340,7 +4339,7 @@
}
},
ikeHash: {
label: 'IKE Hash',
label: 'label.IKE.hash',
isEditable: true,
select: function(args) {
var items = [];
@ -4350,7 +4349,7 @@
}
},
ikeDh: {
label: 'IKE DH',
label: 'label.IKE.DH',
isEditable: true,
select: function(args) {
var items = [];
@ -4363,7 +4362,7 @@
//ESP Policy
espEncryption: {
label: 'ESP Encryption',
label: 'label.ESP.encryption',
isEditable: true,
select: function(args) {
var items = [];
@ -4375,7 +4374,7 @@
}
},
espHash: {
label: 'ESP Hash',
label: 'label.ESP.hash',
isEditable: true,
select: function(args) {
var items = [];
@ -4385,7 +4384,7 @@
}
},
perfectForwardSecrecy: {
label: 'Perfect Forward Secrecy',
label: 'label.perfect.forward.secrecy',
isEditable: true,
select: function(args) {
var items = [];
@ -4397,18 +4396,18 @@
},
ikelifetime: {
label: 'IKE lifetime (second)',
label: 'label.IKE.lifetime',
isEditable: true,
validation: { required: false, number: true }
},
esplifetime: {
label: 'ESP Lifetime (second)',
label: 'label.ESP.lifetime',
isEditable: true,
validation: { required: false, number: true }
},
dpd: {
label: 'Dead Peer Detection',
label: 'label.dead.peer.detection',
isBoolean: true,
isEditable: true,
converter:cloudStack.converters.toBooleanText