Skip to content

Commit

Permalink
UI-948: Disabled pagination on API requests that the front-end make t…
Browse files Browse the repository at this point in the history
…o render the SmartPBX, it was confusing the user who would think its numbers disappear and things like this...

Conflicts:
	submodules/users/users.js
  • Loading branch information
JRMaitre authored and mroux committed Feb 11, 2015
1 parent 865cef0 commit 473a61f
Show file tree
Hide file tree
Showing 5 changed files with 131 additions and 30 deletions.
20 changes: 16 additions & 4 deletions submodules/devices/devices.js
Original file line number Diff line number Diff line change
Expand Up @@ -803,7 +803,10 @@ define(function(require){
self.callApi({
resource: 'numbers.list',
data: {
accountId: self.accountId
accountId: self.accountId,
filters: {
paginate: 'false'
}
},
success: function(data) {
var e911Numbers = [];
Expand Down Expand Up @@ -934,7 +937,10 @@ define(function(require){
self.callApi({
resource: 'user.list',
data: {
accountId: self.accountId
accountId: self.accountId,
filters: {
paginate: 'false'
}
},
success: function(dataUsers) {
callback && callback(null, dataUsers.data);
Expand All @@ -945,7 +951,10 @@ define(function(require){
self.callApi({
resource: 'device.getStatus',
data: {
accountId: self.accountId
accountId: self.accountId,
filters: {
paginate: 'false'
}
},
success: function(dataStatus) {
callback && callback(null, dataStatus.data);
Expand All @@ -956,7 +965,10 @@ define(function(require){
self.callApi({
resource: 'device.list',
data: {
accountId: self.accountId
accountId: self.accountId,
filters: {
paginate: 'false'
}
},
success: function(dataDevices) {
callback(null, dataDevices.data);
Expand Down
30 changes: 24 additions & 6 deletions submodules/groups/groups.js
Original file line number Diff line number Diff line change
Expand Up @@ -1148,7 +1148,10 @@ define(function(require){
self.callApi({
resource: 'user.list',
data: {
accountId: self.accountId
accountId: self.accountId,
filters: {
paginate: 'false'
}
},
success: function(data) {
callback && callback(data.data);
Expand Down Expand Up @@ -1314,7 +1317,10 @@ define(function(require){
self.callApi({
resource: 'numbers.list',
data: {
accountId: self.accountId
accountId: self.accountId,
filters: {
paginate: 'false'
}
},
success: function(numbers) {
callbackParallel && callbackParallel(null, numbers.data);
Expand Down Expand Up @@ -1462,7 +1468,10 @@ define(function(require){
self.callApi({
resource: 'callflow.list',
data: {
accountId: self.accountId
accountId: self.accountId,
filters: {
paginate: 'false'
}
},
success: function(callflows) {
callback && callback(callflows.data);
Expand All @@ -1477,7 +1486,10 @@ define(function(require){
resource: 'media.list',
data: {
accountId: self.accountId,
filters: { 'key_missing':'type' }
filters: {
'paginate': 'false',
'key_missing':'type'
}
},
success: function(medias) {
callback && callback(medias.data);
Expand All @@ -1491,7 +1503,10 @@ define(function(require){
self.callApi({
resource: 'voicemail.list',
data: {
accountId: self.accountId
accountId: self.accountId,
filters: {
paginate: 'false'
}
},
success: function(medias) {
callback && callback(medias.data);
Expand Down Expand Up @@ -1833,7 +1848,10 @@ define(function(require){
self.callApi({
resource: 'group.list',
data: {
accountId: self.accountId
accountId: self.accountId,
filters: {
paginate: 'false'
}
},
success: function(dataGroups) {
callback(null, dataGroups.data);
Expand Down
26 changes: 21 additions & 5 deletions submodules/myOffice/myOffice.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,10 @@ define(function(require){
self.callApi({
resource: 'user.list',
data: {
accountId: self.accountId
accountId: self.accountId,
filters: {
paginate: 'false'
}
},
success: function(dataUsers) {
parallelCallback && parallelCallback(null, dataUsers.data);
Expand All @@ -143,7 +146,10 @@ define(function(require){
self.callApi({
resource: 'device.list',
data: {
accountId: self.accountId
accountId: self.accountId,
filters: {
paginate: 'false'
}
},
success: function(data) {
parallelCallback && parallelCallback(null, data.data);
Expand All @@ -154,7 +160,10 @@ define(function(require){
self.callApi({
resource: 'device.getStatus',
data: {
accountId: self.accountId
accountId: self.accountId,
filters: {
paginate: 'false'
}
},
success: function(data) {
parallelCallback && parallelCallback(null, data.data);
Expand All @@ -165,7 +174,10 @@ define(function(require){
self.callApi({
resource: 'numbers.list',
data: {
accountId: self.accountId
accountId: self.accountId,
filters: {
paginate: 'false'
}
},
success: function(data) {
parallelCallback && parallelCallback(null, data.data.numbers);
Expand All @@ -181,7 +193,10 @@ define(function(require){
self.callApi({
resource: 'channel.list',
data: {
accountId: self.accountId
accountId: self.accountId,
filters: {
paginate: 'false'
}
},
success: function(data) {
parallelCallback && parallelCallback(null, data.data);
Expand All @@ -194,6 +209,7 @@ define(function(require){
data: {
filters: {
has_type: 'type',
paginate: 'false'
},
accountId: self.accountId
},
Expand Down
26 changes: 22 additions & 4 deletions submodules/strategy/strategy.js
Original file line number Diff line number Diff line change
Expand Up @@ -2050,7 +2050,10 @@ define(function(require){
self.callApi({
resource: 'user.list',
data: {
accountId: self.accountId
accountId: self.accountId,
filters: {
paginate: 'false'
}
},
success: function(data, status) {
_callback(null, data.data);
Expand All @@ -2076,7 +2079,10 @@ define(function(require){
self.callApi({
resource: 'group.list',
data: {
accountId: self.accountId
accountId: self.accountId,
filters: {
paginate: 'false'
}
},
success: function(data, status) {
_callback(null, data.data);
Expand All @@ -2102,7 +2108,10 @@ define(function(require){
self.callApi({
resource: 'device.list',
data: {
accountId: self.accountId
accountId: self.accountId,
filters: {
paginate: 'false'
}
},
success: function(data, status) {
_callback(null, data.data);
Expand Down Expand Up @@ -2155,6 +2164,9 @@ define(function(require){
resource: 'voicemail.list',
data: {
accountId: self.accountId,
filters: {
paginate: 'false'
}
},
success: function(data, status) {
data.data.sort(function(a,b) { return (a.name.toLowerCase() > b.name.toLowerCase()); });
Expand All @@ -2169,6 +2181,9 @@ define(function(require){
resource: 'numbers.list',
data: {
accountId: self.accountId,
filters: {
paginate: 'false'
}
},
success: function(data, status) {
callback(data.data.numbers);
Expand Down Expand Up @@ -2238,7 +2253,10 @@ define(function(require){
self.callApi({
resource: 'callflow.list',
data: {
accountId: self.accountId
accountId: self.accountId,
filters: {
paginate: 'false'
}
},
success: function(callflowData) {
callback && callback(callflowData.data);
Expand Down
59 changes: 48 additions & 11 deletions submodules/users/users.js
Original file line number Diff line number Diff line change
Expand Up @@ -2510,7 +2510,10 @@ define(function(require){
self.callApi({
resource: 'device.list',
data: {
accountId: self.accountId
accountId: self.accountId,
filters: {
paginate: 'false'
}
},
success: function(data) {
callback && callback(data.data);
Expand Down Expand Up @@ -3196,7 +3199,10 @@ define(function(require){
self.callApi({
resource: 'directory.list',
data: {
accountId: self.accountId
accountId: self.accountId,
filters: {
paginate: 'false'
}
},
success: function(data) {
callback && callback(data.data);
Expand Down Expand Up @@ -3232,7 +3238,10 @@ define(function(require){
self.callApi({
resource: 'callflow.list',
data: {
accountId: self.accountId
accountId: self.accountId,
filters: {
paginate: 'false'
}
},
success: function(data) {
callback(data.data);
Expand All @@ -3248,7 +3257,8 @@ define(function(require){
data: {
accountId: self.accountId,
filters: {
filter_owner_id: userId
filter_owner_id: userId,
paginate: 'false'
}
},
success: function(data) {
Expand All @@ -3263,7 +3273,10 @@ define(function(require){
self.callApi({
resource: 'voicemail.list',
data: {
accountId: self.accountId
accountId: self.accountId,
filters: {
paginate: 'false'
}
},
success: function(data) {
callback(data.data);
Expand All @@ -3279,7 +3292,8 @@ define(function(require){
data: {
accountId: self.accountId,
filters: {
filter_owner_id: userId
filter_owner_id: userId,
paginate: 'false'
}
},
success: function(data) {
Expand Down Expand Up @@ -3410,7 +3424,8 @@ define(function(require){
data: {
accountId: self.accountId,
filters: {
filter_type: 'conference'
filter_type: 'conference',
paginate: 'false'
}
},
success: function(data) {
Expand All @@ -3437,7 +3452,8 @@ define(function(require){
data: {
accountId: self.accountId,
filters: {
filter_owner_id: userId
filter_owner_id: userId,
paginate: 'false'
}
},
success: function(data) {
Expand Down Expand Up @@ -3547,7 +3563,8 @@ define(function(require){
data: {
accountId: self.accountId,
filters: {
filter_owner_id: userId
filter_owner_id: userId,
paginate: 'false'
}
},
success: function(data) {
Expand Down Expand Up @@ -3578,7 +3595,10 @@ define(function(require){
self.callApi({
resource: 'user.list',
data: {
accountId: self.accountId
accountId: self.accountId,
filters: {
paginate: 'false'
}
},
success: function(dataUsers) {
callback(null, dataUsers.data);
Expand All @@ -3594,6 +3614,20 @@ define(function(require){
self.usersGetDevicesData(function(devices) {
callback(null, devices);
});
},
deviceStatus: function(callback) {
self.callApi({
resource: 'device.getStatus',
data: {
accountId: self.accountId,
filters: {
paginate: 'false'
}
},
success: function(data, status) {
callback(null, data.data);
}
});
}
},
function(err, results) {
Expand Down Expand Up @@ -3713,7 +3747,10 @@ define(function(require){
self.callApi({
resource: 'numbers.list',
data: {
accountId: self.accountId
accountId: self.accountId,
filters: {
paginate: 'false'
}
},
success: function(numbers) {
callback && callback(numbers.data);
Expand Down

0 comments on commit 473a61f

Please sign in to comment.