diff --git a/modules/samples/connectedlap/component/ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.CONNECTEDLAP.device-view/device-view.js b/modules/samples/connectedlap/component/ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.CONNECTEDLAP.device-view/device-view.js index a6f8a6ad..efaeb4fa 100644 --- a/modules/samples/connectedlap/component/ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.CONNECTEDLAP.device-view/device-view.js +++ b/modules/samples/connectedlap/component/ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.CONNECTEDLAP.device-view/device-view.js @@ -21,14 +21,18 @@ function onRequest(context) { var deviceType = context.uriParams.deviceType; var deviceId = request.getParameter("id"); var autoCompleteParams = [ - {"name" : "deviceId", "value" : deviceId} + {"name": "deviceId", "value": deviceId} ]; if (deviceType != null && deviceType != undefined && deviceId != null && deviceId != undefined) { var deviceModule = require("/app/modules/device.js").deviceModule; var device = deviceModule.viewDevice(deviceType, deviceId); if (device && device.status != "error") { - return {"device": device.content, "backendApiUri" : "/"+deviceType+"/", "autoCompleteParams" : autoCompleteParams}; + return { + "device": device.content, + "backendApiUri": devicemgtProps["httpsURL"] + "/" + deviceType + "/", + "autoCompleteParams": autoCompleteParams + }; } else { response.sendError(404, "Device Id " + deviceId + " of type " + deviceType + " cannot be found!"); exit(); diff --git a/modules/samples/doormanager/component/ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.doormanager.device-view/device-view.js b/modules/samples/doormanager/component/ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.doormanager.device-view/device-view.js index bb16e9d5..efaeb4fa 100644 --- a/modules/samples/doormanager/component/ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.doormanager.device-view/device-view.js +++ b/modules/samples/doormanager/component/ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.doormanager.device-view/device-view.js @@ -21,14 +21,18 @@ function onRequest(context) { var deviceType = context.uriParams.deviceType; var deviceId = request.getParameter("id"); var autoCompleteParams = [ - {"name" : "deviceId", "value" : deviceId} + {"name": "deviceId", "value": deviceId} ]; if (deviceType != null && deviceType != undefined && deviceId != null && deviceId != undefined) { var deviceModule = require("/app/modules/device.js").deviceModule; var device = deviceModule.viewDevice(deviceType, deviceId); if (device && device.status != "error") { - return {"device": device.content, "backendApiUri" : "/"+deviceType+"/", "autoCompleteParams" : autoCompleteParams}; + return { + "device": device.content, + "backendApiUri": devicemgtProps["httpsURL"] + "/" + deviceType + "/", + "autoCompleteParams": autoCompleteParams + }; } else { response.sendError(404, "Device Id " + deviceId + " of type " + deviceType + " cannot be found!"); exit(); diff --git a/modules/samples/droneanalyzer/component/ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.drone.device-view/device-view.js b/modules/samples/droneanalyzer/component/ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.drone.device-view/device-view.js index a6f8a6ad..efaeb4fa 100644 --- a/modules/samples/droneanalyzer/component/ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.drone.device-view/device-view.js +++ b/modules/samples/droneanalyzer/component/ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.drone.device-view/device-view.js @@ -21,14 +21,18 @@ function onRequest(context) { var deviceType = context.uriParams.deviceType; var deviceId = request.getParameter("id"); var autoCompleteParams = [ - {"name" : "deviceId", "value" : deviceId} + {"name": "deviceId", "value": deviceId} ]; if (deviceType != null && deviceType != undefined && deviceId != null && deviceId != undefined) { var deviceModule = require("/app/modules/device.js").deviceModule; var device = deviceModule.viewDevice(deviceType, deviceId); if (device && device.status != "error") { - return {"device": device.content, "backendApiUri" : "/"+deviceType+"/", "autoCompleteParams" : autoCompleteParams}; + return { + "device": device.content, + "backendApiUri": devicemgtProps["httpsURL"] + "/" + deviceType + "/", + "autoCompleteParams": autoCompleteParams + }; } else { response.sendError(404, "Device Id " + deviceId + " of type " + deviceType + " cannot be found!"); exit(); diff --git a/modules/samples/geolocationTracker/component/ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.geolocationTracker.device-view/device-view.js b/modules/samples/geolocationTracker/component/ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.geolocationTracker.device-view/device-view.js index bb16e9d5..efaeb4fa 100644 --- a/modules/samples/geolocationTracker/component/ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.geolocationTracker.device-view/device-view.js +++ b/modules/samples/geolocationTracker/component/ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.geolocationTracker.device-view/device-view.js @@ -21,14 +21,18 @@ function onRequest(context) { var deviceType = context.uriParams.deviceType; var deviceId = request.getParameter("id"); var autoCompleteParams = [ - {"name" : "deviceId", "value" : deviceId} + {"name": "deviceId", "value": deviceId} ]; if (deviceType != null && deviceType != undefined && deviceId != null && deviceId != undefined) { var deviceModule = require("/app/modules/device.js").deviceModule; var device = deviceModule.viewDevice(deviceType, deviceId); if (device && device.status != "error") { - return {"device": device.content, "backendApiUri" : "/"+deviceType+"/", "autoCompleteParams" : autoCompleteParams}; + return { + "device": device.content, + "backendApiUri": devicemgtProps["httpsURL"] + "/" + deviceType + "/", + "autoCompleteParams": autoCompleteParams + }; } else { response.sendError(404, "Device Id " + deviceId + " of type " + deviceType + " cannot be found!"); exit();