+
+ {{#equal device.type "windows"}}
+
+
Not available yet
-
-
-
-
- {{#equal device.type "windows"}}
-
-
Not available yet
+ {{/equal}}
+ {{#if device.viewModel.BatteryLevel}}
+
+
+
+
BATTERY
+
+
+
+ {{device.viewModel.BatteryLevel}} %
- {{/equal}}
- {{#if device.viewModel.BatteryLevel}}
-
-
-
-
BATTERY
-
-
-
- {{device.viewModel.BatteryLevel}} %
-
-
-
-
-
- {{/if}}
- {{#if device.viewModel.DeviceCapacity}}
-
-
-
-
STORAGE
-
-
-
- {{device.viewModel.DeviceCapacityPercentage}} %
+
+
+
+
+ {{/if}}
+ {{#if device.viewModel.DeviceCapacity}}
+
+
+
+
STORAGE
+
+
+
+ {{device.viewModel.DeviceCapacityPercentage}} %
{{device.viewModel.AvailableDeviceCapacity}} GB Free
-
-
-
-
- {{/if}}
- {{#if device.viewModel.internal_memory.FreeCapacity}}
-
-
-
-
LOCAL STORAGE
-
-
-
- {{device.viewModel.internal_memory.DeviceCapacityPercentage}} %
+
+
+
+
+ {{/if}}
+ {{#if device.viewModel.internal_memory.FreeCapacity}}
+
+
+
+
LOCAL STORAGE
+
+
+
+ {{device.viewModel.internal_memory.DeviceCapacityPercentage}} %
{{device.viewModel.internal_memory.FreeCapacity}} GB Free
-
-
-
-
- {{/if}}
- {{#if device.viewModel.external_memory.FreeCapacity}}
-
-
-
-
EXTERNAL STORAGE
-
-
-
- {{device.viewModel.external_memory.DeviceCapacityPercentage}} %
+
+
+
+
+ {{/if}}
+ {{#if device.viewModel.external_memory.FreeCapacity}}
+
+
+
+
EXTERNAL STORAGE
+
+
+
+ {{device.viewModel.external_memory.DeviceCapacityPercentage}} %
{{device.viewModel.external_memory.FreeCapacity}} GB Free
-
-
-
-
- {{/if}}
+
-
-
-
-
- Policy Compliance
+ {{/if}}
+
+
+
+
+
+
+
-
-
+
+
+
-
- Loading Policy Compliance...
-
-
-
-
There is no active policy for this device.
-
-
-
-
-
-
-
-
Device Location
-
-
-
-
Device location cannot be retrieved.
-
-
-
-
-
+
+ Loading Policy Compliance...
+
+
+
+
There is no active policy for this device.
-
-
-
- Installed Applications
+
+
+
+
+
+
+
Device Location
+
+
+
+
Device location cannot be retrieved.
+
+
+
+
+
+
+
+
+
+ Installed Applications
-
-
-
+
+
+
-
- Loading Applications List...
-
-
-
-
No applications found.
-
Please try refreshing the list in a while.
-
-
-
-
+
+ Loading Applications List...
+
+
+
+
No applications found.
+
Please try refreshing the list in a while.
-
-
-
- Operations Logs
+
+
+
+
+
+
+
-
-
+
+
+
-
- Loading Operations Log...
-
-
-
-
There are no operations, performed yet on this device.
-
-
-
-
-
- Operation Code |
- Status |
- Request created at |
-
-
-
-
-
-
-
+
+ Loading Operations Log...
+
+
+
+
There are no operations, performed yet on this device.
+
+
+
+ Operation Code |
+ Status |
+ Request created at |
+
+
+
+
+
- {{/defineZone}}
+
+
+
-
+ {{/defineZone}}
+
+
+ {{else}}
+
+ Permission Denied
+
+
+ You are not authorized to view specified device in the system.
+ {{/if}}
{{else}}
- Permission Denied
+ Device not found
- You are not authorized to view specified device in the system.
+ You have tried to access either a removed or non-existing device.
{{/if}}
{{/zone}}
{{#zone "bottomJs"}}
{{#if isAuthorized}}
+
+
+
diff --git a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.device.view/view.js b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.device.view/view.js
index 05309e1fa..0373b6eb6 100644
--- a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.device.view/view.js
+++ b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.device.view/view.js
@@ -26,6 +26,7 @@ function onRequest(context) {
var deviceModule = require("/app/modules/business-controllers/device.js")["deviceModule"];
var response = deviceModule.viewDevice(deviceType, deviceId);
if (response["status"] == "success") {
+ deviceData["deviceFound"] = true;
deviceData["isAuthorized"] = true;
var device = response["content"];
@@ -98,7 +99,10 @@ function onRequest(context) {
}
deviceData["device"] = device;
} else if (response["status"] == "unauthorized") {
+ deviceData["deviceFound"] = true;
deviceData["isAuthorized"] = false;
+ } else if (response["status"] == "notFound") {
+ deviceData["deviceFound"] = false;
}
return deviceData;
}