From 326d59e7c10e21377d77572923d8c0df189bd90c Mon Sep 17 00:00:00 2001 From: Ace Date: Wed, 30 Nov 2016 16:51:49 +0530 Subject: [PATCH] Adding android operations-bar related changes --- .../device-view.hbs | 120 ++- .../device-view.hbs | 781 ++++++++---------- .../device-view.js | 11 +- .../public/js/device-detail.js | 88 -- .../public/templates/operations-log.hbs | 24 - .../public/templates/policy-compliance.hbs | 3 +- .../operation-bar.hbs | 32 + .../operation-bar.js | 106 +++ .../operation-bar.json | 3 + .../public/js/operation-bar.js | 248 ++++++ .../templates/hidden-operations-android.hbs | 0 .../templates/hidden-operations-ios.hbs | 0 .../public/templates/operations.hbs | 0 .../operation-bar.hbs | 113 ++- .../operation-bar.js | 129 +-- .../public/js/operation-bar.js | 326 +++----- .../private/config.json | 39 +- .../main/resources/devicetypes/android.xml | 209 ++--- 18 files changed, 1170 insertions(+), 1062 deletions(-) delete mode 100755 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/operations-log.hbs 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.old.operation-bar/operation-bar.hbs 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.old.operation-bar/operation-bar.js 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.old.operation-bar/operation-bar.json 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.old.operation-bar/public/js/operation-bar.js rename 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.operation-bar => cdmf.unit.device.type.android.old.operation-bar}/public/templates/hidden-operations-android.hbs (100%) rename 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.operation-bar => cdmf.unit.device.type.android.old.operation-bar}/public/templates/hidden-operations-ios.hbs (100%) rename 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.operation-bar => cdmf.unit.device.type.android.old.operation-bar}/public/templates/operations.hbs (100%) diff --git a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.virtual_firealarm.device-view/device-view.hbs b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.virtual_firealarm.device-view/device-view.hbs index 7d345c2ab1..9cd2ca642b 100644 --- a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.virtual_firealarm.device-view/device-view.hbs +++ b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.virtual_firealarm.device-view/device-view.hbs @@ -37,81 +37,75 @@ {{/zone}} -{{#zone "device-detail-properties"}} -
- -
-
+{{#zone "device-view-tabs"}} +
  • Device + Statistics +
  • +
  • Policies +
  • +
  • Operations Log
  • +{{/zone}} -
    -
    Device Statistics
    - {{unit "cdmf.unit.device.type.virtual_firealarm.realtime.analytics-view" device=device}} -
    +{{#zone "device-view-tab-contents"}} -
    -
    Policies
    -
    - + Add device specific policy -
    -
    -
    Operations Log
    -
    - +
    +
    Operations Log
    +
    + -
    -
    - Not available yet -
    -
    -
    -
    + Loading Operations Log . . . +
    +
    +
    +
    +
    + Not available yet
    +
    {{/zone}} + 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 0f613ddc86..3842be7309 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 @@ -1,485 +1,406 @@ {{unit "cdmf.unit.device.type.android.leaflet"}} {{unit "cdmf.unit.lib.qrcode"}} {{unit "cdmf.unit.device.type.android.qr-modal"}} -{{unit "cdmf.unit.device.type.android.operation-bar"}} {{#if deviceFound}} {{#if isAuthorized}} {{#zone "device-details-header"}} -

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

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

    + {{/if}} +

    {{/zone}} - {{#zone "overview-section"}} -
    -
    Device - Overview -
    - - - {{#if deviceView.deviceIdentifier}} - - - - - {{/if}} - {{#if deviceView.name}} - - - - - {{/if}} - {{#if deviceView.vendor}} - {{#if deviceView.model}} - - - - - {{/if}} - {{/if}} - {{#if deviceView.status}} - - - - - {{/if}} - {{#if deviceView.owner}} - - - - - {{/if}} - {{#if deviceView.ownership}} - - - - - {{/if}} - {{#if deviceView.imei}} - - - - - {{/if}} - {{#if deviceView.udid}} - - - - - {{/if}} - {{#if deviceView.osBuildDate}} - - - - - {{/if}} - {{#if deviceView.phoneNumber}} - - - - - {{/if}} - {{#if deviceView.lastUpdatedTime}} - - - - - {{/if}} - -
    Device ID{{deviceView.deviceIdentifier}}
    Name{{deviceView.name}}
    Model{{deviceView.vendor}} {{deviceView.model}}
    Status - {{#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{{deviceView.owner}}
    Ownership{{deviceView.ownership}}
    IMEI{{deviceView.imei}}
    UDID{{deviceView.udid}}
    Firmware Build - Date - {{deviceView.osBuildDate}}
    Phone Number{{deviceView.phoneNumber}}
    Last Update{{deviceView.lastUpdatedTime}}
    -
    - {{/zone}} - - {{#zone "device-opetations"}} - {{#if deviceView.isNotRemoved}} -
    - Operations -
    -
    - {{unit "cdmf.unit.device.operation-bar" device=deviceView backendApiUri=backendApiUri autoCompleteParams=autoCompleteParams}} -
    + {{#zone "overview-section"}} +
    +
    Device + Overview +
    + + + {{#if device.deviceIdentifier}} + + + + {{/if}} - {{/zone}} - + {{#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}} +
    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}} - {{#zone "device-detail-properties"}} -
    -