mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-03 04:12:31 +01:00
cloudStack 3.0 new UI - service offering page - add details tab.
This commit is contained in:
parent
940ebff7b4
commit
f1248a4d02
@ -13,20 +13,7 @@
|
||||
label: 'Service Offerings',
|
||||
fields: {
|
||||
name: { label: 'Name', editable: true },
|
||||
storagetype: { label: 'Storage Type' },
|
||||
cpunumber: { label: 'CPU number' },
|
||||
cpuspeed: {
|
||||
label: 'CPU speed',
|
||||
converter: function(args) {
|
||||
return cloudStack.converters.convertHz(args);
|
||||
}
|
||||
},
|
||||
memory: {
|
||||
label: 'Memory',
|
||||
converter: function(args) {
|
||||
return cloudStack.converters.convertBytes(args*1024*1024);
|
||||
}
|
||||
}
|
||||
displaytext: { label: 'Description' }
|
||||
},
|
||||
|
||||
actions: {
|
||||
@ -195,7 +182,52 @@
|
||||
args.response.success({data:items});
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
detailView: {
|
||||
name: 'Service offering details',
|
||||
actions: {
|
||||
|
||||
},
|
||||
tabs: {
|
||||
details: {
|
||||
title: 'Details',
|
||||
|
||||
fields: [
|
||||
{
|
||||
name: { label: 'Name', editable: true }
|
||||
},
|
||||
{
|
||||
displaytext: { label: 'Description' },
|
||||
|
||||
storagetype: { label: 'Storage Type' },
|
||||
cpunumber: { label: 'CPU number' },
|
||||
cpuspeed: {
|
||||
label: 'CPU speed',
|
||||
converter: function(args) {
|
||||
return cloudStack.converters.convertHz(args);
|
||||
}
|
||||
},
|
||||
memory: {
|
||||
label: 'Memory',
|
||||
converter: function(args) {
|
||||
return cloudStack.converters.convertBytes(args*1024*1024);
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
dataProvider: function(args) {
|
||||
args.response.success(
|
||||
{
|
||||
actionFilter: serviceOfferingActionfilter,
|
||||
data:args.context.serviceOfferings[0]
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@ -625,6 +657,14 @@
|
||||
}
|
||||
};
|
||||
|
||||
var serviceOfferingActionfilter = function(args) {
|
||||
var jsonObj = args.context.item;
|
||||
var allowedActions = [];
|
||||
allowedActions.push("edit");
|
||||
allowedActions.push("delete");
|
||||
return allowedActions;
|
||||
}
|
||||
|
||||
var networkOfferingsActionfilter = function(args) {
|
||||
var jsonObj = args.context.item;
|
||||
var allowedActions = [];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user