mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-03 04:12:31 +01:00
3.0 UI - localize service offering page.
This commit is contained in:
parent
4b982d5dbb
commit
94b7f749a9
@ -4,110 +4,110 @@
|
|||||||
var networkServiceObjs = [], serviceCheckboxNames = [];
|
var networkServiceObjs = [], serviceCheckboxNames = [];
|
||||||
|
|
||||||
cloudStack.sections.configuration = {
|
cloudStack.sections.configuration = {
|
||||||
title: 'Configuration',
|
title: 'label.configuration',
|
||||||
id: 'configuration',
|
id: 'configuration',
|
||||||
sectionSelect: {
|
sectionSelect: {
|
||||||
label: 'Select view'
|
label: 'label.select-view'
|
||||||
},
|
},
|
||||||
sections: {
|
sections: {
|
||||||
serviceOfferings: {
|
serviceOfferings: {
|
||||||
type: 'select',
|
type: 'select',
|
||||||
title: 'Service offerings',
|
title: 'label.menu.service.offerings',
|
||||||
listView: {
|
listView: {
|
||||||
id: 'serviceOfferings',
|
id: 'serviceOfferings',
|
||||||
label: 'Service offerings',
|
label: 'label.menu.service.offerings',
|
||||||
fields: {
|
fields: {
|
||||||
name: { label: 'Name', editable: true },
|
name: { label: 'label.name', editable: true },
|
||||||
displaytext: { label: 'Description' }
|
displaytext: { label: 'label.description' }
|
||||||
},
|
},
|
||||||
|
|
||||||
reorder: cloudStack.api.actions.sort('updateServiceOffering', 'serviceOfferings'),
|
reorder: cloudStack.api.actions.sort('updateServiceOffering', 'serviceOfferings'),
|
||||||
|
|
||||||
actions: {
|
actions: {
|
||||||
add: {
|
add: {
|
||||||
label: 'Add service offering',
|
label: 'label.add.service.offering',
|
||||||
|
|
||||||
messages: {
|
messages: {
|
||||||
confirm: function(args) {
|
confirm: function(args) {
|
||||||
return 'Are you sure you want to add a service offering?';
|
return 'message.add.service.offering';
|
||||||
},
|
},
|
||||||
notification: function(args) {
|
notification: function(args) {
|
||||||
return 'Creating new service offering';
|
return 'label.add.service.offering';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
createForm: {
|
createForm: {
|
||||||
title: 'Add service offering',
|
title: 'label.add.service.offering',
|
||||||
fields: {
|
fields: {
|
||||||
name: {
|
name: {
|
||||||
label: 'Name',
|
label: 'label.name',
|
||||||
validation: { required: true }
|
validation: { required: true }
|
||||||
},
|
},
|
||||||
description: {
|
description: {
|
||||||
label: 'Description',
|
label: 'label.description',
|
||||||
validation: { required: true }
|
validation: { required: true }
|
||||||
},
|
},
|
||||||
storageType: {
|
storageType: {
|
||||||
label: 'Storage type',
|
label: 'label.storage.type',
|
||||||
select: function(args) {
|
select: function(args) {
|
||||||
var items = [];
|
var items = [];
|
||||||
items.push({id: 'shared', description: 'shared'});
|
items.push({id: 'shared', description: 'Shared'});
|
||||||
items.push({id: 'local', description: 'local'});
|
items.push({id: 'local', description: 'Local'});
|
||||||
args.response.success({data: items});
|
args.response.success({data: items});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
cpuNumber: {
|
cpuNumber: {
|
||||||
label: '# of CPU cores',
|
label: 'label.num.cpu.cores',
|
||||||
validation: {
|
validation: {
|
||||||
required: true,
|
required: true,
|
||||||
number: true
|
number: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
cpuSpeed: {
|
cpuSpeed: {
|
||||||
label: 'CPU (in MHz)',
|
label: 'label.cpu.mhz',
|
||||||
validation: {
|
validation: {
|
||||||
required: true,
|
required: true,
|
||||||
number: true
|
number: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
memory: {
|
memory: {
|
||||||
label: 'Memory (in MB)',
|
label: 'label.memory.mb',
|
||||||
validation: {
|
validation: {
|
||||||
required: true,
|
required: true,
|
||||||
number: true
|
number: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
networkRate: {
|
networkRate: {
|
||||||
label: 'Network rate',
|
label: 'network.rate',
|
||||||
validation: {
|
validation: {
|
||||||
required: false, //optional
|
required: false, //optional
|
||||||
number: true
|
number: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
offerHA: {
|
offerHA: {
|
||||||
label: 'Offer HA',
|
label: 'label.offer.ha',
|
||||||
isBoolean: true,
|
isBoolean: true,
|
||||||
isChecked: false
|
isChecked: false
|
||||||
},
|
},
|
||||||
storageTags: {
|
storageTags: {
|
||||||
label: 'Storage tags'
|
label: 'label.storage.tags'
|
||||||
},
|
},
|
||||||
hostTags: {
|
hostTags: {
|
||||||
label: 'Host tags'
|
label: 'label.host.tags'
|
||||||
},
|
},
|
||||||
cpuCap: {
|
cpuCap: {
|
||||||
label: 'CPU cap',
|
label: 'label.CPU.cap',
|
||||||
isBoolean: true,
|
isBoolean: true,
|
||||||
isChecked: false
|
isChecked: false
|
||||||
},
|
},
|
||||||
isPublic: {
|
isPublic: {
|
||||||
label: 'Public',
|
label: 'label.public',
|
||||||
isBoolean: true,
|
isBoolean: true,
|
||||||
isReverse: true,
|
isReverse: true,
|
||||||
isChecked: true
|
isChecked: true
|
||||||
},
|
},
|
||||||
domainId: {
|
domainId: {
|
||||||
label: 'Domain',
|
label: 'label.domain',
|
||||||
dependsOn: 'isPublic',
|
dependsOn: 'isPublic',
|
||||||
select: function(args) {
|
select: function(args) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
@ -210,7 +210,7 @@
|
|||||||
name: 'Service offering details',
|
name: 'Service offering details',
|
||||||
actions: {
|
actions: {
|
||||||
edit: {
|
edit: {
|
||||||
label: 'Edit',
|
label: 'label.edit',
|
||||||
action: function(args) {
|
action: function(args) {
|
||||||
var array1 = [];
|
var array1 = [];
|
||||||
array1.push("&name=" + todb(args.data.name));
|
array1.push("&name=" + todb(args.data.name));
|
||||||
@ -230,13 +230,13 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
'delete': {
|
'delete': {
|
||||||
label: 'Delete service offering',
|
label: 'label.action.delete.service.offering',
|
||||||
messages: {
|
messages: {
|
||||||
confirm: function(args) {
|
confirm: function(args) {
|
||||||
return 'Are you sure you want to delete this service offering?';
|
return 'message.action.delete.service.offering';
|
||||||
},
|
},
|
||||||
notification: function(args) {
|
notification: function(args) {
|
||||||
return 'Deleting service offering';
|
return 'label.action.delete.service.offering';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
action: function(args) {
|
action: function(args) {
|
||||||
@ -262,48 +262,48 @@
|
|||||||
|
|
||||||
tabs: {
|
tabs: {
|
||||||
details: {
|
details: {
|
||||||
title: 'Details',
|
title: 'label.details',
|
||||||
|
|
||||||
fields: [
|
fields: [
|
||||||
{
|
{
|
||||||
name: {
|
name: {
|
||||||
label: 'Name',
|
label: 'label.name',
|
||||||
isEditable: true
|
isEditable: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: { label: 'ID' },
|
id: { label: 'label.id' },
|
||||||
displaytext: {
|
displaytext: {
|
||||||
label: 'Description',
|
label: 'label.description',
|
||||||
isEditable: true
|
isEditable: true
|
||||||
},
|
},
|
||||||
storagetype: { label: 'Storage Type' },
|
storagetype: { label: 'label.storage.type' },
|
||||||
cpunumber: { label: 'CPU number' },
|
cpunumber: { label: 'label.num.cpu.cores' },
|
||||||
cpuspeed: {
|
cpuspeed: {
|
||||||
label: 'CPU speed',
|
label: 'label.cpu.mhz',
|
||||||
converter: function(args) {
|
converter: function(args) {
|
||||||
return cloudStack.converters.convertHz(args);
|
return cloudStack.converters.convertHz(args);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
memory: {
|
memory: {
|
||||||
label: 'Memory',
|
label: 'label.memory',
|
||||||
converter: function(args) {
|
converter: function(args) {
|
||||||
return cloudStack.converters.convertBytes(args*1024*1024);
|
return cloudStack.converters.convertBytes(args*1024*1024);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
networkrate: { label: 'Network rate' },
|
networkrate: { label: 'label.network.rate' },
|
||||||
offerha: {
|
offerha: {
|
||||||
label: 'Offer HA',
|
label: 'label.offer.ha',
|
||||||
converter: cloudStack.converters.toBooleanText
|
converter: cloudStack.converters.toBooleanText
|
||||||
},
|
},
|
||||||
limitcpuuse: {
|
limitcpuuse: {
|
||||||
label: 'CPU cap',
|
label: 'label.CPU.cap',
|
||||||
converter: cloudStack.converters.toBooleanText
|
converter: cloudStack.converters.toBooleanText
|
||||||
},
|
},
|
||||||
tags: { label: 'Storage tags' },
|
tags: { label: 'label.storage.tags' },
|
||||||
hosttags: { label: 'Host tags' },
|
hosttags: { label: 'label.host.tags' },
|
||||||
domain: { label: 'Domain' },
|
domain: { label: 'label.domain' },
|
||||||
created: { label: 'Created', converter: cloudStack.converters.toLocalDate }
|
created: { label: 'label.created', converter: cloudStack.converters.toLocalDate }
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user