From c4fcaaf498ca131e00c0b850b57ff05c8dd820dc Mon Sep 17 00:00:00 2001 From: dunithd Date: Wed, 21 Jun 2017 04:08:51 +0530 Subject: [PATCH] Applying new UX for Android device details page --- .../device-view.hbs | 324 ++++-------------- .../public/img/android_app_icon.png | Bin 0 -> 6932 bytes .../public/js/device-detail.js | 2 + .../public/templates/applications-list.hbs | 40 +-- .../public/templates/policy-compliance.hbs | 79 ++--- 5 files changed, 100 insertions(+), 345 deletions(-) create mode 100644 components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.device-view/public/img/android_app_icon.png diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.device-view/device-view.hbs b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.device-view/device-view.hbs index 774fe4fc5..50085f8de 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.device-view/device-view.hbs +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.device-view/device-view.hbs @@ -4,279 +4,91 @@ {{#if deviceFound}} {{#if isAuthorized}} - {{#zone "device-details-header"}} -

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

+ {{#zone "device-thumbnail"}} + {{/zone}} - {{#zone "overview-section"}} -
-
Device - Overview -
- - - {{#if device.deviceIdentifier}} - - - - - {{/if}} - {{#if device.name}} - - - - - {{/if}} - {{#if device.vendor}} - {{#if device.model}} - - - - - {{/if}} - {{/if}} - {{#if device.status}} - - - - - {{/if}} - {{#if device.owner}} - - - - - {{/if}} - {{#if device.ownership}} - - - - - {{/if}} - {{#if device.imei}} - - - - - {{/if}} - {{#if device.udid}} - - - - - {{/if}} - {{#if device.osBuildDate}} - - - - - {{/if}} - {{#if device.phoneNumber}} - - - - - {{/if}} - {{#if device.lastUpdatedTime}} - - - - - {{/if}} - -
Device ID{{device.deviceIdentifier}}
Name{{device.name}}
Model{{device.vendor}} - {{device.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 device.status "UNREACHABLE"}}Unreachable{{/equal}} -
Owner{{device.owner}}
Ownership{{device.ownership}}
IMEI{{device.imei}}
UDID{{device.udid}}
Firmware Build - Date - {{device.osBuildDate}}
Phone Number{{device.phoneNumber}}
Last Update{{device.lastUpdatedTime}}
-
+ {{#zone "device-details-header"}} +

+ {{device.owner}}'s {{device.name}} + + + +

+ {{#if device.model}} +

{{device.vendor}} {{device.model}}

+ {{/if}} +

Ownership - {{device.ownership}}

+

Device is + + {{#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 device.status "UNREACHABLE"}}Unreachable{{/equal}} + +

{{/zone}} - {{#zone "device-opetations"}} {{#if device.isNotRemoved}} -
- Operations -
-
+
+
+

Device Operations

+
{{unit "cdmf.unit.device.type.android.operation-bar" device=device backendApiUri=backendApiUri autoCompleteParams=autoCompleteParams}}
{{/if}} {{/zone}} - {{#zone "device-details-tab-injected"}} - - - + {{#zone "device-details"}} + {{#if device.deviceInfoAvailable}} + {{#if device.BatteryLevel}} +

{{device.BatteryLevel.value}}%

+ {{/if}} + {{#if device.ramUsage}} +

{{device.ramUsage.value}}%

+ {{/if}} + {{#if device.internalMemory}} +

{{device.internalMemory.usage}} + GB/{{device.internalMemory.total}}GB

+ {{/if}} + {{#if device.externalMemory}} +

{{device.externalMemory.usage}} + GB/{{device.externalMemory.total}}GB

+ {{/if}} + {{else}} +

Battery, RAM and Storage related information are not + available yet.

+ {{/if}} {{/zone}} - {{#zone "device-details-tab-contents"}} -
- - -
-
-
- - {{#if device.deviceInfoAvailable}} - {{#if device.BatteryLevel}} -
-
-
-
BATTERY
-
-
-
- {{device.BatteryLevel - .value}} % -
-
-
-
-
- {{/if}} - - - - - - - - - - - - - - - - {{#if device.ramUsage}} -
-
-
-
RAM Usage
-
-
-
- {{device.ramUsage - .value}} % -
-
-
-
-
- {{/if}} - {{#if device.internalMemory}} -
-
-
-
Local Storage
-
-
-
-
- {{device.internalMemory - .usage}} % - - TOTAL OF {{device.internalMemory - .total}} GB - -
-
-
-
-
- {{/if}} - {{#if device.externalMemory}} -
-
-
-
External Storage
-
-
-
- {{device.externalMemory - .usage}} % - - TOTAL OF {{device.externalMemory - .total}} GB - -
-
-
-
-
- {{/if}} - {{else}} -
-

- - Battery, RAM and Storage related information are not - available yet. -

-
- {{/if}} -
-
-
-
+ {{#zone "device-details-tab-injected"}} +
  • Location
  • +
  • Applications
  • +
  • Policy Compliance
  • {{/zone}} {{#zone "device-view-tab-injected-conents"}} +
    + +
    +
    +
    +
    +
    +
    +
    +
    +
    "); diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.device-view/public/templates/applications-list.hbs b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.device-view/public/templates/applications-list.hbs index ec6029dcc..c25f353df 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.device-view/public/templates/applications-list.hbs +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.device-view/public/templates/applications-list.hbs @@ -1,31 +1,9 @@ - \ No newline at end of file +{{#each applications}} +
    + +
    +

    {{name}}

    +

    v{{version}}

    +
    +
    +{{/each}} diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.device-view/public/templates/policy-compliance.hbs b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.device-view/public/templates/policy-compliance.hbs index 8fba741a6..61590d984 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.device-view/public/templates/policy-compliance.hbs +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.device-view/public/templates/policy-compliance.hbs @@ -1,63 +1,26 @@ -
    - -
    -
    - - {{#equal deviceType "android"}} - - {{/equal}} - {{#equal deviceType "ios"}} - - {{/equal}} - {{#equal deviceType "windows"}} - - {{/equal}} - - -

    {{policy.policyName}}

    - {{deviceType}} -
    -
    -
    -
    -
    -
    - Ownership Type : {{policy.ownershipType}} -
    -
    -
    -
    - Compliance Type : {{policy.compliance}} -
    -
    -
    -
    - Compliance : - {{#equal compliance "COMPLIANT"}} - Compliant - {{/equal}} - {{#equal compliance "NON-COMPLIANT"}} - Not Compliant - {{/equal}} -
    -
    -
    -
    -
    - - - - - - - View - - +
    + {{#equal compliance "COMPLIANT"}} + + {{/equal}} + {{#equal compliance "NON-COMPLIANT"}} + + {{/equal}} +

    + {{policy.policyName}} + {{deviceType}} +

    +

    + Compliance Type : {{policy.compliance}} + Ownership type : {{policy.ownershipType}} +

    + -
    + @@ -77,4 +40,4 @@ {{/each}}
    -
    \ No newline at end of file +