|
30 | 30 | actions: { |
31 | 31 | edit: { |
32 | 32 | label: 'label.change.value', |
33 | | - action: function(args) { |
34 | | - var name = args.data.jsonObj.name; |
35 | | - var value = args.data.value; |
36 | | - |
| 33 | + action: function(args) { |
| 34 | + var data = { |
| 35 | + name: args.data.jsonObj.name, |
| 36 | + value: args.data.value |
| 37 | + }; |
37 | 38 | $.ajax({ |
38 | | - url: createURL( |
39 | | - 'updateConfiguration&name=' + name + '&value=' + value |
40 | | - ), |
41 | | - dataType: 'json', |
42 | | - async: true, |
| 39 | + url: createURL('updateConfiguration'), |
| 40 | + data: data, |
43 | 41 | success: function(json) { |
44 | 42 | var item = json.updateconfigurationresponse.configuration; |
45 | 43 | if(item.category == "Usage") |
|
95 | 93 | maxguestslimit: { label: 'label.max.guest.limit' } |
96 | 94 | }, |
97 | 95 | dataProvider: function(args) { |
98 | | - var array1 = []; |
99 | | - if(args.filterBy != null) { |
100 | | - if(args.filterBy.search != null && args.filterBy.search.by != null && args.filterBy.search.value != null) { |
101 | | - switch(args.filterBy.search.by) { |
102 | | - case "name": |
103 | | - if(args.filterBy.search.value.length > 0) |
104 | | - array1.push("&keyword=" + args.filterBy.search.value); |
105 | | - break; |
106 | | - } |
107 | | - } |
108 | | - } |
109 | | - |
| 96 | + var data = {}; |
| 97 | + listViewDataProvider(args, data); |
| 98 | + |
110 | 99 | $.ajax({ |
111 | | - url: createURL("listHypervisorCapabilities&page=" + args.page + "&pagesize=" + pageSize + array1.join("")), |
112 | | - dataType: "json", |
113 | | - async: true, |
| 100 | + url: createURL('listHypervisorCapabilities'), |
| 101 | + data: data, |
114 | 102 | success: function(json) { |
115 | 103 | var items = json.listhypervisorcapabilitiesresponse.hypervisorCapabilities; |
116 | 104 | args.response.success({data:items}); |
|
127 | 115 | edit: { |
128 | 116 | label: 'label.edit', |
129 | 117 | action: function(args) { |
130 | | - var array1 = []; |
131 | | - array1.push("&maxguestslimit=" + todb(args.data.maxguestslimit)); |
| 118 | + var data = { |
| 119 | + id: args.context.hypervisorCapabilities[0].id, |
| 120 | + maxguestslimit: args.data.maxguestslimit |
| 121 | + }; |
| 122 | + |
132 | 123 | $.ajax({ |
133 | | - url: createURL("updateHypervisorCapabilities&id=" + args.context.hypervisorCapabilities[0].id + array1.join("")), |
134 | | - dataType: "json", |
| 124 | + url: createURL('updateHypervisorCapabilities'), |
| 125 | + data: data, |
135 | 126 | success: function(json) { |
136 | 127 | var item = json.updatehypervisorcapabilitiesresponse['null']; |
137 | 128 | args.response.success({data: item}); |
|
0 commit comments