From 4a2b28cd9faa15e11e8b8903d3751918a4e15a96 Mon Sep 17 00:00:00 2001 From: charithag Date: Tue, 19 Apr 2016 14:57:16 +0530 Subject: [PATCH] Fix UI issues occured after merge with emm ui --- .../device-view.js | 2 +- .../units/iot.unit.device.operation-bar/operation-bar.js | 8 +------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/components/iot-plugins/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.device-view/device-view.js b/components/iot-plugins/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.device-view/device-view.js index 21035b3d8..e4dd5c0da 100644 --- a/components/iot-plugins/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.device-view/device-view.js +++ b/components/iot-plugins/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.device-view/device-view.js @@ -21,7 +21,7 @@ function onRequest(context) { var deviceType = context.uriParams.deviceType; var deviceId = request.getParameter("id"); - if (deviceType != null && deviceType != undefined && deviceId != null && deviceId != undefined) { + if (deviceType && deviceId) { var deviceModule = require("/app/modules/device.js").deviceModule; var device = deviceModule.viewDevice(deviceType, deviceId); diff --git a/components/iot-plugins/iot-base-plugin/org.wso2.carbon.device.mgt.iot.ui/src/main/resources/jaggeryapps/devicemgt/app/units/iot.unit.device.operation-bar/operation-bar.js b/components/iot-plugins/iot-base-plugin/org.wso2.carbon.device.mgt.iot.ui/src/main/resources/jaggeryapps/devicemgt/app/units/iot.unit.device.operation-bar/operation-bar.js index 6a90314ea..a293457d3 100644 --- a/components/iot-plugins/iot-base-plugin/org.wso2.carbon.device.mgt.iot.ui/src/main/resources/jaggeryapps/devicemgt/app/units/iot.unit.device.operation-bar/operation-bar.js +++ b/components/iot-plugins/iot-base-plugin/org.wso2.carbon.device.mgt.iot.ui/src/main/resources/jaggeryapps/devicemgt/app/units/iot.unit.device.operation-bar/operation-bar.js @@ -20,12 +20,6 @@ function onRequest(context) { var log = new Log("operation.js"); var operationModule = require("/app/modules/operation.js").operationModule; var device = context.unit.params.device; - var controlOperations; - try { - controlOperations = operationModule.getControlOperations(device.type); - }catch(e){ - log.error("Control operation loading failed."); - controlOperations = null; - } + var controlOperations = operationModule.getControlOperations(device.type); return {"control_operations": controlOperations, "device": device}; } \ No newline at end of file