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