Skip to content

Commit bfbf634

Browse files
author
Jessica Wang
committed
CS-16573: cloudstack UI - user page - listView - encode data passed to API call.
1 parent 713418c commit bfbf634

1 file changed

Lines changed: 10 additions & 15 deletions

File tree

‎ui/scripts/accounts.js‎

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -787,24 +787,19 @@
787787
firstname: { label: 'label.first.name' },
788788
lastname: { label: 'label.last.name' }
789789
},
790-
dataProvider: function(args) {
791-
var array1 = [];
792-
if(args.filterBy != null) {
793-
if(args.filterBy.search != null && args.filterBy.search.by != null && args.filterBy.search.value != null) {
794-
switch(args.filterBy.search.by) {
795-
case "name":
796-
if(args.filterBy.search.value.length > 0)
797-
array1.push("&keyword=" + args.filterBy.search.value);
798-
break;
799-
}
800-
}
801-
}
802-
790+
dataProvider: function(args) {
803791
var accountObj = args.context.accounts[0];
792+
804793
if(isAdmin() || isDomainAdmin()) {
794+
var data = {
795+
domainid: accountObj.domainid,
796+
account: accountObj.name
797+
};
798+
listViewDataProvider(args, data);
799+
805800
$.ajax({
806-
url: createURL("listUsers&domainid=" + accountObj.domainid + "&account=" + todb(accountObj.name) + "&page=" + args.page + "&pagesize=" + pageSize + array1.join("")),
807-
dataType: "json",
801+
url: createURL('listUsers'),
802+
data: data,
808803
success: function(json) {
809804
args.response.success({
810805
actionFilter: userActionfilter,

0 commit comments

Comments
 (0)