Skip to content

Commit bce9e22

Browse files
committed
Fix selects
1 parent b79aa32 commit bce9e22

1 file changed

Lines changed: 24 additions & 4 deletions

File tree

‎ui/scripts/configuration.js‎

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -901,7 +901,7 @@
901901
dataType: 'json',
902902
async: true,
903903
success: function(data) {
904-
args.response.success();
904+
args.response.success({ data: data.createnetworkofferingresponse.networkoffering });
905905
}
906906
});
907907
},
@@ -946,8 +946,8 @@
946946
select: function(args) {
947947
args.response.success({
948948
data: [
949-
{ id: 'Required', description: 'Required' },
950949
{ id: 'Optional', description: 'Optional' },
950+
{ id: 'Required', description: 'Required' },
951951
{ id: 'Unavailable', description: 'Unavailable' }
952952
]
953953
});
@@ -957,8 +957,28 @@
957957
serviceOfferingId: {
958958
label: 'Service Offering',
959959
select: function(args) {
960-
args.response.success({
961-
data: []
960+
$.ajax({
961+
url: createURL('listServiceOfferings'),
962+
dataType: 'json',
963+
async: true,
964+
success: function(data) {
965+
var serviceOfferings = data.listserviceofferingsresponse.serviceoffering;
966+
967+
args.response.success({
968+
data: $.merge(
969+
[{
970+
id: null,
971+
description: 'None'
972+
}],
973+
$.map(serviceOfferings, function(elem) {
974+
return {
975+
id: elem.id,
976+
description: elem.name
977+
};
978+
})
979+
)
980+
});
981+
}
962982
});
963983
}
964984
},

0 commit comments

Comments
 (0)