Updating data-tables API - UI

revert-70aa11f8
dilanua 8 years ago
parent 78b5cf9fb3
commit f61b929bfd

@ -35,18 +35,20 @@ function appendQueryParam (url, queryParam , value) {
if (uriMatcher.match("/{context}/api/data-tables/invoker")) {
var url = request.getParameter("url");
var targetURL = devicemgtProps["httpsURL"] + request.getParameter("url");
//noinspection JSUnresolvedFunction getAllParameters
var allParams = request.getAllParameters();
for (var key in allParams) {
if (allParams.hasOwnProperty(key)) {
if(key == "limit" || key == "offset"){
targetURL = appendQueryParam(targetURL, key, allParams[key]);
for (var allParamsKey in allParams) {
if (allParams.hasOwnProperty(allParamsKey)) {
if (allParamsKey == "limit" || allParamsKey == "offset") {
targetURL = appendQueryParam(targetURL, allParamsKey, allParams[allParamsKey]);
} else if (allParamsKey == "filter") {
if (allParams[allParamsKey]) {
var searchPayload = JSON.parse(allParams[allParamsKey]);
for (var searchPayloadKey in searchPayload) {
if (searchPayload.hasOwnProperty(searchPayloadKey)) {
targetURL = appendQueryParam(targetURL, searchPayloadKey, searchPayload[searchPayloadKey]);
}
if(key == "filter"){
if(allParams[key]){
var searchPayload = JSON.parse(allParams[key]);
for (var key in searchPayload) {
targetURL = appendQueryParam(targetURL, key, searchPayload[key]);
}
}
}

Loading…
Cancel
Save