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.hbs 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.hbs index 862ef44fd..67f86d7b5 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.hbs +++ 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.hbs @@ -3,16 +3,17 @@ {{unit "mdm.unit.device.qr-modal"}} {{#zone "content"}} - {{#if isAuthorized}} -

- Device {{device.name}} - {{#if device.viewModel.model}} - + {{#if deviceFound}} + {{#if isAuthorized}} +

+ Device {{device.name}} + {{#if device.viewModel.model}} + ( {{device.viewModel.vendor}} {{device.viewModel.model}} ) - {{/if}} -

-
+ {{/if}} +

+
@@ -72,304 +73,314 @@
-
- - {{#defineZone "device-detail-properties"}} -
-
- +
+ + {{#defineZone "device-detail-properties"}} +
+
+ -
- - -
- Loading Device Details... +
+ + +
+ Loading Device Details... +
+
+
+
+ + {{#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}} +
-
-
- - +
+
+
+
+ + -
-
+
+
+
- -
-
-

There is no active policy for this device.

-
-
-
-
-
-
- - -
-
-
-

Device location cannot be retrieved.

-
-
-
-
-
+ +
+
+

There is no active policy for this device.

-
- - +
+
+
+
+ + +
+
+
+

Device location cannot be retrieved.

+
+
+
+
+
+
+
+ + -
-
+
+
+
- -
-
-

No applications found.

-

Please try refreshing the list in a while.

-
-
-
-
+ +
+
+

No applications found.

+

Please try refreshing the list in a while.

-
- - +
+
+
+
+ + -
-
+
+
+
- -
-
-

There are no operations, performed yet on this device.

-
-
- - - - - - - - - - -
Operation CodeStatusRequest created at
-
-
+ +
+
+

There are no operations, performed yet on this device.

+ + + + + + + + + + +
Operation CodeStatusRequest 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; }