diff --git a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/mdm.page.devices/public/js/device-listing.js b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/mdm.page.devices/public/js/device-listing.js index f48713e26..d8c1aa2ed 100644 --- a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/mdm.page.devices/public/js/device-listing.js +++ b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/mdm.page.devices/public/js/device-listing.js @@ -95,8 +95,6 @@ function loadDevices() { "data": [] }; - return JSON.stringify(json); - } else if (data["count"] > 0) { $(noDeviceView).remove(); $("#enroll-btn").removeClass('hidden'); @@ -127,8 +125,9 @@ function loadDevices() { "data": objects }; - return JSON.stringify(json); } + + return JSON.stringify(json); }; // possible params - nRow, aData, dataIndex @@ -146,7 +145,7 @@ function loadDevices() { var deviceType = row.deviceType; var deviceIdentifier = row.deviceIdentifier; var url = "#"; - if (status != 'REMOVED') { + if (row.status != 'REMOVED') { url = "device/" + deviceType + "?id=" + deviceIdentifier; } return '
' +