Merge branch 'master' into 'master'

Fix incorrect device view issue in android.

See merge request entgra/carbon-device-mgt-plugins!87
merge-requests/90/head^2
Saad Sahibjan 5 years ago
commit 43d855ec09

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

@ -21,6 +21,7 @@ function onRequest(context) {
var deviceType = context["uriParams"]["deviceType"];
var deviceId = request.getParameter("id");
var owner = request.getParameter("owner");
var ownership = request.getParameter("ownership");
var deviceViewData = {};
var devicemgtProps = require("/app/modules/conf-reader/main.js")["conf"];
var carbonServer = require("carbon").server;
@ -28,7 +29,7 @@ function onRequest(context) {
if (deviceType && deviceId) {
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") {
deviceViewData["deviceFound"] = true;
deviceViewData["isAuthorized"] = true;

@ -211,7 +211,7 @@ var InitiateViewOption = null;
order: [],
ajax: {
url: "/devicemgt/api/operation/paginate",
data: {deviceId: deviceIdentifier, deviceType: deviceType, owner: owner},
data: {deviceId: deviceIdentifier, deviceType: deviceType, owner: owner, ownership: ownership},
dataSrc: function (json) {
$("#operations-spinner").addClass("hidden");
$("#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.DeviceConfiguration;
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.operation.mgt.Activity;
import org.wso2.carbon.device.mgt.common.operation.mgt.Operation;
@ -144,6 +145,10 @@ public class DeviceManagementProviderServiceMock implements DeviceManagementProv
return null;
}
@Override public Device getDevice(DeviceData deviceData, boolean b) throws DeviceManagementException {
return null;
}
@Override
public List<Device> getDevicesBasedOnProperties(Map map) throws DeviceManagementException {
return null;

Loading…
Cancel
Save