diff --git a/client/WEB-INF/classes/resources/messages.properties b/client/WEB-INF/classes/resources/messages.properties
index 0797c746dd9..de46afdbb70 100644
--- a/client/WEB-INF/classes/resources/messages.properties
+++ b/client/WEB-INF/classes/resources/messages.properties
@@ -1,3 +1,21 @@
+label.full.path=Full path
+message.add.domain=Please specify the subdomain you want to create under this domain
+message.delete.user=Please confirm that you would like to delete this user.
+message.enable.user=Please confirm that you would like to enable this user.
+message.disable.user=Please confirm that you would like to disable this user.
+message.generate.keys=Please confirm that you would like to generate new keys for this user.
+message.update.resource.count=Please confirm that you want to update resource counts for this account.
+message.edit.account=Edit ("-1" indicates no limit to the amount of resources create)
+label.total.of.vm=Total of VM
+label.total.of.ip=Total of IP Address
+state.enabled=Enabled
+message.action.download.iso=Please confirm that you want to download this ISO.
+message.action.download.template=Please confirm that you want to download this template.
+label.destination.zone=Destination Zone
+label.keyboard.type=Keyboard type
+label.nic.adapter.type=NIC adapter type
+label.root.disk.controller=Root disk controller
+label.community=Community
label.remove.egress.rule=Remove egress rule
label.add.egress.rule=Add egress rule
label.egress.rule=Egress rule
@@ -407,7 +425,6 @@ label.add.primary.storage=Add Primary Storage
label.add.secondary.storage=Add Secondary Storage
label.add.security.group=Add Security Group
label.add.service.offering=Add Service Offering
-label.add.system.service.offering=Add System Service Offering
label.add.template=Add Template
label.add.user=Add User
label.add.vlan=Add VLAN
@@ -626,7 +643,6 @@ label.menu.physical.resources=Physical Resources
label.menu.running.instances=Running Instances
label.menu.security.groups=Security Groups
label.menu.service.offerings=Service Offerings
-label.menu.system.service.offerings=System Service Offerings
label.menu.snapshots=Snapshots
label.menu.stopped.instances=Stopped Instances
label.menu.storage=Storage
@@ -980,4 +996,21 @@ error.menu.select=Unable to perform action due to no items being selected.
error.mgmt.server.inaccessible=The Management Server is unaccessible. Please try again later.
error.session.expired=Your session has expired.
error.unresolved.internet.name=Your internet name cannot be resolved.
-#cloudstack 2.2.Y (end) ********************************************************************************************
\ No newline at end of file
+
+#Jes
+message.add.system.service.offering=Please fill in the following data to add a new system service offering.
+message.action.delete.system.service.offering=Please confirm that you want to delete this system service offering.
+label.action.delete.system.service.offering=Delete System Service Offering
+hypervisor.capabilities=Hypervisor capabilities
+hypervisor.version=Hypervisor version
+max.guest.limit=Max guest limit
+security.group.enabled=Security group enabled
+add.network.offering=Add network offering
+supported.services=Supported Services
+service.capabilities=Service Capabilities
+guest.type=Guest Type
+specify.IP.ranges=Specify IP ranges
+conserve.mode=Conserve mode
+created.by.system=Created by system
+label.menu.system.service.offerings=System Service Offerings
+label.add.system.service.offering=Add System Service Offering
\ No newline at end of file
diff --git a/client/WEB-INF/classes/resources/messages_ja.properties b/client/WEB-INF/classes/resources/messages_ja.properties
index 9f38df60474..521656640af 100644
--- a/client/WEB-INF/classes/resources/messages_ja.properties
+++ b/client/WEB-INF/classes/resources/messages_ja.properties
@@ -862,4 +862,23 @@ error.menu.select=アイテムが選択されていないためアクション
error.mgmt.server.inaccessible=Management Serverにアクセスできません。後で、もう一度やり直してください
error.session.expired=セッション有効期限が切れています
error.unresolved.internet.name=名前解決に失敗しました
-#cloudstack 2.2.Y (end) ********************************************************************************************
\ No newline at end of file
+#cloudstack 2.2.Y (end) ********************************************************************************************
+
+
+#Jes
+message.add.system.service.offering=新しいシステム·サービスの提供を追加するには、次のデータを記入してください。
+message.action.delete.system.service.offering=このシステムサービスの提供を削除することを確認してください。
+label.action.delete.system.service.offering=削除システムサービスの提供
+hypervisor.capabilities=機能をハイパーバイザ
+hypervisor.version=のバージョンをハイパーバイザ
+max.guest.limit=最大ゲストの制限
+security.group.enabled=セキュリティグループが有効になって
+add.network.offering=ネットワークの提供を追加します。
+supported.services=サポートされているサービス
+service.capabilities=サービス機能
+guest.type=ゲストの種類
+specify.IP.ranges=指定したIPの範囲
+conserve.mode=モードを節約
+created.by.system=システムによって作成され
+label.menu.system.service.offerings=システムサービスの提供
+label.add.system.service.offering=システムサービスの提供を追加します。
\ No newline at end of file
diff --git a/ui/index.jsp b/ui/index.jsp
index df81cdbd9e9..81d056312b2 100644
--- a/ui/index.jsp
+++ b/ui/index.jsp
@@ -1599,6 +1599,25 @@
diff --git a/ui/scripts/accounts.js b/ui/scripts/accounts.js
index 782ab698269..4f619eda90f 100644
--- a/ui/scripts/accounts.js
+++ b/ui/scripts/accounts.js
@@ -9,7 +9,7 @@
var adminUserId = 2;
cloudStack.sections.accounts = {
- title: 'Accounts',
+ title: 'label.accounts',
id: 'accounts',
sectionSelect: {
label: 'Select View',
@@ -21,75 +21,79 @@
accounts: {
type: 'select',
id: 'accounts',
- title: 'Accounts',
+ title: 'label.accounts',
listView: {
id: 'accounts',
fields: {
- name: { label: 'Name' },
+ name: { label: 'label.name' },
accounttype: {
- label: 'Role',
+ label: 'label.role',
converter: function(args){
return cloudStack.converters.toRole(args);
}
},
- domain: { label: 'Domain' },
+ domain: { label: 'label.domain' },
state: {
converter: function(str) {
// For localization
return str;
},
- label: 'State',
- indicator: { 'enabled': 'on', 'Destroyed': 'off', 'disabled': 'off' }
+ label: 'label.state',
+ converter: function(str) {
+ return 'state.' + str;
+ },
+ indicator: {
+ 'enabled': 'on',
+ 'Destroyed': 'off',
+ 'disabled': 'off'
+ }
}
},
actions: {
add: {
- label: 'Create account',
- preFilter: function(args) {
- if(isAdmin())
- return true;
- else
- return false;
- },
+ label: 'label.add.account',
+ preFilter: function(args) {
+ if(isAdmin())
+ return true;
+ else
+ return false;
+ },
messages: {
- confirm: function(args) {
- return 'Are you sure you want to create an account?';
- },
notification: function(args) {
- return 'Creating new account';
+ return 'label.add.account';
}
},
createForm: {
- title: 'Create account',
- desc: 'Please fill in the following data to create a new account.',
+ title: 'label.add.account',
+ desc: 'label.add.account',
fields: {
username: {
- label: 'Username',
+ label: 'label.username',
validation: { required: true }
},
password: {
- label: 'Password',
+ label: 'label.password',
validation: { required: true },
isPassword: true
},
email: {
- label: 'Email',
+ label: 'label.email',
validation: { required: true }
},
firstname: {
- label: 'First name',
+ label: 'label.first.name',
validation: { required: true }
},
lastname: {
- label: 'Last name',
+ label: 'label.last.name',
validation: { required: true }
},
domainid: {
- label: 'Domain',
+ label: 'label.domain',
validation: { required: true },
- select: function(args) {
+ select: function(args) {
$.ajax({
url: createURL("listDomains&listAll=true"),
dataType: "json",
@@ -106,10 +110,10 @@
}
},
account: {
- label: 'Account'
+ label: 'label.account'
},
accounttype: {
- label: 'Account type',
+ label: 'label.type',
validation: { required: true },
select: function(args) {
var items = [];
@@ -119,7 +123,7 @@
}
},
timezone: {
- label: 'Timezone',
+ label: 'label.timezone',
select: function(args) {
var items = [];
items.push({id: "", description: ""});
@@ -128,8 +132,8 @@
args.response.success({data: items});
}
},
- networkdomain: {
- label: 'Network domain',
+ networkdomain: {
+ label: 'label.network.domain',
validation: { required: false }
}
}
@@ -164,8 +168,8 @@
array1.push("&timezone=" + todb(args.data.timezone));
if(args.data.networkdomain != null && args.data.networkdomain.length > 0)
- array1.push("&networkdomain=" + todb(args.data.networkdomain));
-
+ array1.push("&networkdomain=" + todb(args.data.networkdomain));
+
$.ajax({
url: createURL("createAccount" + array1.join("")),
dataType: "json",
@@ -187,22 +191,22 @@
});
}
}
- }
+ }
},
dataProvider: function(args) {
var array1 = [];
- if(args.filterBy != null) {
- if(args.filterBy.search != null && args.filterBy.search.by != null && args.filterBy.search.value != null) {
- switch(args.filterBy.search.by) {
- case "name":
- if(args.filterBy.search.value.length > 0)
- array1.push("&keyword=" + args.filterBy.search.value);
- break;
- }
- }
- }
-
+ if(args.filterBy != null) {
+ if(args.filterBy.search != null && args.filterBy.search.by != null && args.filterBy.search.value != null) {
+ switch(args.filterBy.search.by) {
+ case "name":
+ if(args.filterBy.search.value.length > 0)
+ array1.push("&keyword=" + args.filterBy.search.value);
+ break;
+ }
+ }
+ }
+
if("domains" in args.context)
array1.push("&domainid=" + args.context.domains[0].id);
$.ajax({
@@ -221,16 +225,16 @@
detailView: {
name: 'Account details',
- viewAll: { path: 'accounts.users', label: 'Users' },
+ viewAll: { path: 'accounts.users', label: 'label.users' },
actions: {
edit: {
- label: 'Edit ("-1" indicates no limit to the amount of resources create)',
+ label: 'message.edit.account',
action: function(args) {
var accountObj = args.context.accounts[0];
- var array1 = [];
- array1.push("&newname=" + todb(args.data.name));
+ var array1 = [];
+ array1.push("&newname=" + todb(args.data.name));
array1.push("&networkdomain=" + todb(args.data.networkdomain));
$.ajax({
url: createURL("updateAccount&domainid=" + accountObj.domainid + "&account=" + accountObj.name + array1.join("")),
@@ -291,13 +295,13 @@
},
updateResourceCount: {
- label: 'Update Resource Count',
+ label: 'label.action.update.resource.count',
messages: {
confirm: function(args) {
- return 'Are you sure you want to update resource count ?';
+ return 'message.update.resource.count';
},
notification: function(args) {
- return 'Updating resource count';
+ return 'label.action.update.resource.count';
}
},
action: function(args) {
@@ -308,6 +312,10 @@
async: true,
success: function(json) {
//var resourcecounts= json.updateresourcecountresponse.resourcecount; //do nothing
+ args.response.success();
+ },
+ error: function(json) {
+ args.response.error(parseXMLHttpResponse(json));
}
});
},
@@ -319,13 +327,13 @@
},
disable: {
- label: 'Disable account',
+ label: 'label.action.disable.account',
messages: {
confirm: function(args) {
- return 'Are you sure you want to disable this account?';
+ return 'message.disable.account';
},
notification: function(args) {
- return 'Disabling account';
+ return 'label.action.disable.account';
}
},
action: function(args) {
@@ -357,13 +365,13 @@
},
lock: {
- label: 'Lock account',
+ label: 'label.action.lock.account',
messages: {
confirm: function(args) {
- return 'Are you sure you want to lock this account?';
+ return 'message.lock.account';
},
notification: function(args) {
- return 'Locking account';
+ return 'label.action.lock.account';
}
},
action: function(args) {
@@ -395,13 +403,13 @@
},
enable: {
- label: 'Enable account',
+ label: 'label.action.enable.account',
messages: {
confirm: function(args) {
- return 'Are you sure you want to enable this account?';
+ return 'message.enable.account';
},
notification: function(args) {
- return 'Enabling account';
+ return 'label.action.enable.account';
}
},
action: function(args) {
@@ -425,13 +433,13 @@
},
destroy: {
- label: 'Delete account',
+ label: 'label.action.delete.account',
messages: {
confirm: function(args) {
- return 'Are you sure you want to delete this account?';
+ return 'message.delete.account';
},
notification: function(args) {
- return 'Deleting account';
+ return 'label.action.delete.account';
}
},
action: function(args) {
@@ -465,54 +473,54 @@
tabs: {
details: {
- title: 'details',
+ title: 'label.details',
fields: [
{
name: {
- label: 'Name',
+ label: 'label.name',
isEditable: true
}
},
{
id: { label: 'ID' },
accounttype: {
- label: 'Role',
+ label: 'label.role',
converter: function(args){
return cloudStack.converters.toRole(args);
}
},
- domain: { label: 'Domain' },
- state: { label: 'State' },
- networkdomain: {
- label: 'Network domain',
+ domain: { label: 'label.domain' },
+ state: { label: 'label.state' },
+ networkdomain: {
+ label: 'label.network.domain',
isEditable: true
- },
+ },
vmLimit: {
- label: 'Instance limits',
+ label: 'label.instance.limits',
isEditable: true
},
ipLimit: {
- label: 'Public IP limits',
+ label: 'label.ip.limits',
isEditable: true
},
volumeLimit: {
- label: 'Volume limits',
+ label: 'label.volume.limits',
isEditable: true
},
snapshotLimit: {
- label: 'Snapshot limits',
+ label: 'label.snapshot.limits',
isEditable: true
},
templateLimit: {
- label: 'Template limits',
+ label: 'label.template.limits',
isEditable: true
},
- vmtotal: { label: 'Total of VM' },
- iptotal: { label: 'Total of IP Address' },
+ vmtotal: { label: 'label.total.of.vm' },
+ iptotal: { label: 'label.totoal.of.ip' },
receivedbytes: {
- label: 'Bytes received',
+ label: 'label.bytes.received',
converter: function(args) {
if (args == null || args == 0)
return "";
@@ -521,7 +529,7 @@
}
},
sentbytes: {
- label: 'Bytes sent',
+ label: 'label.bytes.sent',
converter: function(args) {
if (args == null || args == 0)
return "";
@@ -581,27 +589,27 @@
users: {
type: 'select',
id: 'users',
- title: 'Users',
+ title: 'label.users',
listView: {
id: 'users',
fields: {
- username: { label: 'Username', editable: true },
- firstname: { label: 'First name' },
- lastname: { label: 'Last name' }
+ username: { label: 'label.username', editable: true },
+ firstname: { label: 'label.first.name' },
+ lastname: { label: 'label.last.name' }
},
- dataProvider: function(args) {
- var array1 = [];
- if(args.filterBy != null) {
- if(args.filterBy.search != null && args.filterBy.search.by != null && args.filterBy.search.value != null) {
- switch(args.filterBy.search.by) {
- case "name":
- if(args.filterBy.search.value.length > 0)
- array1.push("&keyword=" + args.filterBy.search.value);
- break;
- }
- }
- }
-
+ dataProvider: function(args) {
+ var array1 = [];
+ if(args.filterBy != null) {
+ if(args.filterBy.search != null && args.filterBy.search.by != null && args.filterBy.search.value != null) {
+ switch(args.filterBy.search.by) {
+ case "name":
+ if(args.filterBy.search.value.length > 0)
+ array1.push("&keyword=" + args.filterBy.search.value);
+ break;
+ }
+ }
+ }
+
var accountObj = args.context.accounts[0];
$.ajax({
url: createURL("listUsers&domainid=" + accountObj.domainid + "&account=" + accountObj.name + "&page=" + args.page + "&pagesize=" + pageSize + array1.join("")),
@@ -616,50 +624,47 @@
},
actions: {
add: {
- label: 'Create user',
+ label: 'label.add.user',
+
+ preFilter: function(args) {
+ if(isAdmin())
+ return true;
+ else
+ return false;
+ },
- preFilter: function(args) {
- if(isAdmin())
- return true;
- else
- return false;
- },
-
messages: {
- confirm: function(args) {
- return 'Are you sure you want to create an user?';
- },
notification: function(args) {
- return 'Creating new user';
+ return 'label.add.user';
}
},
createForm: {
- title: 'Create user',
+ title: 'label.add.user',
fields: {
username: {
- label: 'Username',
+ label: 'label.username',
validation: { required: true }
},
password: {
- label: 'Password',
+ label: 'label.password',
isPassword: true,
validation: { required: true }
},
email: {
- label: 'Email',
+ label: 'label.email',
validation: { required: true }
},
firstname: {
- label: 'First name',
+ label: 'label.first.name',
validation: { required: true }
},
lastname: {
- label: 'Last name',
+ label: 'label.last.name',
validation: { required: true }
},
timezone: {
- label: 'Timezone',
+ label: 'label.timezone',
select: function(args) {
var items = [];
items.push({id: "", description: ""});
@@ -680,8 +685,8 @@
var password = args.data.password;
if (md5Hashed)
password = $.md5(password);
- else
- password = todb(password);
+ else
+ password = todb(password);
array1.push("&password=" + password);
array1.push("&email=" + todb(args.data.email));
@@ -720,7 +725,7 @@
name: 'User details',
actions: {
edit: {
- label: 'Edit',
+ label: 'label.edit',
action: function(args) {
var array1 = [];
array1.push("&username=" + todb(args.data.username));
@@ -741,31 +746,28 @@
},
changePassword: {
- label: 'Change password',
+ label: 'label.action.change.password',
messages: {
- confirm: function(args) {
- return 'Are you sure you want to change password?';
- },
notification: function(args) {
- return 'Changing password';
+ return 'label.action.change.password';
}
},
createForm: {
- label: 'Change password',
+ label: 'label.action.change.password',
fields: {
- newPassword: {
- label: 'New password',
- isPassword: true,
- validation: { required: true }
- }
+ newPassword: {
+ label: 'label.new.password',
+ isPassword: true,
+ validation: { required: true }
+ }
}
},
action: function(args) {
var password = args.data.newPassword;
if (md5Hashed)
password = $.md5(password);
- else
- password = todb(password);
+ else
+ password = todb(password);
$.ajax({
url: createURL("updateUser&id=" + args.context.users[0].id + "&password=" + password),
dataType: "json",
@@ -783,13 +785,13 @@
},
generateKeys: {
- label: 'Generate keys',
+ label: 'label.action.generate.keys',
messages: {
confirm: function(args) {
- return 'Are you sure you want to generate keys?';
+ return 'message.generate.keys';
},
notification: function(args) {
- return 'Generating keys';
+ return 'label.action.generate.keys';
}
},
action: function(args) {
@@ -810,13 +812,13 @@
},
disable: {
- label: 'Disable user',
+ label: 'label.action.disable.user',
messages: {
confirm: function(args) {
- return 'Are you sure you want to disable this user?';
+ return 'message.disable.user';
},
notification: function(args) {
- return 'Disabling user';
+ return 'label.action.disable.user';
}
},
action: function(args) {
@@ -847,13 +849,13 @@
},
enable: {
- label: 'Enable user',
+ label: 'label.action.enable.user',
messages: {
confirm: function(args) {
- return 'Are you sure you want to enable this user?';
+ return 'message.enable.user';
},
notification: function(args) {
- return 'Enabling user';
+ return 'label.action.enable.user';
}
},
action: function(args) {
@@ -863,6 +865,9 @@
async: true,
success: function(json) {
args.response.success({data: json.enableuserresponse.user});
+ },
+ error: function(json) {
+ args.response.error(parseXMLHttpResponse(json));
}
});
},
@@ -874,13 +879,13 @@
},
'delete': {
- label: 'Delete user',
+ label: 'label.action.delete.user',
messages: {
confirm: function(args) {
- return 'Are you sure you want to delete this user?';
+ return 'message.delete.user';
},
notification: function(args) {
- return 'Deleting user';
+ return 'label.action.delete.user';
}
},
action: function(args) {
@@ -897,46 +902,45 @@
}
}
}
-
},
tabs: {
details: {
- title: 'details',
+ title: 'label.details',
fields: [
{
username: {
- label: 'Name',
+ label: 'label.name',
isEditable: true
}
},
{
id: { label: 'ID' },
- state: { label: 'State' },
- apikey: { label: 'API key' },
- secretkey: { label: 'Secret key' },
- account: { label: 'Account name' },
+ state: { label: 'label.state' },
+ apikey: { label: 'label.api.key' },
+ secretkey: { label: 'label.secret.key' },
+ account: { label: 'label.account.name' },
accounttype: {
- label: 'Role',
+ label: 'label.role',
converter: function(args) {
return cloudStack.converters.toRole(args);
}
},
- domain: { label: 'Domain' },
+ domain: { label: 'label.domain' },
email: {
- label: 'Email',
+ label: 'label.email',
isEditable: true
},
firstname: {
- label: 'First name',
+ label: 'label.first.name',
isEditable: true
},
lastname: {
- label: 'Last name',
+ label: 'label.last.name',
isEditable: true
},
timezone: {
- label: 'Timezone',
+ label: 'label.timezone',
converter: function(args) {
if(args == null || args.length == 0)
return "";
diff --git a/ui/scripts/configuration.js b/ui/scripts/configuration.js
index 0932f361efb..a8ae7fe64a9 100644
--- a/ui/scripts/configuration.js
+++ b/ui/scripts/configuration.js
@@ -4,51 +4,51 @@
var networkServiceObjs = [], serviceCheckboxNames = [];
cloudStack.sections.configuration = {
- title: 'Configuration',
+ title: 'label.configuration',
id: 'configuration',
sectionSelect: {
- label: 'Select view'
+ label: 'label.select-view'
},
sections: {
serviceOfferings: {
type: 'select',
- title: 'Service offerings',
+ title: 'label.menu.service.offerings',
listView: {
id: 'serviceOfferings',
- label: 'Service offerings',
+ label: 'label.menu.service.offerings',
fields: {
- name: { label: 'Name', editable: true },
- displaytext: { label: 'Description' }
+ name: { label: 'label.name', editable: true },
+ displaytext: { label: 'label.description' }
},
reorder: cloudStack.api.actions.sort('updateServiceOffering', 'serviceOfferings'),
actions: {
add: {
- label: 'Add service offering',
+ label: 'label.add.service.offering',
messages: {
confirm: function(args) {
- return 'Are you sure you want to add a service offering?';
+ return 'message.add.service.offering';
},
notification: function(args) {
- return 'Creating new service offering';
+ return 'label.add.service.offering';
}
},
createForm: {
- title: 'Add service offering',
+ title: 'label.add.service.offering',
fields: {
name: {
- label: 'Name',
+ label: 'label.name',
validation: { required: true }
},
description: {
- label: 'Description',
+ label: 'label.description',
validation: { required: true }
},
storageType: {
- label: 'Storage type',
+ label: 'label.storage.type',
select: function(args) {
var items = [];
items.push({id: 'shared', description: 'shared'});
@@ -57,57 +57,57 @@
}
},
cpuNumber: {
- label: '# of CPU cores',
+ label: 'label.num.cpu.cores',
validation: {
required: true,
number: true
}
},
cpuSpeed: {
- label: 'CPU (in MHz)',
+ label: 'label.cpu.mhz',
validation: {
required: true,
number: true
}
},
memory: {
- label: 'Memory (in MB)',
+ label: 'label.memory.mb',
validation: {
required: true,
number: true
}
},
networkRate: {
- label: 'Network rate',
+ label: 'label.network.rate',
validation: {
required: false, //optional
number: true
}
},
offerHA: {
- label: 'Offer HA',
+ label: 'label.offer.ha',
isBoolean: true,
isChecked: false
},
storageTags: {
- label: 'Storage tags'
+ label: 'label.storage.tags'
},
hostTags: {
- label: 'Host tags'
+ label: 'label.host.tags'
},
cpuCap: {
- label: 'CPU cap',
+ label: 'label.CPU.cap',
isBoolean: true,
isChecked: false
},
isPublic: {
- label: 'Public',
+ label: 'label.public',
isBoolean: true,
isReverse: true,
isChecked: true
},
domainId: {
- label: 'Domain',
+ label: 'label.domain',
dependsOn: 'isPublic',
select: function(args) {
$.ajax({
@@ -210,7 +210,7 @@
name: 'Service offering details',
actions: {
edit: {
- label: 'Edit',
+ label: 'label.edit',
action: function(args) {
var array1 = [];
array1.push("&name=" + todb(args.data.name));
@@ -230,13 +230,13 @@
},
'delete': {
- label: 'Delete service offering',
+ label: 'label.action.delete.service.offering',
messages: {
confirm: function(args) {
- return 'Are you sure you want to delete this service offering?';
+ return 'message.action.delete.service.offering';
},
notification: function(args) {
- return 'Deleting service offering';
+ return 'label.action.delete.service.offering';
}
},
action: function(args) {
@@ -262,48 +262,48 @@
tabs: {
details: {
- title: 'Details',
+ title: 'label.details',
fields: [
{
name: {
- label: 'Name',
+ label: 'label.name',
isEditable: true
}
},
{
- id: { label: 'ID' },
+ id: { label: 'label.id' },
displaytext: {
- label: 'Description',
+ label: 'label.description',
isEditable: true
},
- storagetype: { label: 'Storage Type' },
- cpunumber: { label: 'CPU number' },
+ storagetype: { label: 'label.storage.type' },
+ cpunumber: { label: 'label.num.cpu.cores' },
cpuspeed: {
- label: 'CPU speed',
+ label: 'label.cpu.mhz',
converter: function(args) {
return cloudStack.converters.convertHz(args);
}
},
memory: {
- label: 'Memory',
+ label: 'label.memory.mb',
converter: function(args) {
return cloudStack.converters.convertBytes(args*1024*1024);
}
},
- networkrate: { label: 'Network rate' },
+ networkrate: { label: 'label.network.rate' },
offerha: {
- label: 'Offer HA',
+ label: 'label.offer.ha',
converter: cloudStack.converters.toBooleanText
},
limitcpuuse: {
- label: 'CPU cap',
+ label: 'label.CPU.cap',
converter: cloudStack.converters.toBooleanText
},
- tags: { label: 'Storage tags' },
- hosttags: { label: 'Host tags' },
- domain: { label: 'Domain' },
- created: { label: 'Created', converter: cloudStack.converters.toLocalDate }
+ tags: { label: 'label.storage.tags' },
+ hosttags: { label: 'label.host.tags' },
+ domain: { label: 'label.domain' },
+ created: { label: 'label.created', converter: cloudStack.converters.toLocalDate }
}
],
@@ -323,43 +323,48 @@
systemServiceOfferings: {
type: 'select',
- title: 'System service offerings',
+ title: 'label.menu.system.service.offerings',
listView: {
id: 'systemServiceOfferings',
- label: 'System service offerings',
+ label: 'label.menu.system.service.offerings',
fields: {
- name: { label: 'Name', editable: true },
- displaytext: { label: 'Description' }
+ name: {
+ label: 'label.name',
+ editable: true
+ },
+ displaytext: {
+ label: 'label.description'
+ }
},
reorder: cloudStack.api.actions.sort('updateServiceOffering', 'systemServiceOfferings'),
actions: {
add: {
- label: 'Add system service offering',
+ label: 'label.add.system.service.offering',
messages: {
confirm: function(args) {
- return 'Are you sure you want to add a system service offering?';
+ return 'message.add.system.service.offering';
},
notification: function(args) {
- return 'Creating new system service offering';
+ return 'label.add.system.service.offering';
}
},
createForm: {
- title: 'Add system service offering',
+ title: 'label.add.system.service.offering',
fields: {
name: {
- label: 'Name',
+ label: 'label.name',
validation: { required: true }
},
description: {
- label: 'Description',
+ label: 'label.description',
validation: { required: true }
},
storageType: {
- label: 'Storage type',
+ label: 'label.storage.type',
select: function(args) {
var items = [];
items.push({id: 'shared', description: 'shared'});
@@ -368,57 +373,57 @@
}
},
cpuNumber: {
- label: '# of CPU cores',
+ label: 'label.num.cpu.cores',
validation: {
required: true,
number: true
}
},
cpuSpeed: {
- label: 'CPU (in MHz)',
+ label: 'label.cpu.mhz',
validation: {
required: true,
number: true
}
},
memory: {
- label: 'Memory (in MB)',
+ label: 'label.memory.mb',
validation: {
required: true,
number: true
}
},
networkRate: {
- label: 'Network rate',
+ label: 'label.network.rate',
validation: {
required: false, //optional
number: true
}
},
offerHA: {
- label: 'Offer HA',
+ label: 'label.offer.ha',
isBoolean: true,
isChecked: false
},
storageTags: {
- label: 'Storage tags'
+ label: 'label.storage.tags'
},
hostTags: {
- label: 'Host tags'
+ label: 'label.host.tags'
},
cpuCap: {
- label: 'CPU cap',
+ label: 'label.CPU.cap',
isBoolean: true,
isChecked: false
},
isPublic: {
- label: 'Public',
+ label: 'label.public',
isBoolean: true,
isReverse: true,
isChecked: true
},
domainId: {
- label: 'Domain',
+ label: 'label.domain',
dependsOn: 'isPublic',
select: function(args) {
$.ajax({
@@ -518,7 +523,7 @@
name: 'System service offering details',
actions: {
edit: {
- label: 'Edit',
+ label: 'label.edit',
action: function(args) {
var array1 = [];
array1.push("&name=" + todb(args.data.name));
@@ -538,13 +543,13 @@
},
'delete': {
- label: 'Delete system service offering',
+ label: 'label.action.delete.system.service.offering',
messages: {
confirm: function(args) {
- return 'Are you sure you want to delete this system service offering?';
+ return 'message.action.delete.system.service.offering';
},
notification: function(args) {
- return 'Deleting system service offering';
+ return 'label.action.delete.system.service.offering';
}
},
action: function(args) {
@@ -570,48 +575,48 @@
tabs: {
details: {
- title: 'Details',
+ title: 'label.details',
fields: [
{
name: {
- label: 'Name',
+ label: 'label.name',
isEditable: true
}
},
{
- id: { label: 'ID' },
+ id: { label: 'label.id' },
displaytext: {
- label: 'Description',
+ label: 'label.description',
isEditable: true
},
- storagetype: { label: 'Storage Type' },
- cpunumber: { label: 'CPU number' },
+ storagetype: { label: 'label.storage.type' },
+ cpunumber: { label: 'label.num.cpu.cores' },
cpuspeed: {
- label: 'CPU speed',
+ label: 'label.cpu.mhz',
converter: function(args) {
return cloudStack.converters.convertHz(args);
}
},
memory: {
- label: 'Memory',
+ label: 'label.memory.mb',
converter: function(args) {
return cloudStack.converters.convertBytes(args*1024*1024);
}
},
- networkrate: { label: 'Network rate' },
+ networkrate: { label: 'label.network.rate' },
offerha: {
- label: 'Offer HA',
+ label: 'label.offer.ha',
converter: cloudStack.converters.toBooleanText
},
limitcpuuse: {
- label: 'CPU cap',
+ label: 'label.CPU.cap',
converter: cloudStack.converters.toBooleanText
},
- tags: { label: 'Storage tags' },
- hosttags: { label: 'Host tags' },
- domain: { label: 'Domain' },
- created: { label: 'Created', converter: cloudStack.converters.toLocalDate }
+ tags: { label: 'label.storage.tags' },
+ hosttags: { label: 'label.host.tags' },
+ domain: { label: 'label.domain' },
+ created: { label: 'label.created', converter: cloudStack.converters.toLocalDate }
}
],
@@ -631,22 +636,22 @@
diskOfferings: {
type: 'select',
- title: 'Disk offerings',
+ title: 'label.menu.disk.offerings',
listView: {
id: 'diskOfferings',
- label: 'Disk offerings',
+ label: 'label.menu.disk.offerings',
fields: {
- name: { label: 'Name' },
- displaytext: { label: 'Description' },
+ name: { label: 'label.name' },
+ displaytext: { label: 'label.description' },
iscustomized: {
- label: 'Custom disk size',
+ label: 'label.custom.disk.size',
converter: cloudStack.converters.toBooleanText
},
disksize: {
- label: 'Disk Size',
+ label: 'label.disk.size.gb',
converter: function(args) {
if(args != 0)
- return args + " GB";
+ return args;
else
return "N/A";
}
@@ -684,50 +689,50 @@
actions: {
add: {
- label: 'Add disk offering',
+ label: 'label.add.disk.offering',
messages: {
confirm: function(args) {
- return 'Are you sure you want to add a disk offering?';
+ return 'message.add.disk.offering';
},
notification: function(args) {
- return 'Creating new disk offering';
+ return 'label.add.disk.offering';
}
},
createForm: {
- title: 'Add disk offering',
+ title: 'label.add.disk.offering',
fields: {
name: {
- label: 'Name',
+ label: 'label.name',
validation: { required: true }
},
description: {
- label: 'Description',
+ label: 'label.description',
validation: { required: true }
},
isCustomized: {
- label: 'Custom disk size',
+ label: 'label.custom.disk.size',
isBoolean: true,
isReverse: true,
isChecked: false
},
disksize: {
- label: 'Disk size (in GB)',
+ label: 'label.disk.size.gb',
dependsOn: 'isCustomized',
validation: { required: true, number: true }
},
tags: {
- label: 'Storage tags'
+ label: 'label.storage.tags'
},
isPublic: {
- label: 'Public',
+ label: 'label.public',
isBoolean: true,
isReverse: true,
isChecked: true
},
domainId: {
- label: 'Domain',
+ label: 'label.domain',
dependsOn: 'isPublic',
select: function(args) {
$.ajax({
@@ -790,7 +795,7 @@
name: 'Disk offering details',
actions: {
edit: {
- label: 'Edit',
+ label: 'label.edit',
action: function(args) {
var array1 = [];
array1.push("&name=" + todb(args.data.name));
@@ -810,13 +815,13 @@
},
'delete': {
- label: 'Delete disk offering',
+ label: 'label.action.delete.disk.offering',
messages: {
confirm: function(args) {
- return 'Are you sure you want to delete this disk offering?';
+ return 'message.action.delete.disk.offering';
},
notification: function(args) {
- return 'Deleting disk offering';
+ return 'label.action.delete.disk.offering';
}
},
action: function(args) {
@@ -842,36 +847,36 @@
tabs: {
details: {
- title: 'Details',
+ title: 'label.details',
fields: [
{
name: {
- label: 'Name',
+ label: 'label.name',
isEditable: true
}
},
{
- id: { label: 'ID' },
+ id: { label: 'label.id' },
displaytext: {
- label: 'Description',
+ label: 'label.description',
isEditable: true
},
iscustomized: {
- label: 'Custom disk size',
+ label: 'label.custom.disk.size',
converter: cloudStack.converters.toBooleanText
},
disksize: {
- label: 'Disk Size',
+ label: 'label.disk.size.gb',
converter: function(args) {
if(args != 0)
- return args + " GB";
+ return args;
else
return "N/A";
}
},
- tags: { label: 'Storage tags' },
- domain: { label: 'Domain' }
+ tags: { label: 'label.storage.tags' },
+ domain: { label: 'label.domain' }
}
],
@@ -891,14 +896,14 @@
hypervisorCapabilities: {
type: 'select',
- title: 'Hypervisor capabilities',
+ title: 'hypervisor.capabilities',
listView: {
id: 'hypervisorCapabilities',
- label: 'Hypervisor capabilities',
+ label: 'hypervisor.capabilities',
fields: {
- hypervisor: { label: 'Hypervisor' },
- hypervisorversion: { label: 'Hypervisor version' },
- maxguestslimit: { label: 'Max guest limit' }
+ hypervisor: { label: 'label.hypervisor' },
+ hypervisorversion: { label: 'hypervisor.version' },
+ maxguestslimit: { label: 'max.guest.limit' }
},
dataProvider: function(args) {
var array1 = [];
@@ -928,10 +933,10 @@
},
detailView: {
- name: 'Details',
+ name: 'label.details',
actions: {
edit: {
- label: 'Edit',
+ label: 'label.edit',
action: function(args) {
var array1 = [];
array1.push("&maxguestslimit=" + todb(args.data.maxguestslimit));
@@ -952,18 +957,18 @@
tabs: {
details: {
- title: 'Details',
+ title: 'label.details',
fields: [
{
- id: { label: 'ID' },
- hypervisor: { label: 'Hypervisor' },
- hypervisorversion: { label: 'Hypervisor version' },
+ id: { label: 'label.id' },
+ hypervisor: { label: 'label.hypervisor' },
+ hypervisorversion: { label: 'hypervisor.version' },
maxguestslimit: {
- label: 'Max guest limit',
+ label: 'max.guest.limit',
isEditable: true
},
securitygroupenabled: {
- label: 'Security group enabled',
+ label: 'security.group.enabled',
converter: cloudStack.converters.toBooleanText
}
}
@@ -983,18 +988,18 @@
networkOfferings: {
type: 'select',
- title: 'Network offerings',
+ title: 'label.menu.network.offerings',
listView: {
id: 'networkOfferings',
- label: 'Network offerings',
+ label: 'label.menu.network.offerings',
fields: {
- name: { label: 'Name' },
+ name: { label: 'label.name' },
state: {
converter: function(str) {
// For localization
return str;
},
- label: 'State', indicator: { 'Enabled': 'on', 'Disabled': 'off', 'Destroyed': 'off' }
+ label: 'label.state', indicator: { 'Enabled': 'on', 'Disabled': 'off', 'Destroyed': 'off' }
}
},
@@ -1042,11 +1047,10 @@
actions: {
add: {
- label: 'Add network offering',
+ label: 'add.network.offering',
createForm: {
- title: 'Add network offering',
- desc: 'Please specify the network offering',
+ title: 'add.network.offering',
preFilter: function(args) {
var $availability = args.$form.find('.form-item[rel=availability]');
var $serviceOfferingId = args.$form.find('.form-item[rel=serviceOfferingId]');
@@ -1084,14 +1088,14 @@
});
},
fields: {
- name: { label: 'Name', validation: { required: true } },
+ name: { label: 'label.name', validation: { required: true } },
- displayText: { label: 'Display Text', validation: { required: true } },
+ displayText: { label: 'label.description', validation: { required: true } },
- networkRate: { label: 'Network Rate' },
+ networkRate: { label: 'label.network.rate' },
trafficType: {
- label: 'Traffic Type', validation: { required: true },
+ label: 'label.traffic.type', validation: { required: true },
select: function(args) {
args.response.success({
data: [
@@ -1102,7 +1106,7 @@
},
guestIpType: {
- label: 'Guest Type',
+ label: 'guest.type',
select: function(args) {
args.response.success({
data: [
@@ -1123,10 +1127,10 @@
}
},
- specifyVlan: { label: 'Specify VLAN', isBoolean: true },
+ specifyVlan: { label: 'label.specify.vlan', isBoolean: true },
supportedServices: {
- label: 'Supported Services',
+ label: 'supported.services',
dynamic: function(args) {
$.ajax({
@@ -1323,12 +1327,12 @@
//show or hide upon checked services and selected providers above (end)
- conservemode: { label: 'Conserve mode', isBoolean: true },
+ conservemode: { label: 'conserve.mode', isBoolean: true },
- tags: { label: 'Tags' },
+ tags: { label: 'label.tags' },
availability: {
- label: 'Availability',
+ label: 'label.availability',
isHidden: true,
select: function(args) {
args.response.success({
@@ -1483,7 +1487,7 @@
name: 'Network offering details',
actions: {
edit: {
- label: 'Edit',
+ label: 'label.edit',
action: function(args) {
var array1 = [];
array1.push("&name=" + todb(args.data.name));
@@ -1611,27 +1615,27 @@
},
tabs: {
details: {
- title: 'Details',
+ title: 'label.details',
fields: [
{
name: {
- label: 'Name',
+ label: 'label.name',
isEditable: true
}
},
{
- id: { label: 'ID' },
+ id: { label: 'label.id' },
displaytext: {
- label: 'Description',
+ label: 'label.description',
isEditable: true
},
- state: { label: 'State' },
+ state: { label: 'label.state' },
guestiptype: {
- label: 'Guest type'
+ label: 'guest.type'
},
availability: {
- label: 'Availability',
+ label: 'label.availability',
isEditable: true,
select: function(args) {
var items = [];
@@ -1642,23 +1646,23 @@
}
},
isdefault: { //created by system by default
- label: 'Created by system',
+ label: 'created.by.system',
converter: cloudStack.converters.toBooleanText
},
specifyvlan: {
- label: 'Specify VLAN',
+ label: 'label.specify.vlan',
converter: cloudStack.converters.toBooleanText
},
specifyipranges: {
- label: 'Specify IP ranges',
+ label: 'specify.IP.ranges',
converter: cloudStack.converters.toBooleanText
},
conservemode: {
- label: 'Conserve mode',
+ label: 'conserve.mode',
converter: cloudStack.converters.toBooleanText
},
networkrate: {
- label: 'Network rate',
+ label: 'label.network.rate',
converter: function(args) {
var networkRate = args;
if (args == null || args == -1) {
@@ -1671,13 +1675,13 @@
}
},
traffictype: {
- label: 'Traffic type'
+ label: 'label.traffic.type'
},
supportedServices: {
- label: 'Services'
+ label: 'supported.services'
},
serviceCapabilities: {
- label: 'Service Capabilities'
+ label: 'service.capabilities'
}
}
],
diff --git a/ui/scripts/domains.js b/ui/scripts/domains.js
index 78c89d40729..53ab54744a9 100644
--- a/ui/scripts/domains.js
+++ b/ui/scripts/domains.js
@@ -1,6 +1,6 @@
(function(cloudStack) {
cloudStack.sections.domains = {
- title: 'Domains',
+ title: 'label.menu.domains',
id: 'domains',
// Domain tree
@@ -9,26 +9,24 @@
detailView: {
name: 'Domain details',
viewAll: {
- label: 'Accounts',
+ label: 'label.accounts',
path: 'accounts'
},
// Detail actions
actions: {
'delete': {
- label: 'Delete domain',
+ label: 'label.action.delete.domain',
messages: {
- confirm: function(args) {
- return 'Are you sure you want to delete this domain?'
- },
notification: function(args) {
- return 'Domain is deleted';
+ return 'label.action.delete.domain';
}
},
createForm: {
- title: 'Delete domain',
- createLabel: 'Delete',
+ title: 'label.action.delete.domain',
+ desc: 'message.action.delete.domain',
+ createLabel: 'label.delete',
preFilter: function(args) {
if(isAdmin()) {
args.$form.find('.form-item[rel=isForced]').css('display', 'inline-block');
@@ -36,7 +34,7 @@
},
fields: {
isForced: {
- label: 'Force delete',
+ label: 'force.delete',
isBoolean: true,
isHidden: true
}
@@ -75,10 +73,10 @@
// Edit domain
edit: {
- label: 'Edit domain details',
+ label: 'label.action.edit.domain',
messages: {
notification: function(args) {
- return 'Edited domain: ' + args.name;
+ return 'label.action.edit.domain';
}
},
action: function(args) {
@@ -142,7 +140,7 @@
// Add domain
create: {
- label: 'Add domain',
+ label: 'label.add.domain',
action: function(args) {
var array1 = [];
@@ -164,20 +162,20 @@
messages: {
notification: function(args) {
- return 'Created domain'
+ return 'label.add.domain';
}
},
createForm: {
- title: 'Add subdomain',
- desc: 'Please specify the subdomain you want to create under this domain',
+ title: 'label.add.domain',
+ desc: 'message.add.domain',
fields: {
name: {
- label: 'Name',
+ label: 'label.name',
validation: { required: true }
},
networkdomain: {
- label: 'Network Domain',
+ label: 'label.network.domain',
validation: { required: false }
}
}
@@ -186,43 +184,43 @@
},
tabs: {
details: {
- title: 'Details',
+ title: 'label.details',
fields: [
{
- name: { label: 'Name', isEditable: true }
+ name: { label: 'label.name', isEditable: true }
},
{
id: { label: 'ID' },
- path: { label: 'Full path'},
+ path: { label: 'label.full.path' },
networkdomain: {
- label: 'Network domain',
+ label: 'label.network.domain',
isEditable: true
},
vmLimit: {
- label: 'Instance limits',
+ label: 'label.instance.limits',
isEditable: true
},
ipLimit: {
- label: 'Public IP limits',
+ label: 'label.ip.limits',
isEditable: true
},
volumeLimit: {
- label: 'Volume limits',
+ label: 'label.volume.limits',
isEditable: true
},
snapshotLimit: {
- label: 'Snapshot limits',
+ label: 'label.snapshot.limits',
isEditable: true
},
templateLimit: {
- label: 'Template limits',
+ label: 'label.template.limits',
isEditable: true
},
- accountTotal: { label: 'Accounts' },
- vmTotal: { label: 'Instances' },
- volumeTotal: { label: 'Volumes' }
+ accountTotal: { label: 'label.accounts' },
+ vmTotal: { label: 'label.instances' },
+ volumeTotal: { label: 'label.volumes' }
}
],
dataProvider: function(args) {
diff --git a/ui/scripts/events.js b/ui/scripts/events.js
index 1aba60c81da..e1d95addbc6 100644
--- a/ui/scripts/events.js
+++ b/ui/scripts/events.js
@@ -1,6 +1,6 @@
(function(cloudStack) {
cloudStack.sections.events = {
- title: 'Events',
+ title: 'label.menu.events',
id: 'events',
sectionSelect: {
preFilter: function(args) {
@@ -9,20 +9,20 @@
else
return ["events"];
},
- label: 'Select view'
+ label: 'label.select-view'
},
sections: {
events: {
type: 'select',
- title: 'Events',
+ title: 'label.menu.events',
listView: {
id: 'events',
- label: 'Events',
+ label: 'label.menu.events',
fields: {
- type: { label: 'Type' },
- description: { label: 'Description' },
- username: { label: 'Initiated By' },
- created: { label: 'Date', converter: cloudStack.converters.toLocalDate }
+ type: { label: 'label.type' },
+ description: { label: 'label.description' },
+ username: { label: 'label.initiated.by' },
+ created: { label: 'label.date', converter: cloudStack.converters.toLocalDate }
},
dataProvider: function(args) {
var array1 = [];
@@ -48,15 +48,15 @@
});
},
detailView: {
- name: 'Event details',
+ name: 'label.details',
tabs: {
details: {
- title: 'Details',
+ title: 'label.details',
fields: [
{
- type: { label: 'Type' },
- description: { label: 'Description' },
- created: { label: 'Date', converter: cloudStack.converters.toLocalDate }
+ type: { label: 'label.type' },
+ description: { label: 'label.description' },
+ created: { label: 'label.date', converter: cloudStack.converters.toLocalDate }
}
],
dataProvider: function(args) {
@@ -69,13 +69,13 @@
},
alerts: {
type: 'select',
- title: 'Alerts',
+ title: 'label.menu.alerts',
listView: {
id: 'alerts',
- label: 'Alerts',
+ label: 'label.menu.alerts',
fields: {
- description: { label: 'Description' },
- sent: { label: 'Date', converter: cloudStack.converters.toLocalDate }
+ description: { label: 'label.description' },
+ sent: { label: 'label.date', converter: cloudStack.converters.toLocalDate }
},
dataProvider: function(args) {
var array1 = [];
@@ -103,12 +103,12 @@
name: 'Alert details',
tabs: {
details: {
- title: 'Details',
+ title: 'label.details',
fields: [
{
id: { label: 'ID' },
- description: { label: 'Description' },
- sent: { label: 'Date', converter: cloudStack.converters.toLocalDate }
+ description: { label: 'label.description' },
+ sent: { label: 'label.date', converter: cloudStack.converters.toLocalDate }
}
],
dataProvider: function(args) {
diff --git a/ui/scripts/network.js b/ui/scripts/network.js
index 7d7974d48d1..1acd708f109 100644
--- a/ui/scripts/network.js
+++ b/ui/scripts/network.js
@@ -558,6 +558,8 @@
if(zone.networktype == "Basic") {
hiddenFields.push("account");
hiddenFields.push("gateway");
+ hiddenFields.push("vlan");
+ hiddenFields.push("cidr");
//hiddenFields.push("netmask");
}
@@ -1322,44 +1324,39 @@
// Get network data
$.ajax({
- url: createURL("listPublicIpAddresses&id="+args.id),
+ url: createURL('listPublicIpAddresses'),
+ data: {
+ listAll: true,
+ id: args.id
+ },
dataType: "json",
async: true,
success: function(json) {
var item = items[0];
+ // Get VPN data
$.ajax({
- url: createURL('listNetworks'),
+ url: createURL('listRemoteAccessVpns'),
data: {
- networkid: this.associatednetworkid
+ listAll: true,
+ publicipid: item.id
},
dataType: 'json',
async: true,
- success: function(data) {
- // Get VPN data
- $.ajax({
- url: createURL('listRemoteAccessVpns'),
- data: {
- publicipid: item.id
- },
- dataType: 'json',
- async: true,
- success: function(vpnResponse) {
- var isVPNEnabled = vpnResponse.listremoteaccessvpnsresponse.count;
- if (isVPNEnabled) {
- item.vpnenabled = true;
- item.remoteaccessvpn = vpnResponse.listremoteaccessvpnsresponse.remoteaccessvpn[0];
- };
+ success: function(vpnResponse) {
+ var isVPNEnabled = vpnResponse.listremoteaccessvpnsresponse.count;
+ if (isVPNEnabled) {
+ item.vpnenabled = true;
+ item.remoteaccessvpn = vpnResponse.listremoteaccessvpnsresponse.remoteaccessvpn[0];
+ };
- // Check if data retrieval complete
- item.network = data.listnetworksresponse.network[0];
- item.networkname = item.network.name;
- item.networktype = item.network.type;
+ // Check if data retrieval complete
+ item.network = args.context.networks[0];
+ item.networkname = item.network.name;
+ item.networktype = item.network.type;
- args.response.success({
- actionFilter: actionFilters.ipAddress,
- data: item
- });
- }
+ args.response.success({
+ actionFilter: actionFilters.ipAddress,
+ data: item
});
}
});
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index c57ba364e33..d2767e5b0e2 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -217,9 +217,9 @@
providerListView: {
id: 'networkProviders',
fields: {
- name: { label: 'Name' },
+ name: { label: 'label.name' },
state: {
- label: 'State',
+ label: 'label.state',
converter: function(str) {
// For localization
return str;
@@ -280,7 +280,7 @@
detailView: {
actions: {
edit: {
- label: 'Edit',
+ label: 'label.edit',
action: function(args) {
var trafficType = getTrafficType(selectedPhysicalNetworkObj, 'Public');
@@ -295,10 +295,10 @@
},
tabs: {
details: {
- title: 'Details',
+ title: 'label.details',
fields: [
{
- traffictype: { label: 'Traffic type' },
+ traffictype: { label: 'label.traffic.type' },
broadcastdomaintype: { label: 'Broadcast domain type' }
},
{
@@ -428,7 +428,7 @@
detailView: {
actions: {
edit: {
- label: 'Edit',
+ label: 'label.edit',
action: function(args) {
var trafficType = getTrafficType(selectedPhysicalNetworkObj, 'Storage');
@@ -443,10 +443,10 @@
},
tabs: {
details: {
- title: 'Details',
+ title: 'label.details',
fields: [
{
- traffictype: { label: 'Traffic type' },
+ traffictype: { label: 'label.traffic.type' },
broadcastdomaintype: { label: 'Broadcast domain type' }
},
{
@@ -585,7 +585,7 @@
detailView: {
actions: {
edit: {
- label: 'Edit',
+ label: 'label.edit',
action: function(args) {
var trafficType = getTrafficType(selectedPhysicalNetworkObj, 'Management');
@@ -600,10 +600,10 @@
},
tabs: {
details: {
- title: 'Details',
+ title: 'label.details',
fields: [
{
- traffictype: { label: 'Traffic type' },
+ traffictype: { label: 'label.traffic.type' },
broadcastdomaintype: { label: 'Broadcast domain type' }
},
{
@@ -672,7 +672,7 @@
detailView: {
actions: {
edit: {
- label: 'Edit',
+ label: 'label.edit',
action: function(args) {
var vlan;
if(args.data.endVlan == null || args.data.endVlan.length == 0)
@@ -712,7 +712,7 @@
tabs: {
details: {
- title: 'Details',
+ title: 'label.details',
preFilter: function(args) {
var hiddenFields = [];
if(selectedZoneObj.networktype == "Basic") {
@@ -723,7 +723,7 @@
},
fields: [
{
- state: { label: 'State' },
+ state: { label: 'label.state' },
startVlan: {
label: 'Start Vlan',
isEditable: true
@@ -897,7 +897,7 @@
section: 'networks',
id: 'networks',
fields: {
- name: { label: 'Name' },
+ name: { label: 'label.name' },
type: { label: 'Type' },
vlan: { label: 'VLAN ID' },
cidr: { label: 'CIDR' },
@@ -921,7 +921,7 @@
fields: {
name: {
- label: 'Name',
+ label: 'label.name',
validation: { required: true }
},
description: {
@@ -1391,7 +1391,7 @@
},
actions: {
edit: {
- label: 'Edit',
+ label: 'label.edit',
messages: {
confirm: function(args) {
return 'Are you sure you want to edit network?';
@@ -1572,7 +1572,7 @@
},
tabs: {
details: {
- title: 'Details',
+ title: 'label.details',
preFilter: function(args) {
var hiddenFields = [];
if(selectedZoneObj.networktype == "Basic") {
@@ -1596,12 +1596,12 @@
fields: [
{
name: {
- label: 'Name',
+ label: 'label.name',
isEditable: true
}
},
{
- id: { label: 'ID' },
+ id: { label: 'label.id' },
displaytext: {
label: 'Description',
isEditable: true
@@ -1610,7 +1610,7 @@
label: 'Type'
},
state: {
- label: 'State'
+ label: 'label.state'
},
restartrequired: {
label: 'Restart required',
@@ -1697,13 +1697,13 @@
id: 'physicalNetworks',
hideToolbar: true,
fields: {
- name: { label: 'Name' },
+ name: { label: 'label.name' },
state: {
converter: function(str) {
// For localization
return str;
},
- label: 'State', indicator: { 'Enabled': 'on', 'Disabled': 'off' }
+ label: 'label.state', indicator: { 'Enabled': 'on', 'Disabled': 'off' }
},
vlan: { label: 'VLAN Range' }
}
@@ -1888,7 +1888,7 @@
isMaximized: true,
type: 'detailView',
fields: {
- name: { label: 'Name' },
+ name: { label: 'label.name' },
ipaddress: { label: 'IP Address' },
state: { label: 'Status', indicator: { 'Enabled': 'on' } }
},
@@ -1897,11 +1897,11 @@
title: 'Network',
fields: [
{
- name: { label: 'Name' }
+ name: { label: 'label.name' }
},
{
- id: { label: 'ID' },
- state: { label: 'State' },
+ id: { label: 'label.id' },
+ state: { label: 'label.state' },
physicalnetworkid: { label: 'Physical network ID' },
destinationphysicalnetworkid: { label: 'Destination physical networkID' }
},
@@ -1943,7 +1943,7 @@
label: 'Virtual Appliances',
id: 'routers',
fields: {
- name: { label: 'Name' },
+ name: { label: 'label.name' },
zonename: { label: 'Zone' },
state: {
converter: function(str) {
@@ -2267,14 +2267,14 @@
},
tabs: {
details: {
- title: 'Details',
+ title: 'label.details',
fields: [
{
- name: { label: 'Name' }
+ name: { label: 'label.name' }
},
{
- id: { label: 'ID' },
- state: { label: 'State' },
+ id: { label: 'label.id' },
+ state: { label: 'label.state' },
publicip: { label: 'Public IP' },
guestipaddress: { label: 'Guest IP' },
linklocalip: { label: 'Link local IP' },
@@ -2283,7 +2283,7 @@
networkdomain: { label: 'Network domain' },
domain: { label: 'Domain' },
account: { label: 'Account' },
- created: { label: 'Created', converter: cloudStack.converters.toLocalDate },
+ created: { label: 'label.created', converter: cloudStack.converters.toLocalDate },
isredundantrouter: {
label: 'Redundant router',
converter: cloudStack.converters.toBooleanText
@@ -2370,13 +2370,13 @@
viewAll: { label: 'Providers', path: '_zone.netscalerProviders' },
tabs: {
details: {
- title: 'Details',
+ title: 'label.details',
fields: [
{
- name: { label: 'Name' }
+ name: { label: 'label.name' }
},
{
- id: { label: 'ID' }
+ id: { label: 'label.id' }
}
],
dataProvider: function(args) {
@@ -2579,13 +2579,13 @@
viewAll: { label: 'Providers', path: '_zone.f5Providers' },
tabs: {
details: {
- title: 'Details',
+ title: 'label.details',
fields: [
{
- name: { label: 'Name' }
+ name: { label: 'label.name' }
},
{
- id: { label: 'ID' }
+ id: { label: 'label.id' }
}
],
dataProvider: function(args) {
@@ -2787,13 +2787,13 @@
viewAll: { label: 'Providers', path: '_zone.srxProviders' },
tabs: {
details: {
- title: 'Details',
+ title: 'label.details',
fields: [
{
- name: { label: 'Name' }
+ name: { label: 'label.name' }
},
{
- id: { label: 'ID' }
+ id: { label: 'label.id' }
}
],
dataProvider: function(args) {
@@ -3010,14 +3010,14 @@
viewAll: { label: 'Security Groups', path: 'network.securityGroups' },
tabs: {
details: {
- title: 'Details',
+ title: 'label.details',
fields: [
{
- name: { label: 'Name' }
+ name: { label: 'label.name' }
},
{
- state: { label: 'State' },
- id: { label: 'ID' },
+ state: { label: 'label.state' },
+ id: { label: 'label.id' },
physicalnetworkid: { label: 'Physical network ID' }
}
],
@@ -3093,8 +3093,8 @@
},
fields: {
- id: { label: 'ID' },
- name: { label: 'Name' }//,
+ id: { label: 'label.id' },
+ name: { label: 'label.name' }//,
//state: { label: 'Status' } //comment it for now, since dataProvider below doesn't get called by widget code after action is done
}
}
@@ -3360,7 +3360,7 @@
isMaximized: true,
actions: {
edit: {
- label: 'Edit',
+ label: 'label.edit',
action: function(args) {
var array1 = [];
array1.push("&name=" +todb(args.data.name));
@@ -3386,7 +3386,7 @@
},
tabs: {
details: {
- title: 'Details',
+ title: 'label.details',
preFilter: function(args) {
var hiddenFields = [];
@@ -3400,7 +3400,7 @@
name: { label: 'Zone', isEditable: true }
},
{
- id: { label: 'ID' },
+ id: { label: 'label.id' },
allocationstate: { label: 'Allocation State' },
dns1: { label: 'DNS 1', isEditable: true },
dns2: { label: 'DNS 2', isEditable: true },
@@ -3448,7 +3448,7 @@
label: 'System VMs',
id: 'systemVMs',
fields: {
- name: { label: 'Name' },
+ name: { label: 'label.name' },
systemvmtype: {
label: 'Type',
converter: function(args) {
@@ -3748,14 +3748,14 @@
},
tabs: {
details: {
- title: 'Details',
+ title: 'label.details',
fields: [
{
- name: { label: 'Name' }
+ name: { label: 'label.name' }
},
{
- id: { label: 'ID' },
- state: { label: 'State' },
+ id: { label: 'label.id' },
+ state: { label: 'label.state' },
systemvmtype: {
label: 'Type',
converter: function(args) {
@@ -3773,7 +3773,7 @@
linklocalip: { label: 'Link local IP' },
hostname: { label: 'Host' },
gateway: { label: 'Gateway' },
- created: { label: 'Created', converter: cloudStack.converters.toLocalDate },
+ created: { label: 'label.created', converter: cloudStack.converters.toLocalDate },
activeviewersessions: { label: 'Active sessions' }
}
],
@@ -3975,10 +3975,10 @@
},
tabs: {
details: {
- title: 'Details',
+ title: 'label.details',
fields: [
{
- lbdeviceid: { label: 'ID' },
+ lbdeviceid: { label: 'label.id' },
ipaddress: { label: 'IP Address' },
lbdevicestate: { label: 'Status' },
lbdevicename: { label: 'Type' },
@@ -4180,10 +4180,10 @@
},
tabs: {
details: {
- title: 'Details',
+ title: 'label.details',
fields: [
{
- lbdeviceid: { label: 'ID' },
+ lbdeviceid: { label: 'label.id' },
ipaddress: { label: 'IP Address' },
lbdevicestate: { label: 'Status' },
lbdevicename: { label: 'Type' },
@@ -4400,10 +4400,10 @@
},
tabs: {
details: {
- title: 'Details',
+ title: 'label.details',
fields: [
{
- fwdeviceid: { label: 'ID' },
+ fwdeviceid: { label: 'label.id' },
ipaddress: { label: 'IP Address' },
fwdevicestate: { label: 'Status' },
fwdevicename: { label: 'Type' },
@@ -4426,7 +4426,7 @@
id: 'pods',
section: 'pods',
fields: {
- name: { label: 'Name' },
+ name: { label: 'label.name' },
gateway: { label: 'Gateway' },
netmask: { label: 'Netmask' },
allocationstate: {
@@ -4555,7 +4555,7 @@
},
actions: {
edit: {
- label: 'Edit',
+ label: 'label.edit',
action: function(args) {
var array1 = [];
array1.push("&name=" +todb(args.data.name));
@@ -4687,13 +4687,13 @@
},
tabs: {
details: {
- title: 'Details',
+ title: 'label.details',
fields: [
{
- name: { label: 'Name', isEditable: true }
+ name: { label: 'label.name', isEditable: true }
},
{
- id: { label: 'ID' },
+ id: { label: 'label.id' },
netmask: { label: 'Netmask', isEditable: true },
startip: { label: 'Start IP Range', isEditable: true },
endip: { label: 'End IP Range', isEditable: true },
@@ -4721,7 +4721,7 @@
multiple: true,
fields: [
{
- id: { label: 'ID' },
+ id: { label: 'label.id' },
gateway: { label: 'Gateway' },
netmask: { label: 'Netmask' },
startip: { label: 'Start IP range' },
@@ -4749,9 +4749,9 @@
id: 'clusters',
section: 'clusters',
fields: {
- name: { label: 'Name' },
+ name: { label: 'label.name' },
podname: { label: 'Pod' },
- hypervisortype: { label: 'Hypervisor' },
+ hypervisortype: { label: 'label.hypervisor' },
//allocationstate: { label: 'Allocation State' },
//managedstate: { label: 'Managed State' },
state: {
@@ -4759,7 +4759,7 @@
// For localization
return str;
},
- label: 'State',
+ label: 'label.state',
indicator: { 'Enabled': 'on', 'Destroyed': 'off'}
}
},
@@ -4826,7 +4826,7 @@
desc: 'Please fill in the following data to add a new cluster.',
fields: {
hypervisor: {
- label: 'Hypervisor',
+ label: 'label.hypervisor',
select: function(args) {
$.ajax({
url: createURL("listHypervisors"),
@@ -5161,20 +5161,20 @@
tabs: {
details: {
- title: 'Details',
+ title: 'label.details',
fields: [
{
- name: { label: 'Name' }
+ name: { label: 'label.name' }
},
{
- id: { label: 'ID' },
+ id: { label: 'label.id' },
zonename: { label: 'Zone' },
podname: { label: 'Pod' },
- hypervisortype: { label: 'Hypervisor' },
+ hypervisortype: { label: 'label.hypervisor' },
clustertype: { label: 'Cluster type' },
//allocationstate: { label: 'Allocation State' },
//managedstate: { label: 'Managed State' },
- state: { label: 'State' }
+ state: { label: 'label.state' }
}
],
dataProvider: function(args) {
@@ -5195,7 +5195,7 @@
section: 'hosts',
id: 'hosts',
fields: {
- name: { label: 'Name' },
+ name: { label: 'label.name' },
zonename: { label: 'Zone' },
podname: { label: 'Pod' },
clustername: { label: 'Cluster' }
@@ -5547,7 +5547,7 @@
},
actions: {
edit: {
- label: 'Edit',
+ label: 'label.edit',
action: function(args) {
var array1 = [];
array1.push("&hosttags=" + todb(args.data.hosttags));
@@ -5753,15 +5753,15 @@
},
tabs: {
details: {
- title: 'Details',
+ title: 'label.details',
fields: [
{
- name: { label: 'Name' }
+ name: { label: 'label.name' }
},
{
- id: { label: 'ID' },
+ id: { label: 'label.id' },
resourcestate: { label: 'Resource state' },
- state: { label: 'State' },
+ state: { label: 'label.state' },
type: { label: 'Type' },
zonename: { label: 'Zone' },
podname: { label: 'Pod' },
@@ -5814,7 +5814,7 @@
id: 'primarystorages',
section: 'primary-storage',
fields: {
- name: { label: 'Name' },
+ name: { label: 'label.name' },
ipaddress: { label: 'Server' },
path: { label: 'Path' }
},
@@ -5904,7 +5904,7 @@
},
name: {
- label: 'Name',
+ label: 'label.name',
validation: { required: true }
},
@@ -6180,7 +6180,7 @@
//always appear (begin)
storageTags: {
- label: 'Storage Tags',
+ label: 'label.storage.tags',
validation: { required: false }
}
//always appear (end)
@@ -6295,7 +6295,7 @@
name: "Primary storage details",
actions: {
edit: {
- label: 'Edit',
+ label: 'label.edit',
action: function(args) {
var array1 = [];
array1.push("&tags=" + todb(args.data.tags));
@@ -6435,16 +6435,16 @@
tabs: {
details: {
- title: 'Details',
+ title: 'label.details',
fields: [
{
- name: { label: 'Name' }
+ name: { label: 'label.name' }
},
{
- id: { label: 'ID' },
- state: { label: 'State' },
+ id: { label: 'label.id' },
+ state: { label: 'label.state' },
tags: {
- label: 'Storage tags',
+ label: 'label.storage.tags',
isEditable: true
},
podname: { label: 'Pod' },
@@ -6493,8 +6493,8 @@
id: 'secondarystorages',
section: 'seconary-storage',
fields: {
- name: { label: 'Name' },
- created: { label: 'Created', converter: cloudStack.converters.toLocalDate }
+ name: { label: 'label.name' },
+ created: { label: 'label.created', converter: cloudStack.converters.toLocalDate }
},
dataProvider: function(args) {
@@ -6618,14 +6618,14 @@
},
tabs: {
details: {
- title: 'Details',
+ title: 'label.details',
fields: [
{
- name: { label: 'Name' }
+ name: { label: 'label.name' }
},
{
- id: { label: 'ID' },
- created: { label: 'Created', converter: cloudStack.converters.toLocalDate }
+ id: { label: 'label.id' },
+ created: { label: 'label.created', converter: cloudStack.converters.toLocalDate }
}
],
@@ -6647,7 +6647,7 @@
listView: {
section: 'guest-IP-range',
fields: {
- //id: { label: 'ID' },
+ //id: { label: 'label.id' },
//podname: { label: 'Pod' },
//vlan: { label: 'VLAN' },
startip: { label: 'Start IP' },
diff --git a/ui/scripts/templates.js b/ui/scripts/templates.js
index 69f48d4d8fe..231abeb412b 100644
--- a/ui/scripts/templates.js
+++ b/ui/scripts/templates.js
@@ -1,41 +1,41 @@
(function(cloudStack, $) {
cloudStack.sections.templates = {
- title: 'Templates',
+ title: 'label.menu.templates',
id: 'templates',
sectionSelect: {
- label: 'Select view'
+ label: 'label.select-view'
},
sections: {
templates: {
type: 'select',
- title: 'Templates',
+ title: 'label.menu.templates',
listView: {
id: 'templates',
- label: 'Templates',
- filters: {
- all: {
- preFilter: function(args) {
- if (isAdmin()) //"listTemplates&templatefilter=all" only works for root-admin, but no domain-admin. Domain-admin is unable to see all templates until listTemplates API supports a new type of templatefilter for domain-admin to see all templates in his domain.
- return true;
- else
- return false;
- },
- label: 'All'
- },
- mine: { label: 'Mine' },
- featured: { label: 'Featured' },
- community: { label: 'Community' }
- },
+ label: 'label.menu.templates',
+ filters: {
+ all: {
+ preFilter: function(args) {
+ if (isAdmin()) //"listTemplates&templatefilter=all" only works for root-admin, but no domain-admin. Domain-admin is unable to see all templates until listTemplates API supports a new type of templatefilter for domain-admin to see all templates in his domain.
+ return true;
+ else
+ return false;
+ },
+ label: 'ui.listView.filters.all'
+ },
+ mine: { label: 'ui.listView.filters.mine' },
+ featured: { label: 'label.featured' },
+ community: { label: 'label.community' }
+ },
fields: {
- name: { label: 'Name' },
- zonename: { label: 'Zone' },
- hypervisor: { label: 'Hypervisor' }
+ name: { label: 'label.name' },
+ zonename: { label: 'label.zone' },
+ hypervisor: { label: 'label.hypervisor' }
},
reorder: cloudStack.api.actions.sort('updateTemplate', 'templates'),
actions: {
add: {
- label: 'Create template',
+ label: 'label.action.create.template',
messages: {
confirm: function(args) {
@@ -53,16 +53,16 @@
},
createForm: {
- title: 'Create template',
- desc: 'Please fill in the following data to create a new template.',
+ title: 'label.action.create.template',
+ desc: 'label.action.create.template',
preFilter: cloudStack.preFilter.createTemplate,
fields: {
name: {
- label: 'Name',
+ label: 'label.name',
validation: { required: true }
},
description: {
- label: 'Description',
+ label: 'label.description',
validation: { required: true }
},
url: {
@@ -70,7 +70,7 @@
validation: { required: true }
},
zone: {
- label: 'Zone',
+ label: 'label.zone',
select: function(args) {
$.ajax({
url: createURL("listZones&available=true"),
@@ -91,7 +91,7 @@
}
},
hypervisor: {
- label: 'Hypervisor',
+ label: 'label.hypervisor',
dependsOn: 'zone',
select: function(args) {
if(args.zone == null)
@@ -116,9 +116,9 @@
args.response.success({data: items});
}
});
-
+
args.$select.change(function() {
- var $form = $(this).closest('form');
+ var $form = $(this).closest('form');
if($(this).val() == "VMware") {
$form.find('.form-item[rel=rootDiskControllerType]').css('display', 'inline-block');
$form.find('.form-item[rel=nicAdapterType]').css('display', 'inline-block');
@@ -128,14 +128,14 @@
$form.find('.form-item[rel=rootDiskControllerType]').hide();
$form.find('.form-item[rel=nicAdapterType]').hide();
$form.find('.form-item[rel=keyboardType]').hide();
- }
- });
+ }
+ });
}
},
-
+
//fields for hypervisor == "VMware" (starts here)
rootDiskControllerType: {
- label: 'Root disk controller',
+ label: 'label.root.disk.controller',
isHidden: true,
select: function(args) {
var items = []
@@ -146,7 +146,7 @@
}
},
nicAdapterType: {
- label: 'NIC adapter type',
+ label: 'label.nic.adapter.type',
isHidden: true,
select: function(args) {
var items = []
@@ -159,20 +159,20 @@
}
},
keyboardType: {
- label: 'Keyboard type',
+ label: 'label.keyboard.type',
isHidden: true,
select: function(args) {
var items = []
items.push({id: "", description: ""});
- items.push({id: "us", description: "US"});
- items.push({id: "jp", description: "Japanese"});
+ items.push({id: "us", description: "US"});
+ items.push({id: "jp", description: "Japanese"});
args.response.success({data: items});
}
},
//fields for hypervisor == "VMware" (ends here)
-
+
format: {
- label: 'Format',
+ label: 'label.format',
dependsOn: 'hypervisor',
select: function(args) {
var items = [];
@@ -201,7 +201,7 @@
},
osTypeId: {
- label: 'OS Type',
+ label: 'label.os.type',
select: function(args) {
$.ajax({
url: createURL("listOsTypes"),
@@ -216,23 +216,23 @@
},
isExtractable: {
- label: "Extractable",
+ label: "extractable",
isBoolean: true
},
isPasswordEnabled: {
- label: "Password Enabled",
+ label: "label.password.enabled",
isBoolean: true
},
isPublic: {
- label: "Public",
+ label: "label.public",
isBoolean: true,
isHidden: true
},
isFeatured: {
- label: "Featured",
+ label: "label.featured",
isBoolean: true,
isHidden: true
}
@@ -258,13 +258,13 @@
//VMware only (starts here)
if(args.$form.find('.form-item[rel=rootDiskControllerType]').css("display") != "none" && args.data.rootDiskControllerType != "")
- array1.push("&details[0].rootDiskController=" + args.data.rootDiskControllerType);
+ array1.push("&details[0].rootDiskController=" + args.data.rootDiskControllerType);
if(args.$form.find('.form-item[rel=nicAdapterType]').css("display") != "none" && args.data.nicAdapterType != "")
- array1.push("&details[0].nicAdapter=" + args.data.nicAdapterType);
+ array1.push("&details[0].nicAdapter=" + args.data.nicAdapterType);
if(args.$form.find('.form-item[rel=keyboardType]').css("display") != "none" && args.data.keyboardType != "")
- array1.push("&details[0].keyboard=" + args.data.keyboardType);
+ array1.push("&details[0].keyboard=" + args.data.keyboardType);
//VMware only (ends here)
-
+
$.ajax({
url: createURL("registerTemplate" + array1.join("")),
dataType: "json",
@@ -294,22 +294,22 @@
args.complete();
}
}
- }
+ }
},
- dataProvider: function(args) {
- var array1 = [];
+ dataProvider: function(args) {
+ var array1 = [];
var ignoreProject = false;
if(args.filterBy != null) {
if(args.filterBy.kind != null) {
- switch(args.filterBy.kind) {
+ switch(args.filterBy.kind) {
case "all":
ignoreProject = true;
array1.push("&templatefilter=all");
- break;
+ break;
case "mine":
array1.push("&templatefilter=self");
- break;
+ break;
case "featured":
ignoreProject = true;
array1.push("&templatefilter=featured");
@@ -317,18 +317,18 @@
case "community":
ignoreProject = true;
array1.push("&templatefilter=community");
- break;
+ break;
}
}
if(args.filterBy.search != null && args.filterBy.search.by != null && args.filterBy.search.value != null) {
switch(args.filterBy.search.by) {
case "name":
- if(args.filterBy.search.value.length > 0)
+ if(args.filterBy.search.value.length > 0)
array1.push("&keyword=" + args.filterBy.search.value);
break;
}
}
- }
+ }
$.ajax({
url: createURL("listTemplates&page=" + args.page + "&pagesize=" + pageSize + array1.join(""),
{ ignoreProject: ignoreProject }),
@@ -348,50 +348,50 @@
name: 'Template details',
actions: {
edit: {
- label: 'Edit',
+ label: 'label.edit',
action: function(args) {
var array1 = [];
array1.push("&name=" + todb(args.data.name));
array1.push("&displaytext=" + todb(args.data.displaytext));
- array1.push("&ostypeid=" + args.data.ostypeid);
- array1.push("&passwordenabled=" + (args.data.passwordenabled=="on"));
+ array1.push("&ostypeid=" + args.data.ostypeid);
+ array1.push("&passwordenabled=" + (args.data.passwordenabled=="on"));
$.ajax({
url: createURL("updateTemplate&id=" + args.context.templates[0].id + "&zoneid=" + args.context.templates[0].zoneid + array1.join("")),
dataType: "json",
async: false,
- success: function(json) {
- //API returns an incomplete embedded object (some properties are missing in the embedded template object)
+ success: function(json) {
+ //API returns an incomplete embedded object (some properties are missing in the embedded template object)
}
});
-
+
var array2 = [];
- array2.push("&ispublic=" + (args.data.ispublic=="on"));
- array2.push("&isfeatured=" + (args.data.isfeatured=="on"));
- array2.push("&isextractable=" + (args.data.isextractable=="on"));
+ array2.push("&ispublic=" + (args.data.ispublic=="on"));
+ array2.push("&isfeatured=" + (args.data.isfeatured=="on"));
+ array2.push("&isextractable=" + (args.data.isextractable=="on"));
$.ajax({
url: createURL("updateTemplatePermissions&id=" + args.context.templates[0].id + "&zoneid=" + args.context.templates[0].zoneid + array2.join("")),
dataType: "json",
async: false,
- success: function(json) {
- //API doesn't return an embedded object
+ success: function(json) {
+ //API doesn't return an embedded object
}
});
-
+
//So, we call listTemplates API to get a complete template object
- $.ajax({
+ $.ajax({
url: createURL("listTemplates&id=" + args.context.templates[0].id + "&zoneid=" + args.context.templates[0].zoneid + "&templatefilter=self"),
dataType: "json",
async: false,
- success: function(json){
+ success: function(json){
var item = json.listtemplatesresponse.template;
args.response.success({data: item});
}
- });
+ });
}
},
copyTemplate: {
- label: 'Copy template',
+ label: 'label.action.copy.template',
messages: {
confirm: function(args) {
return 'Are you sure you want to copy template?';
@@ -400,18 +400,15 @@
return 'Template is being copied.';
},
notification: function(args) {
- return 'Copying template';
- },
- complete: function(args) {
- return 'Template has been copied.';
+ return 'label.action.copy.template';
}
},
createForm: {
- title: 'Copy template',
+ title: 'label.action.copy.template',
desc: '',
fields: {
destinationZoneId: {
- label: 'Destination zone',
+ label: 'label.destination.zone',
validation: { required: true },
select: function(args) {
$.ajax({
@@ -460,29 +457,26 @@
},
downloadTemplate: {
- label: 'Download template',
+ label: 'label.action.download.template',
messages: {
confirm: function(args) {
- return 'Are you sure you want to download template ?';
- },
- success: function(args) {
- return 'Template is being downloaded.';
+ return 'message.action.download.template';
},
notification: function(args) {
return 'Downloading template';
},
complete: function(args) {
var url = decodeURIComponent(args.url);
- var htmlMsg = 'Please click 00000 to download template';
+ var htmlMsg = _l('message.download.template');
var htmlMsg2 = htmlMsg.replace(/#/, url).replace(/00000/, url);
return htmlMsg2;
}
},
- action: function(args) {
- var apiCmd = "extractTemplate&mode=HTTP_DOWNLOAD&id=" + args.context.templates[0].id;
- if(args.context.templates[0].zoneid != null)
- apiCmd += "&zoneid=" + args.context.templates[0].zoneid;
-
+ action: function(args) {
+ var apiCmd = "extractTemplate&mode=HTTP_DOWNLOAD&id=" + args.context.templates[0].id;
+ if(args.context.templates[0].zoneid != null)
+ apiCmd += "&zoneid=" + args.context.templates[0].zoneid;
+
$.ajax({
url: createURL(apiCmd),
dataType: "json",
@@ -510,19 +504,13 @@
},
'delete': {
- label: 'Delete template',
+ label: 'label.action.delete.template',
messages: {
confirm: function(args) {
- return 'Are you sure you want to delete template ?';
- },
- success: function(args) {
- return 'template is being deleted.';
+ return 'message.action.delete.template';
},
notification: function(args) {
- return 'Deleting template';
- },
- complete: function(args) {
- return 'template has been deleted.';
+ return 'label.action.delete.template';
}
},
action: function(args) {
@@ -559,7 +547,7 @@
},
tabs: {
details: {
- title: 'Template Details',
+ title: 'label.details',
preFilter: function(args) {
var hiddenFields;
@@ -575,24 +563,24 @@
fields: [
{
name: {
- label: 'Name',
+ label: 'label.name',
isEditable: true
}
},
{
id: { label: 'ID' },
- zonename: { label: 'Zone name' },
- zoneid: { label: 'Zone ID' },
+ zonename: { label: 'label.zone.name' },
+ zoneid: { label: 'label.zone.id' },
displaytext: {
- label: 'Description',
+ label: 'label.description',
isEditable: true
},
- hypervisor: { label: 'Hypervisor' },
- templatetype: { label: 'Template Type' },
- isready: { label: 'Ready', converter:cloudStack.converters.toBooleanText },
- status: { label: 'Status' },
+ hypervisor: { label: 'label.hypervisor' },
+ templatetype: { label: 'label.type' },
+ isready: { label: 'state.ready', converter:cloudStack.converters.toBooleanText },
+ status: { label: 'label.status' },
size : {
- label: 'Size',
+ label: 'label.size',
converter: function(args) {
if (args == null || args == 0)
return "";
@@ -601,36 +589,36 @@
}
},
isextractable: {
- label: 'Extractable',
+ label: 'extractable',
isBoolean: true,
- isEditable: true,
+ isEditable: true,
converter:cloudStack.converters.toBooleanText
},
passwordenabled: {
- label: 'Password Enabled',
+ label: 'label.password.enabled',
isBoolean: true,
- isEditable: true,
+ isEditable: true,
converter:cloudStack.converters.toBooleanText
},
ispublic: {
- label: 'Public',
+ label: 'label.public',
isBoolean: true,
- isEditable: true,
+ isEditable: true,
converter:cloudStack.converters.toBooleanText
},
isfeatured: {
- label: 'Featured',
+ label: 'label.featured',
isBoolean: true,
- isEditable: true,
+ isEditable: true,
converter:cloudStack.converters.toBooleanText
},
crossZones: {
- label: 'Cross Zones',
+ label: 'label.cross.zones',
converter:cloudStack.converters.toBooleanText
},
ostypeid: {
- label: 'OS Type',
+ label: 'label.os.type',
isEditable: true,
select: function(args) {
$.ajax({
@@ -649,29 +637,29 @@
}
},
- domain: { label: 'Domain' },
- account: { label: 'Account' },
- created: { label: 'Created', converter: cloudStack.converters.toLocalDate }
+ domain: { label: 'label.domain' },
+ account: { label: 'label.account' },
+ created: { label: 'label.created', converter: cloudStack.converters.toLocalDate }
}
],
- dataProvider: function(args) {
- var jsonObj = args.context.templates[0];
- var apiCmd = "listTemplates&templatefilter=self&id=" + jsonObj.id;
- if(jsonObj.zoneid != null)
- apiCmd = apiCmd + "&zoneid=" + jsonObj.zoneid;
-
- $.ajax({
- url: createURL(apiCmd),
- dataType: "json",
- success: function(json) {
- args.response.success({
- actionFilter: templateActionfilter,
- data: json.listtemplatesresponse.template[0]
- });
- }
- });
-
+ dataProvider: function(args) {
+ var jsonObj = args.context.templates[0];
+ var apiCmd = "listTemplates&templatefilter=self&id=" + jsonObj.id;
+ if(jsonObj.zoneid != null)
+ apiCmd = apiCmd + "&zoneid=" + jsonObj.zoneid;
+
+ $.ajax({
+ url: createURL(apiCmd),
+ dataType: "json",
+ success: function(json) {
+ args.response.success({
+ actionFilter: templateActionfilter,
+ data: json.listtemplatesresponse.template[0]
+ });
+ }
+ });
+
}
}
}
@@ -680,60 +668,51 @@
},
isos: {
type: 'select',
- title: 'ISOs',
+ title: 'label.iso',
listView: {
- label: 'ISOs',
- filters: {
- all: {
- preFilter: function(args) {
- if (isAdmin()) //"listIsos&filter=all" only works for root-admin, but no domain-admin. Domain-admin is unable to see all Isos until listIsos API supports a new type of isofilter for domain-admin to see all Isos in his domain.
- return true;
- else
- return false;
- },
- label: 'All'
- },
- mine: { label: 'Mine' },
- featured: { label: 'Featured' },
- community: { label: 'Community' }
- },
- fields: {
- displaytext: { label: 'Name' },
- zonename: { label: 'Zone' }
+ label: 'label.iso',
+ filters: {
+ all: {
+ preFilter: function(args) {
+ if (isAdmin()) //"listIsos&filter=all" only works for root-admin, but no domain-admin. Domain-admin is unable to see all Isos until listIsos API supports a new type of isofilter for domain-admin to see all Isos in his domain.
+ return true;
+ else
+ return false;
+ },
+ label: 'ui.listView.filters.all'
+ },
+ mine: { label: 'ui.listView.filters.mine' },
+ featured: { label: 'label.featured' },
+ community: { label: 'labelc.community' }
},
-
+ fields: {
+ displaytext: { label: 'label.name' },
+ zonename: { label: 'label.zone' }
+ },
+
reorder: cloudStack.api.actions.sort('updateIso', 'isos'),
actions: {
add: {
- label: 'Create ISO',
+ label: 'label.add.iso',
messages: {
- confirm: function(args) {
- return 'Are you sure you want to create a ISO?';
- },
- success: function(args) {
- return 'Your new ISO is being created.';
- },
notification: function(args) {
- return 'Creating new ISO';
- },
- complete: function(args) {
- return 'ISO has been created successfully!';
+ return 'label.add.iso';
}
},
createForm: {
- title: 'Create ISO',
- desc: 'Please fill in the following data to create a new ISO.',
+ title: 'label.add.iso',
+ desc: 'label.add.iso',
preFilter: cloudStack.preFilter.createTemplate,
fields: {
name: {
- label: 'Name',
+ label: 'label.name',
validation: { required: true }
},
description: {
- label: 'Description',
+ label: 'label.description',
validation: { required: true }
},
url: {
@@ -741,7 +720,7 @@
validation: { required: true }
},
zone: {
- label: 'Zone',
+ label: 'label.zone',
select: function(args) {
$.ajax({
url: createURL("listZones&available=true"),
@@ -763,13 +742,13 @@
},
isBootable: {
- label: "Bootable",
+ label: "label.bootable",
isBoolean: true,
- isChecked: true
+ isChecked: true
},
osTypeId: {
- label: 'OS Type',
+ label: 'label.os.type',
dependsOn: 'isBootable',
isHidden: false,
validation: { required: true },
@@ -792,18 +771,18 @@
},
isExtractable: {
- label: "Extractable",
+ label: "extractable",
isBoolean: true
},
isPublic: {
- label: "Public",
+ label: "label.public",
isBoolean: true,
isHidden: true
},
isFeatured: {
- label: "Featured",
+ label: "label.featured",
isBoolean: true,
isHidden: true
}
@@ -856,22 +835,22 @@
args.complete();
}
}
- }
+ }
},
- dataProvider: function(args) {
+ dataProvider: function(args) {
var array1 = [];
- var ignoreProject = false;
+ var ignoreProject = false;
if(args.filterBy != null) {
if(args.filterBy.kind != null) {
- switch(args.filterBy.kind) {
- case "all":
+ switch(args.filterBy.kind) {
+ case "all":
ignoreProject = true;
array1.push("&isofilter=all");
- break;
- case "mine":
+ break;
+ case "mine":
array1.push("&isofilter=self");
- break;
+ break;
case "featured":
ignoreProject = true;
array1.push("&isofilter=featured");
@@ -879,19 +858,19 @@
case "community":
ignoreProject = true;
array1.push("&isofilter=community");
- break;
+ break;
}
}
if(args.filterBy.search != null && args.filterBy.search.by != null && args.filterBy.search.value != null) {
switch(args.filterBy.search.by) {
case "name":
- if(args.filterBy.search.value.length > 0)
+ if(args.filterBy.search.value.length > 0)
array1.push("&keyword=" + args.filterBy.search.value);
break;
}
}
- }
-
+ }
+
$.ajax({
url: createURL("listIsos&page=" + args.page + "&pagesize=" + pageSize + array1.join(""), { ignoreProject: ignoreProject }),
dataType: "json",
@@ -907,10 +886,10 @@
},
detailView: {
- name: 'ISO details',
+ name: 'label.details',
actions: {
edit: {
- label: 'Edit',
+ label: 'label.edit',
action: function(args) {
var array1 = [];
array1.push("&name=" + todb(args.data.name));
@@ -921,59 +900,50 @@
dataType: "json",
async: false,
success: function(json) {
- //updateIso API returns an incomplete ISO object (isextractable and isfeatured are missing)
+ //updateIso API returns an incomplete ISO object (isextractable and isfeatured are missing)
}
});
-
+
var array2 = [];
- array2.push("&ispublic=" + (args.data.ispublic=="on"));
- array2.push("&isfeatured=" + (args.data.isfeatured=="on"));
- array2.push("&isextractable=" + (args.data.isextractable=="on"));
+ array2.push("&ispublic=" + (args.data.ispublic=="on"));
+ array2.push("&isfeatured=" + (args.data.isfeatured=="on"));
+ array2.push("&isextractable=" + (args.data.isextractable=="on"));
$.ajax({
url: createURL("updateIsoPermissions&id=" + args.context.isos[0].id + "&zoneid=" + args.context.isos[0].zoneid + array2.join("")),
dataType: "json",
async: false,
- success: function(json) {
- //updateIsoPermissions API doesn't return ISO object
+ success: function(json) {
+ //updateIsoPermissions API doesn't return ISO object
}
});
-
+
//So, we call listIsos API to get a complete ISO object
- $.ajax({
+ $.ajax({
url: createURL("listIsos&id=" + args.context.isos[0].id + "&zoneid=" + args.context.isos[0].zoneid + "&isofilter=self"),
dataType: "json",
async: false,
- success: function(json){
+ success: function(json){
var item = json.listisosresponse.iso;
args.response.success({data: item});
}
- });
+ });
}
},
copyISO: {
- label: 'Copy ISO',
+ label: 'label.action.copy.iso',
messages: {
- confirm: function(args) {
- return 'Are you sure you want to copy ISO?';
- },
- success: function(args) {
- return 'ISO is being copied.';
- },
notification: function(args) {
return 'Copying ISO';
- },
- complete: function(args) {
- return 'ISO has been copied.';
}
},
createForm: {
- title: 'Copy ISO',
- desc: '',
+ title: 'label.action.copy.iso',
+ desc: 'label.action.copy.iso',
fields: {
destinationZoneId: {
- label: 'Destination zone',
- validation: { required: true },
+ label: 'label.destinaton.zone',
+ validation: { required: true },
select: function(args) {
$.ajax({
url: createURL("listZones&available=true"),
@@ -1021,29 +991,26 @@
},
downloadISO: {
- label: 'Download ISO',
+ label: 'label.action.download.ISO',
messages: {
confirm: function(args) {
- return 'Are you sure you want to download ISO ?';
- },
- success: function(args) {
- return 'ISO is being downloaded.';
+ return 'message.action.download.iso';
},
notification: function(args) {
- return 'Downloading ISO';
+ return 'label.action.download.ISO';
},
complete: function(args) {
var url = decodeURIComponent(args.url);
- var htmlMsg = 'Please click 00000 to download ISO';
+ var htmlMsg = _l('messge.download.ISO');
var htmlMsg2 = htmlMsg.replace(/#/, url).replace(/00000/, url);
return htmlMsg2;
}
},
- action: function(args) {
- var apiCmd = "extractIso&mode=HTTP_DOWNLOAD&id=" + args.context.isos[0].id;
- if(args.context.isos[0].zoneid != null)
- apiCmd += "&zoneid=" + args.context.isos[0].zoneid;
-
+ action: function(args) {
+ var apiCmd = "extractIso&mode=HTTP_DOWNLOAD&id=" + args.context.isos[0].id;
+ if(args.context.isos[0].zoneid != null)
+ apiCmd += "&zoneid=" + args.context.isos[0].zoneid;
+
$.ajax({
url: createURL(apiCmd),
dataType: "json",
@@ -1071,19 +1038,13 @@
},
'delete': {
- label: 'Delete ISO',
+ label: 'label.action.delete.ISO',
messages: {
confirm: function(args) {
- return 'Are you sure you want to delete ISO ?';
- },
- success: function(args) {
- return 'ISO is being deleted.';
+ return 'message.action.delete.ISO';
},
notification: function(args) {
- return 'Deleting ISO';
- },
- complete: function(args) {
- return 'ISO has been deleted.';
+ return 'label.action.delete.ISO';
}
},
action: function(args) {
@@ -1121,27 +1082,27 @@
tabs: {
details: {
- title: 'ISO Details',
+ title: 'label.details',
fields: [
{
name: {
- label: 'Name',
+ label: 'label.name',
isEditable: true
}
},
{
id: { label: 'ID' },
- zonename: { label: 'Zone name' },
- zoneid: { label: 'Zone ID' },
+ zonename: { label: 'label.zone.name' },
+ zoneid: { label: 'label.zone.id' },
displaytext: {
- label: 'Description',
+ label: 'label.description',
isEditable: true
},
- isready: { label: 'Ready', converter:cloudStack.converters.toBooleanText },
- status: { label: 'Status' },
+ isready: { label: 'state.Ready', converter:cloudStack.converters.toBooleanText },
+ status: { label: 'label.status' },
size : {
- label: 'Size',
+ label: 'label.size',
converter: function(args) {
if (args == null || args == 0)
return "";
@@ -1150,34 +1111,34 @@
}
},
isextractable: {
- label: 'Extractable',
+ label: 'extractable',
isBoolean: true,
- isEditable: true,
+ isEditable: true,
converter:cloudStack.converters.toBooleanText
},
bootable: {
- label: 'Bootable',
+ label: 'label.bootable',
converter:cloudStack.converters.toBooleanText
},
ispublic: {
- label: 'Public',
+ label: 'label.public',
isBoolean: true,
- isEditable: true,
+ isEditable: true,
converter:cloudStack.converters.toBooleanText
},
isfeatured: {
- label: 'Featured',
+ label: 'label.featured',
isBoolean: true,
- isEditable: true,
+ isEditable: true,
converter:cloudStack.converters.toBooleanText
},
crossZones: {
- label: 'Cross Zones',
+ label: 'label.cross.zones',
converter:cloudStack.converters.toBooleanText
},
ostypeid: {
- label: 'OS Type',
+ label: 'label.os.type',
isEditable: true,
select: function(args) {
$.ajax({
@@ -1196,29 +1157,29 @@
}
},
- domain: { label: 'Domain' },
- account: { label: 'Account' },
- created: { label: 'Created', converter: cloudStack.converters.toLocalDate }
+ domain: { label: 'label.domain' },
+ account: { label: 'label.account' },
+ created: { label: 'label.created', converter: cloudStack.converters.toLocalDate }
}
],
dataProvider: function(args) {
- var jsonObj = args.context.isos[0];
- var apiCmd = "listIsos&isofilter=self&id="+jsonObj.id;
- if(jsonObj.zoneid != null)
- apiCmd = apiCmd + "&zoneid="+jsonObj.zoneid;
-
- $.ajax({
- url: createURL(apiCmd),
- dataType: "json",
- success: function(json) {
- args.response.success({
- actionFilter: isoActionfilter,
- data: json.listisosresponse.iso[0]
- });
- }
- });
-
+ var jsonObj = args.context.isos[0];
+ var apiCmd = "listIsos&isofilter=self&id="+jsonObj.id;
+ if(jsonObj.zoneid != null)
+ apiCmd = apiCmd + "&zoneid="+jsonObj.zoneid;
+
+ $.ajax({
+ url: createURL(apiCmd),
+ dataType: "json",
+ success: function(json) {
+ args.response.success({
+ actionFilter: isoActionfilter,
+ data: json.listisosresponse.iso[0]
+ });
+ }
+ });
+
}
}
}
@@ -1230,20 +1191,20 @@
var templateActionfilter = function(args) {
var jsonObj = args.context.item;
- var allowedActions = [];
+ var allowedActions = [];
// "Edit Template", "Copy Template", "Create VM"
if ((isAdmin() == false && !(jsonObj.domainid == g_domainid && jsonObj.account == g_account)) //if neither root-admin, nor item owner
|| jsonObj.templatetype == "SYSTEM" || jsonObj.isready == false) {
//do nothing
}
- else {
- allowedActions.push("edit");
-
- if(havingSwift == false)
- allowedActions.push("copyTemplate");
-
- //allowedActions.push("createVm"); // For Beta2, this simply doesn't work without a network.
+ else {
+ allowedActions.push("edit");
+
+ if(havingSwift == false)
+ allowedActions.push("copyTemplate");
+
+ //allowedActions.push("createVm"); // For Beta2, this simply doesn't work without a network.
}
// "Download Template"
@@ -1251,18 +1212,18 @@
|| (jsonObj.isready == false) || jsonObj.templatetype == "SYSTEM") {
//do nothing
}
- else {
+ else {
allowedActions.push("downloadTemplate");
}
// "Delete Template"
//if (((isUser() && jsonObj.ispublic == true && !(jsonObj.domainid == g_domainid && jsonObj.account == g_account)))
if (((isAdmin() == false && !(jsonObj.domainid == g_domainid && jsonObj.account == g_account))) //if neither root-admin, nor item owner
- || (jsonObj.isready == false && jsonObj.status != null && jsonObj.status.indexOf("Downloaded") != -1)
- || (jsonObj.domainid == 1 && jsonObj.account == "system")) {
+ || (jsonObj.isready == false && jsonObj.status != null && jsonObj.status.indexOf("Downloaded") != -1)
+ || (jsonObj.domainid == 1 && jsonObj.account == "system")) {
//do nothing
}
- else {
+ else {
allowedActions.push("delete");
}
@@ -1279,11 +1240,11 @@
) {
//do nothing
}
- else {
- allowedActions.push("edit");
-
- if(havingSwift == false)
- allowedActions.push("copyISO");
+ else {
+ allowedActions.push("edit");
+
+ if(havingSwift == false)
+ allowedActions.push("copyISO");
}
// "Create VM"
@@ -1297,7 +1258,7 @@
) {
//do nothing
}
- else {
+ else {
allowedActions.push("createVm");
}
*/
@@ -1310,7 +1271,7 @@
) {
//do nothing
}
- else {
+ else {
allowedActions.push("downloadISO");
}
@@ -1322,7 +1283,7 @@
) {
//do nothing
}
- else {
+ else {
allowedActions.push("delete");
}
diff --git a/ui/scripts/ui/dialog.js b/ui/scripts/ui/dialog.js
index 1ea1252c4eb..38e781085b8 100644
--- a/ui/scripts/ui/dialog.js
+++ b/ui/scripts/ui/dialog.js
@@ -29,7 +29,7 @@
return false;
});
- var createLabel = args.form.createLabel;
+ var createLabel = _l(args.form.createLabel);
var $submit = $('')
.attr({
type: 'submit'