kamidu 8 years ago
commit 1f247e7faf

@ -285,6 +285,9 @@ public class AndroidAPIUtils {
OperationCodes.DEVICE_INFO.equals(operation.getCode())) { OperationCodes.DEVICE_INFO.equals(operation.getCode())) {
try { try {
if (log.isDebugEnabled()){
log.debug("Operation response: " + operation.getOperationResponse());
}
Device device = new Gson().fromJson(operation.getOperationResponse(), Device.class); Device device = new Gson().fromJson(operation.getOperationResponse(), Device.class);
org.wso2.carbon.device.mgt.common.device.details.DeviceInfo deviceInfo = convertDeviceToInfo(device); org.wso2.carbon.device.mgt.common.device.details.DeviceInfo deviceInfo = convertDeviceToInfo(device);
updateDeviceInfo(deviceIdentifier, deviceInfo); updateDeviceInfo(deviceIdentifier, deviceInfo);
@ -403,8 +406,6 @@ public class AndroidAPIUtils {
} }
} else { } else {
if (prop.getName().equalsIgnoreCase("CPU_INFO")) { if (prop.getName().equalsIgnoreCase("CPU_INFO")) {
deviceInfo.setTotalRAMMemory(Double.parseDouble(getProperty(prop.getValue(), "User")));
deviceInfo.getDeviceDetailsMap().put("cpuUser", deviceInfo.getDeviceDetailsMap().put("cpuUser",
getProperty(prop.getValue(), "User")); getProperty(prop.getValue(), "User"));
deviceInfo.getDeviceDetailsMap().put("cpuSystem", deviceInfo.getDeviceDetailsMap().put("cpuSystem",

@ -39,6 +39,13 @@
<method>GET</method> <method>GET</method>
</Permission> </Permission>
<Permission>
<name>Modify Tenant configuration</name>
<path>/device-mgt/admin/platform-configs/add</path>
<url>/configuration</url>
<method>PUT</method>
</Permission>
<Permission> <Permission>
<name>Add Tenant configuration</name> <name>Add Tenant configuration</name>
<path>/device-mgt/admin/platform-configs/add</path> <path>/device-mgt/admin/platform-configs/add</path>

@ -19,10 +19,12 @@
function onRequest(context) { function onRequest(context) {
var userModule = require("/app/modules/business-controllers/user.js")["userModule"]; var userModule = require("/app/modules/business-controllers/user.js")["userModule"];
var generalConfig = context.app.conf["generalConfig"]; var generalConfig = context.app.conf["generalConfig"];
var mdmProps = require('/app/conf/reader/main.js')["conf"];
context["permissions"] = userModule.getUIPermissions(); var viewModel = {};
new Log().info("## Permissions : "+ stringify(userModule.getUIPermissions())); viewModel.permissions = userModule.getUIPermissions();
context["enrollmentURL"] = generalConfig["host"] + generalConfig["enrollmentDir"]; new Log().debug("## Permissions : " + stringify(userModule.getUIPermissions()));
//TODO: Move enrollment URL into app-conf.json
return context; viewModel.enrollmentURL = mdmProps.enrollmentUrl;
return viewModel;
} }
Loading…
Cancel
Save