From 8bb1428df8b1523984b2141aaee9170357b5fb59 Mon Sep 17 00:00:00 2001 From: dilanua Date: Wed, 28 Sep 2016 14:11:25 +0530 Subject: [PATCH] Improving device view info.retrieval - UI --- .../public/js/device-detail.js | 26 +- .../app/units/mdm.unit.device.view/view.hbs | 162 ++++++------ .../app/units/mdm.unit.device.view/view.js | 232 ++++++++++-------- 3 files changed, 232 insertions(+), 188 deletions(-) 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/public/js/device-detail.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/public/js/device-detail.js index 8204c69f9..f56ba9556 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/public/js/device-detail.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/public/js/device-detail.js @@ -257,7 +257,11 @@ var InitiateViewOption = null; "Loading policy compliance related data " + "was not successful. please try refreshing in a while." + "" + - ""); + "" + + "

" + + "

" + + "

" + ); } ); } @@ -265,11 +269,15 @@ var InitiateViewOption = null; $("#policy-spinner").addClass("hidden"); $("#policy-list-container"). html("
" + - "

" + - "" + - "There is currently no effective policy applied for this device." + - "

" + - "
"); + "

" + + "" + + "There is currently no effective policy applied for this device." + + "

" + + "" + + "

" + + "

" + + "

" + ); } }, // error-callback @@ -282,7 +290,11 @@ var InitiateViewOption = null; "Loading policy compliance related data " + "was not successful. please try refreshing in a while." + "" + - ""); + "" + + "

" + + "

" + + "

" + ); } ); } 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 25ee6706e..d44d94957 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 @@ -5,11 +5,12 @@ {{#zone "content"}} {{#if deviceFound}} {{#if isAuthorized}} -

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

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

@@ -23,77 +24,77 @@ {{#defineZone "device-detail-properties"}} - {{#if device.viewModel.deviceIdentifier}} + {{#if deviceView.deviceIdentifier}} - + {{/if}} - {{#if device.viewModel.deviceName}} + {{#if deviceView.name}} - + {{/if}} - {{#if device.viewModel.vendor}} - {{#if device.viewModel.model}} + {{#if deviceView.vendor}} + {{#if deviceView.model}} - + {{/if}} {{/if}} - {{#if device.status}} + {{#if deviceView.status}} {{/if}} - {{#if device.viewModel.owner}} + {{#if deviceView.owner}} - + {{/if}} - {{#if device.viewModel.ownership}} + {{#if deviceView.ownership}} - + {{/if}} - {{#if device.viewModel.imei}} + {{#if deviceView.imei}} - + {{/if}} - {{#if device.viewModel.udid}} + {{#if deviceView.udid}} - + {{/if}} - {{#if device.viewModel.os_build_date}} + {{#if deviceView.osBuildDate}} - + {{/if}} - {{#if device.viewModel.phoneNumber}} + {{#if deviceView.phoneNumber}} - + {{/if}} - {{#if device.viewModel.lastUpdatedTime}} + {{#if deviceView.lastUpdatedTime}} - + {{/if}} @@ -101,7 +102,7 @@ {{/defineZone}}
Operations
- {{unit "mdm.unit.device.operation-bar" deviceType=device.type ownership=device.viewModel.ownership}} + {{unit "mdm.unit.device.operation-bar" deviceType=deviceView.deviceType ownership=deviceView.ownership}}
@@ -120,8 +121,8 @@
Device ID{{device.viewModel.deviceIdentifier}}{{deviceView.deviceIdentifier}}
Name{{device.viewModel.deviceName}}{{deviceView.name}}
Model{{device.viewModel.vendor}} {{device.viewModel.model}}{{deviceView.vendor}} {{deviceView.model}}
Status - {{#equal device.status "ACTIVE"}}  Active{{/equal}} - {{#equal device.status "INACTIVE"}}  Inactive{{/equal}} - {{#equal device.status "BLOCKED"}}  Blocked{{/equal}} - {{#equal device.status "REMOVED"}}  Removed{{/equal}} + {{#equal deviceView.status "ACTIVE"}}  Active{{/equal}} + {{#equal deviceView.status "INACTIVE"}}  Inactive{{/equal}} + {{#equal deviceView.status "BLOCKED"}}  Blocked{{/equal}} + {{#equal deviceView.status "REMOVED"}}  Removed{{/equal}}
Owner{{device.viewModel.owner}}{{deviceView.owner}}
Ownership{{device.viewModel.ownership}}{{deviceView.ownership}}
IMEI{{device.viewModel.imei}}{{deviceView.imei}}
UDID{{device.viewModel.udid}}{{deviceView.udid}}
Firmware Build Date{{device.viewModel.os_build_date}}{{deviceView.osBuildDate}}
Phone Number{{device.viewModel.phoneNumber}}{{deviceView.phoneNumber}}
Last Update{{device.viewModel.lastUpdatedTime}}{{deviceView.lastUpdatedTime}}