Fix incorrect device view issue in android.

revert-dabc3590
lasanthaDLPDS 5 years ago
parent 326b09b000
commit 1960c01462

@ -23,6 +23,7 @@ import org.wso2.carbon.device.mgt.common.configuration.mgt.AmbiguousConfiguratio
import org.wso2.carbon.device.mgt.common.configuration.mgt.ConfigurationManagementException; import org.wso2.carbon.device.mgt.common.configuration.mgt.ConfigurationManagementException;
import org.wso2.carbon.device.mgt.common.configuration.mgt.DeviceConfiguration; import org.wso2.carbon.device.mgt.common.configuration.mgt.DeviceConfiguration;
import org.wso2.carbon.device.mgt.common.configuration.mgt.PlatformConfiguration; import org.wso2.carbon.device.mgt.common.configuration.mgt.PlatformConfiguration;
import org.wso2.carbon.device.mgt.common.device.details.DeviceData;
import org.wso2.carbon.device.mgt.common.license.mgt.License; import org.wso2.carbon.device.mgt.common.license.mgt.License;
import org.wso2.carbon.device.mgt.common.operation.mgt.Activity; import org.wso2.carbon.device.mgt.common.operation.mgt.Activity;
import org.wso2.carbon.device.mgt.common.operation.mgt.Operation; import org.wso2.carbon.device.mgt.common.operation.mgt.Operation;
@ -144,6 +145,10 @@ public class DeviceManagementProviderServiceMock implements DeviceManagementProv
return null; return null;
} }
@Override public Device getDevice(DeviceData deviceData, boolean b) throws DeviceManagementException {
return null;
}
@Override @Override
public List<Device> getDevicesBasedOnProperties(Map map) throws DeviceManagementException { public List<Device> getDevicesBasedOnProperties(Map map) throws DeviceManagementException {
return null; return null;

@ -21,6 +21,7 @@ function onRequest(context) {
var deviceType = context["uriParams"]["deviceType"]; var deviceType = context["uriParams"]["deviceType"];
var deviceId = request.getParameter("id"); var deviceId = request.getParameter("id");
var owner = request.getParameter("owner"); var owner = request.getParameter("owner");
var ownership = request.getParameter("ownership");
var deviceViewData = {}; var deviceViewData = {};
var devicemgtProps = require("/app/modules/conf-reader/main.js")["conf"]; var devicemgtProps = require("/app/modules/conf-reader/main.js")["conf"];
var carbonServer = require("carbon").server; var carbonServer = require("carbon").server;
@ -28,7 +29,7 @@ function onRequest(context) {
if (deviceType && deviceId) { if (deviceType && deviceId) {
var deviceModule = require("/app/modules/business-controllers/device.js")["deviceModule"]; var deviceModule = require("/app/modules/business-controllers/device.js")["deviceModule"];
var response = deviceModule.viewDevice(deviceType, deviceId, owner); var response = deviceModule.viewDevice(deviceType, deviceId, owner, ownership);
if (response["status"] === "success") { if (response["status"] === "success") {
deviceViewData["deviceFound"] = true; deviceViewData["deviceFound"] = true;
deviceViewData["isAuthorized"] = true; deviceViewData["isAuthorized"] = true;

@ -211,7 +211,7 @@ var InitiateViewOption = null;
order: [], order: [],
ajax: { ajax: {
url: "/devicemgt/api/operation/paginate", url: "/devicemgt/api/operation/paginate",
data: {deviceId: deviceIdentifier, deviceType: deviceType, owner: owner}, data: {deviceId: deviceIdentifier, deviceType: deviceType, owner: owner, ownership: ownership},
dataSrc: function (json) { dataSrc: function (json) {
$("#operations-spinner").addClass("hidden"); $("#operations-spinner").addClass("hidden");
$("#operations-log-container").empty(); $("#operations-log-container").empty();

@ -23,6 +23,7 @@ import org.wso2.carbon.device.mgt.common.configuration.mgt.AmbiguousConfiguratio
import org.wso2.carbon.device.mgt.common.configuration.mgt.ConfigurationManagementException; import org.wso2.carbon.device.mgt.common.configuration.mgt.ConfigurationManagementException;
import org.wso2.carbon.device.mgt.common.configuration.mgt.DeviceConfiguration; import org.wso2.carbon.device.mgt.common.configuration.mgt.DeviceConfiguration;
import org.wso2.carbon.device.mgt.common.configuration.mgt.PlatformConfiguration; import org.wso2.carbon.device.mgt.common.configuration.mgt.PlatformConfiguration;
import org.wso2.carbon.device.mgt.common.device.details.DeviceData;
import org.wso2.carbon.device.mgt.common.license.mgt.License; import org.wso2.carbon.device.mgt.common.license.mgt.License;
import org.wso2.carbon.device.mgt.common.operation.mgt.Activity; import org.wso2.carbon.device.mgt.common.operation.mgt.Activity;
import org.wso2.carbon.device.mgt.common.operation.mgt.Operation; import org.wso2.carbon.device.mgt.common.operation.mgt.Operation;
@ -144,6 +145,10 @@ public class DeviceManagementProviderServiceMock implements DeviceManagementProv
return null; return null;
} }
@Override public Device getDevice(DeviceData deviceData, boolean b) throws DeviceManagementException {
return null;
}
@Override @Override
public List<Device> getDevicesBasedOnProperties(Map map) throws DeviceManagementException { public List<Device> getDevicesBasedOnProperties(Map map) throws DeviceManagementException {
return null; return null;

Loading…
Cancel
Save