mirror of https://github.com/apache/cloudstack.git
Fix selects
This commit is contained in:
parent
b79aa32e59
commit
bce9e22c97
|
|
@ -901,7 +901,7 @@
|
|||
dataType: 'json',
|
||||
async: true,
|
||||
success: function(data) {
|
||||
args.response.success();
|
||||
args.response.success({ data: data.createnetworkofferingresponse.networkoffering });
|
||||
}
|
||||
});
|
||||
},
|
||||
|
|
@ -946,8 +946,8 @@
|
|||
select: function(args) {
|
||||
args.response.success({
|
||||
data: [
|
||||
{ id: 'Required', description: 'Required' },
|
||||
{ id: 'Optional', description: 'Optional' },
|
||||
{ id: 'Required', description: 'Required' },
|
||||
{ id: 'Unavailable', description: 'Unavailable' }
|
||||
]
|
||||
});
|
||||
|
|
@ -957,8 +957,28 @@
|
|||
serviceOfferingId: {
|
||||
label: 'Service Offering',
|
||||
select: function(args) {
|
||||
args.response.success({
|
||||
data: []
|
||||
$.ajax({
|
||||
url: createURL('listServiceOfferings'),
|
||||
dataType: 'json',
|
||||
async: true,
|
||||
success: function(data) {
|
||||
var serviceOfferings = data.listserviceofferingsresponse.serviceoffering;
|
||||
|
||||
args.response.success({
|
||||
data: $.merge(
|
||||
[{
|
||||
id: null,
|
||||
description: 'None'
|
||||
}],
|
||||
$.map(serviceOfferings, function(elem) {
|
||||
return {
|
||||
id: elem.id,
|
||||
description: elem.name
|
||||
};
|
||||
})
|
||||
)
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue