diff --git a/components/device-mgt-iot-androidsense/org.wso2.carbon.device.mgt.iot.androidsense.controller.api/src/main/java/org/wso2/carbon/device/mgt/iot/androidsense/controller/service/impl/AndroidSenseService.java b/components/device-mgt-iot-androidsense/org.wso2.carbon.device.mgt.iot.androidsense.controller.api/src/main/java/org/wso2/carbon/device/mgt/iot/androidsense/controller/service/impl/AndroidSenseService.java index 0bb7c4dc63..7987cb2b44 100644 --- a/components/device-mgt-iot-androidsense/org.wso2.carbon.device.mgt.iot.androidsense.controller.api/src/main/java/org/wso2/carbon/device/mgt/iot/androidsense/controller/service/impl/AndroidSenseService.java +++ b/components/device-mgt-iot-androidsense/org.wso2.carbon.device.mgt.iot.androidsense.controller.api/src/main/java/org/wso2/carbon/device/mgt/iot/androidsense/controller/service/impl/AndroidSenseService.java @@ -211,7 +211,8 @@ public class AndroidSenseService { @GET @Consumes("application/json") @Produces("application/json") - @Feature(code = "readbattery", name = "Battery", description = "Read Battery data from the device", type = "monitor") + @Feature(code = "readbattery", name = "Battery", description = "Read Battery data from the device", + type = "monitor") public SensorRecord readBattery( @HeaderParam("owner") String owner, @HeaderParam("deviceId") String deviceId, @Context HttpServletResponse response) { @@ -251,7 +252,8 @@ public class AndroidSenseService { @GET @Consumes("application/json") @Produces("application/json") - @Feature(code = "readmagnetic", name = "Magnetic", description = "Read Magnetic data from the device", type = "monitor") + @Feature(code = "readmagnetic", name = "Magnetic", description = "Read Magnetic data from the device", + type = "monitor") public SensorRecord readMagnetic( @HeaderParam("owner") String owner, @HeaderParam("deviceId") String deviceId, @Context HttpServletResponse response) { @@ -271,7 +273,8 @@ public class AndroidSenseService { @GET @Consumes("application/json") @Produces("application/json") - @Feature(code = "readaccelerometer", name = "Accelerometer", description = "Read Accelerometer data from the device", type = "monitor") + @Feature(code = "readaccelerometer", name = "Accelerometer", description = "Read Accelerometer data from the " + + "device", type = "monitor") public SensorRecord readAccelerometer( @HeaderParam("owner") String owner, @HeaderParam("deviceId") String deviceId, @Context HttpServletResponse response) { @@ -291,7 +294,8 @@ public class AndroidSenseService { @GET @Consumes("application/json") @Produces("application/json") - @Feature(code = "readrotation", name = "Rotation", description = "Read Rotational Vector data from the device", type = "monitor") + @Feature(code = "readrotation", name = "Rotation", description = "Read Rotational Vector data from the device", + type = "monitor") public SensorRecord readRotation( @HeaderParam("owner") String owner, @HeaderParam("deviceId") String deviceId, @Context HttpServletResponse response) { @@ -311,7 +315,8 @@ public class AndroidSenseService { @GET @Consumes("application/json") @Produces("application/json") - @Feature(code = "readproximity", name = "Proximity", description = "Read Proximity data from the device", type = "monitor") + @Feature(code = "readproximity", name = "Proximity", description = "Read Proximity data from the device", + type = "monitor") public SensorRecord readProximity( @HeaderParam("owner") String owner, @HeaderParam("deviceId") String deviceId, @Context HttpServletResponse response) { @@ -331,7 +336,8 @@ public class AndroidSenseService { @GET @Consumes("application/json") @Produces("application/json") - @Feature(code = "readgyroscope", name = "Gyroscope", description = "Read Gyroscope data from the device", type = "monitor") + @Feature(code = "readgyroscope", name = "Gyroscope", description = "Read Gyroscope data from the device", + type = "monitor") public SensorRecord readGyroscope( @HeaderParam("owner") String owner, @HeaderParam("deviceId") String deviceId, @Context HttpServletResponse response) { diff --git a/components/device-mgt-iot-androidsense/org.wso2.carbon.device.mgt.iot.androidsense.mgt.api/src/main/java/org/wso2/carbon/device/mgt/iot/androidsense/mgt/service/impl/AndroidSenseService.java b/components/device-mgt-iot-androidsense/org.wso2.carbon.device.mgt.iot.androidsense.mgt.api/src/main/java/org/wso2/carbon/device/mgt/iot/androidsense/mgt/service/impl/AndroidSenseService.java index 3330e9cf75..468df9c78a 100644 --- a/components/device-mgt-iot-androidsense/org.wso2.carbon.device.mgt.iot.androidsense.mgt.api/src/main/java/org/wso2/carbon/device/mgt/iot/androidsense/mgt/service/impl/AndroidSenseService.java +++ b/components/device-mgt-iot-androidsense/org.wso2.carbon.device.mgt.iot.androidsense.mgt.api/src/main/java/org/wso2/carbon/device/mgt/iot/androidsense/mgt/service/impl/AndroidSenseService.java @@ -71,7 +71,8 @@ public class AndroidSenseService { public boolean register(@FormParam("username") String username, @FormParam("password") String password, @FormParam("deviceId") String deviceId, - @FormParam("owner") String owner) { + @FormParam("owner") String owner, + @FormParam("deviceName") String deviceName) { DeviceManagement deviceManagement = new DeviceManagement(SUPER_TENANT); @@ -114,8 +115,7 @@ public class AndroidSenseService { enrolmentInfo.setDateOfLastUpdate(new Date().getTime()); enrolmentInfo.setStatus(EnrolmentInfo.Status.ACTIVE); enrolmentInfo.setOwnership(EnrolmentInfo.OwnerShip.BYOD); - String name = owner + " android " + deviceId; - device.setName(name); + device.setName(deviceName); device.setType(AndroidSenseConstants.DEVICE_TYPE); enrolmentInfo.setOwner(owner); device.setEnrolmentInfo(enrolmentInfo); diff --git a/components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.mgt.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/VirtualFireAlarmService.java b/components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.mgt.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/VirtualFireAlarmService.java index 92440237b3..8942857a35 100644 --- a/components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.mgt.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/VirtualFireAlarmService.java +++ b/components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.mgt.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/VirtualFireAlarmService.java @@ -63,11 +63,9 @@ import java.util.UUID; @API(name = "virtual_firealarm", version = "1.0.0", context = "/virtual_firealarm") public class VirtualFireAlarmService { - private static Log log = LogFactory.getLog(VirtualFireAlarmService.class); - //TODO; replace this tenant domain private static final String SUPER_TENANT = "carbon.super"; - + private static Log log = LogFactory.getLog(VirtualFireAlarmService.class); @Context //injected response proxy supporting multiple thread private HttpServletResponse response; @@ -76,6 +74,15 @@ public class VirtualFireAlarmService { Also contains utility methods required for the execution of these APIs --------------------------------------------------------------------------------------- */ + /** + * @return + */ + private static String shortUUID() { + UUID uuid = UUID.randomUUID(); + long l = ByteBuffer.wrap(uuid.toString().getBytes(StandardCharsets.UTF_8)).getLong(); + return Long.toString(l, Character.MAX_RADIX); + } + /** * @param deviceId * @param name @@ -133,7 +140,8 @@ public class VirtualFireAlarmService { */ @Path("manager/device/remove/{device_id}") @DELETE - public void removeDevice(@PathParam("device_id") String deviceId, @Context HttpServletResponse response) { + public void removeDevice(@PathParam("device_id") String deviceId, + @Context HttpServletResponse response) { DeviceManagement deviceManagement = new DeviceManagement(SUPER_TENANT); DeviceIdentifier deviceIdentifier = new DeviceIdentifier(); @@ -246,8 +254,8 @@ public class VirtualFireAlarmService { for (Device device : userDevices) { if (device.getType().equals(VirtualFireAlarmConstants.DEVICE_TYPE) && - device.getEnrolmentInfo().getStatus().equals( - EnrolmentInfo.Status.ACTIVE)) { + device.getEnrolmentInfo().getStatus().equals( + EnrolmentInfo.Status.ACTIVE)) { userDevicesforFirealarm.add(device); } @@ -365,8 +373,8 @@ public class VirtualFireAlarmService { if (!status) { String msg = "XMPP Account was not created for device - " + deviceId + " of owner - " + owner + - ".XMPP might have been disabled in org.wso2.carbon.device.mgt.iot" + - ".common.config.server.configs"; + ".XMPP might have been disabled in org.wso2.carbon.device.mgt.iot" + + ".common.config.server.configs"; log.warn(msg); throw new DeviceManagementException(msg); } @@ -388,13 +396,4 @@ public class VirtualFireAlarmService { return zipFile; } - /** - * @return - */ - private static String shortUUID() { - UUID uuid = UUID.randomUUID(); - long l = ByteBuffer.wrap(uuid.toString().getBytes(StandardCharsets.UTF_8)).getLong(); - return Long.toString(l, Character.MAX_RADIX); - } - } diff --git a/features/device-mgt-iot-androidsense-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/agent/androidsense.apk b/features/device-mgt-iot-androidsense-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/agent/androidsense.apk index d5afc8cbb4..730f3d65cb 100644 Binary files a/features/device-mgt-iot-androidsense-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/agent/androidsense.apk and b/features/device-mgt-iot-androidsense-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/agent/androidsense.apk differ diff --git a/features/device-mgt-iot-androidsense-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.type-view/public/images/myDevices_analytics.png b/features/device-mgt-iot-androidsense-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.type-view/public/images/myDevices_analytics.png index 2fd8075ff4..61609de454 100644 Binary files a/features/device-mgt-iot-androidsense-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.type-view/public/images/myDevices_analytics.png and b/features/device-mgt-iot-androidsense-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.type-view/public/images/myDevices_analytics.png differ diff --git a/features/device-mgt-iot-androidsense-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.type-view/type-view.hbs b/features/device-mgt-iot-androidsense-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.type-view/type-view.hbs index 5ef348e1f1..50ff44b287 100644 --- a/features/device-mgt-iot-androidsense-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.type-view/type-view.hbs +++ b/features/device-mgt-iot-androidsense-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.type-view/type-view.hbs @@ -7,6 +7,10 @@ +
+ +
+

What it Does

@@ -16,7 +20,7 @@

What You Need


-

You've got to just have an Android Device to get started.

+

You should have an Android Device to get started.

+
+ +
+

What it Does

@@ -273,6 +277,16 @@ .grey-bg { background-color: #f6f4f4; } + + .doc-link { + background: #11375B; + padding: 20px; + color: white; + } + + .doc-link a { + color: white; + } {{/zone}} diff --git a/features/device-mgt-iot-digitaldisplay-feature/org.wso2.carbon.device.mgt.iot.digitaldisplay.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.digital_display.type-view/type-view.hbs b/features/device-mgt-iot-digitaldisplay-feature/org.wso2.carbon.device.mgt.iot.digitaldisplay.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.digital_display.type-view/type-view.hbs index 8e6660db64..70fba4800b 100644 --- a/features/device-mgt-iot-digitaldisplay-feature/org.wso2.carbon.device.mgt.iot.digitaldisplay.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.digital_display.type-view/type-view.hbs +++ b/features/device-mgt-iot-digitaldisplay-feature/org.wso2.carbon.device.mgt.iot.digitaldisplay.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.digital_display.type-view/type-view.hbs @@ -7,6 +7,10 @@
+
+ +
+

What it Does

@@ -270,6 +274,16 @@ .grey-bg { background-color: #f6f4f4; } + + .doc-link { + background: #11375B; + padding: 20px; + color: white; + } + + .doc-link a { + color: white; + } {{#zone "bottomJs"}} diff --git a/features/device-mgt-iot-droneanalyzer-feature/org.wso2.carbon.device.mgt.iot.droneanalyzer.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.drone_analyzer.type-view/type-view.hbs b/features/device-mgt-iot-droneanalyzer-feature/org.wso2.carbon.device.mgt.iot.droneanalyzer.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.drone_analyzer.type-view/type-view.hbs index 9f2c555204..3f39e34258 100644 --- a/features/device-mgt-iot-droneanalyzer-feature/org.wso2.carbon.device.mgt.iot.droneanalyzer.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.drone_analyzer.type-view/type-view.hbs +++ b/features/device-mgt-iot-droneanalyzer-feature/org.wso2.carbon.device.mgt.iot.droneanalyzer.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.drone_analyzer.type-view/type-view.hbs @@ -7,6 +7,10 @@
+
+ +
+

What it Does

@@ -308,6 +312,16 @@ .grey-bg { background-color: #f6f4f4; } + + .doc-link { + background: #11375B; + padding: 20px; + color: white; + } + + .doc-link a { + color: white; + } {{/zone}} diff --git a/features/device-mgt-iot-raspberrypi-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.raspberrypi.type-view/type-view.hbs b/features/device-mgt-iot-raspberrypi-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.raspberrypi.type-view/type-view.hbs index 896e44390d..afefd1d044 100644 --- a/features/device-mgt-iot-raspberrypi-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.raspberrypi.type-view/type-view.hbs +++ b/features/device-mgt-iot-raspberrypi-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.raspberrypi.type-view/type-view.hbs @@ -7,6 +7,10 @@
+
+ +
+

What it Does

@@ -301,6 +305,15 @@ .grey-bg { background-color: #f6f4f4; } + .doc-link { + background: #11375B; + padding: 20px; + color: white; + } + + .doc-link a { + color: white; + } {{/zone}} diff --git a/features/device-mgt-iot-virtualfirealarm-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature/src/main/resources/configs/virtual_firealarm.json b/features/device-mgt-iot-virtualfirealarm-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature/src/main/resources/configs/virtual_firealarm.json index 57e7f0a882..fc5becfe82 100644 --- a/features/device-mgt-iot-virtualfirealarm-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature/src/main/resources/configs/virtual_firealarm.json +++ b/features/device-mgt-iot-virtualfirealarm-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature/src/main/resources/configs/virtual_firealarm.json @@ -1,7 +1,7 @@ { "deviceType": { "label": "Virtual Firealarm", - "category": "iot", + "category": "virtual", "downloadAgentUri": "manager/device/virtual_firealarm/download", "downloadAgentLinkGenUri": "manager/device/virtual_firealarm/generate_link" }, diff --git a/features/device-mgt-iot-virtualfirealarm-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.virtual_firealarm.type-view/type-view.hbs b/features/device-mgt-iot-virtualfirealarm-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.virtual_firealarm.type-view/type-view.hbs index 88b138bd48..67b06d8847 100644 --- a/features/device-mgt-iot-virtualfirealarm-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.virtual_firealarm.type-view/type-view.hbs +++ b/features/device-mgt-iot-virtualfirealarm-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.virtual_firealarm.type-view/type-view.hbs @@ -1,11 +1,14 @@
-

Virtual Firealrm

+

Virtual Firealarm


+
+ +
@@ -29,7 +32,9 @@
  • STEP 04   Proceed to the [Prepare] section. +
  • The device supports MQTT and XMPP Communications. It is configured to use MQTT by default.
  • +


  • @@ -260,10 +265,21 @@ .grey-bg { background-color: #f6f4f4; } + + .doc-link { + background: #11375B; + padding: 20px; + color: white; + } + + .doc-link a { + color: white; + } + {{/zone}} {{#zone "bottomJs"}} {{js "/js/download.js"}} {{js "/js/jquery.validate.js"}} -{{/zone}} \ No newline at end of file +{{/zone}} diff --git a/features/device-mgt-mdm-android-feature/org.wso2.carbon.device.mgt.mobile.android.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.device-view/device-view.hbs b/features/device-mgt-mdm-android-feature/org.wso2.carbon.device.mgt.mobile.android.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.device-view/device-view.hbs index 14e45fc830..6b9500151a 100644 --- a/features/device-mgt-mdm-android-feature/org.wso2.carbon.device.mgt.mobile.android.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.device-view/device-view.hbs +++ b/features/device-mgt-mdm-android-feature/org.wso2.carbon.device.mgt.mobile.android.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.device-view/device-view.hbs @@ -1,3 +1,132 @@ +{{#zone "device-detail-properties"}} +
    + +
    +
    + +
    + {{unit "cdmf.unit.device.details" device=device}} +
    + +
    +
    Policy Compliance
    +
    + +
    +
    + Not available yet +
    +
    +
    +
    +
    +
    +
    Device Location
    +
    +
    +
    +
    + Not available yet +
    +
    +
    +
    +
    +
    Installed Applications
    +
    + +
    +
    + Not available yet +
    +
    +
    +
    +
    +
    +
    Operations Log
    +
    + +
    +
    + Not available yet +
    +
    +
    +
    +
    +
    +
    +
    +{{/zone}} {{#zone "bottomJs"}} {{js "js/device-detail.js"}} diff --git a/features/device-mgt-mdm-android-feature/org.wso2.carbon.device.mgt.mobile.android.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.device-view/device-view.js b/features/device-mgt-mdm-android-feature/org.wso2.carbon.device.mgt.mobile.android.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.device-view/device-view.js new file mode 100644 index 0000000000..da9c9809f9 --- /dev/null +++ b/features/device-mgt-mdm-android-feature/org.wso2.carbon.device.mgt.mobile.android.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.device-view/device-view.js @@ -0,0 +1,66 @@ +/* + * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +function onRequest(context) { + var log = new Log("detail.js"); + var deviceType = context.uriParams.deviceType; + var deviceId = request.getParameter("id"); + + if (deviceType != null && deviceType != undefined && deviceId != null && deviceId != undefined) { + var deviceModule = require("/app/modules/device.js").deviceModule; + var device = deviceModule.viewDevice(deviceType, deviceId); + + if (device) { + var viewModel = {}; + var deviceInfo = device.properties.DEVICE_INFO; + if (deviceInfo != undefined && String(deviceInfo.toString()).length > 0) { + deviceInfo = parse(stringify(deviceInfo)); + viewModel.imei = device.properties.IMEI; + viewModel.model = device.properties.DEVICE_MODEL; + viewModel.vendor = device.properties.VENDOR; + viewModel.internal_memory = {}; + viewModel.external_memory = {}; + viewModel.location = { + latitude: device.properties.LATITUDE, + longitude: device.properties.LONGITUDE + }; + var info = {}; + var infoList = parse(deviceInfo); + if (infoList != null && infoList != undefined) { + for (var j = 0; j < infoList.length; j++) { + info[infoList[j].name] = infoList[j].value; + } + } + deviceInfo = info; + viewModel.BatteryLevel = deviceInfo.BATTERY_LEVEL; + viewModel.internal_memory.FreeCapacity = Math.round(deviceInfo.INTERNAL_AVAILABLE_MEMORY * 100) / 100; + viewModel.internal_memory.DeviceCapacityPercentage = Math.round(deviceInfo.INTERNAL_AVAILABLE_MEMORY + / deviceInfo.INTERNAL_TOTAL_MEMORY * 10000) / 100; + viewModel.external_memory.FreeCapacity = Math.round(deviceInfo.EXTERNAL_AVAILABLE_MEMORY * 100) / 100; + viewModel.external_memory.DeviceCapacityPercentage = Math.round(deviceInfo.EXTERNAL_AVAILABLE_MEMORY + / deviceInfo.EXTERNAL_TOTAL_MEMORY * 10000) / 100; + device.viewModel = viewModel; + } + } + + log.info(device); + var utility = require("/app/modules/utility.js").utility; + var configs = utility.getDeviceTypeConfig(deviceType); + return {"device": device, "label": configs["deviceType"]["label"]}; + } +} \ No newline at end of file diff --git a/features/device-mgt-mdm-android-feature/org.wso2.carbon.device.mgt.mobile.android.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.type-view/public/asset/android-agent.apk b/features/device-mgt-mdm-android-feature/org.wso2.carbon.device.mgt.mobile.android.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.type-view/public/asset/android-agent.apk new file mode 100644 index 0000000000..f00deb1b0a Binary files /dev/null and b/features/device-mgt-mdm-android-feature/org.wso2.carbon.device.mgt.mobile.android.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.type-view/public/asset/android-agent.apk differ diff --git a/features/device-mgt-mdm-android-feature/org.wso2.carbon.device.mgt.mobile.android.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.type-view/type-view.hbs b/features/device-mgt-mdm-android-feature/org.wso2.carbon.device.mgt.mobile.android.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.type-view/type-view.hbs index 5d43391fc6..81890cab99 100644 --- a/features/device-mgt-mdm-android-feature/org.wso2.carbon.device.mgt.mobile.android.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.type-view/type-view.hbs +++ b/features/device-mgt-mdm-android-feature/org.wso2.carbon.device.mgt.mobile.android.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.type-view/type-view.hbs @@ -33,9 +33,8 @@
    -
    - -