From cc6922bfad2ad46ac2ec343f6e31341e3f29bfdb Mon Sep 17 00:00:00 2001 From: kamidu Date: Thu, 6 Oct 2016 22:33:08 +0530 Subject: [PATCH] Fix for EMM-1680 --- .../listing.hbs | 1 + .../app/units/cdmf.unit.device.view/view.hbs | 674 +++++++++++++----- .../listing.hbs | 2 +- .../public/js/notification-listing.js | 6 +- 4 files changed, 498 insertions(+), 185 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.notification.listing/listing.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.notification.listing/listing.hbs index bcac7b4af2..7e91f28497 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.notification.listing/listing.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.notification.listing/listing.hbs @@ -15,6 +15,7 @@ specific language governing permissions and limitations under the License. }} +{{unit "cdmf.unit.data-tables-extended"}} {{unit "cdmf.unit.ui.title" pageTitle="Notification Listing"}} {{#zone "breadcrumbs"}}
  • diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.view/view.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.view/view.hbs index 3579228ec4..9c936870be 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.view/view.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.view/view.hbs @@ -1,203 +1,515 @@ -{{! - Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. - - WSO2 Inc. licenses this file to you under the Apache License, - Version 2.0 (the "License"); you may not use this file except - in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. -}} +{{unit "mdm.unit.lib.leaflet"}} +{{unit "cdmf.unit.lib.qrcode"}} +{{unit "mdm.unit.device.qr-modal"}} {{#zone "content"}} -

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

    -
    -
    -
    -
    -
    - {{#defineZone "device-thumbnail"}} - - {{/defineZone}} + {{#if deviceFound}} + {{#if isAuthorized}} +

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

    +
    +
    +
    +
    -
    -
    -
    - Device Overview - {{label}}
    - {{unit "cdmf.unit.device.overview-section" device=device}} - {{#defineZone "operation-status"}}{{/defineZone}} - {{#defineZone "device-opetations"}} +
    +
    Device + Overview +
    + {{#defineZone "device-detail-properties"}} + + + {{#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}}
    + {{/defineZone}}
    Operations
    -
    - {{unit "cdmf.unit.device.operation-bar" device=device}} +
    + {{unit "mdm.unit.device.operation-bar" deviceType=deviceView.deviceType ownership=deviceView.ownership}}
    - {{/defineZone}} +
    -
    -
    +
    + -
    -
    Policies
    -
    - -
    -
    - No policies found + {{#defineZone "device-detail-properties"}} +
    +
    + + + {{#if deviceView.isNotWindows}} +
    + + +
    +
    +
    + + {{#equal deviceView.deviceType "windows"}} +
    +

    Not + available yet

    +
    + {{/equal}} + {{#if deviceView.deviceInfoAvailable}} + {{#if deviceView.BatteryLevel}} +
    +
    +
    +
    BATTERY
    +
    +
    +
    + {{deviceView.BatteryLevel.value}} % +
    +
    +
    +
    +
    + {{/if}} + + + + + + + + + + + + + + + + {{#if deviceView.ramUsage}} +
    +
    +
    +
    RAM Usage
    +
    +
    +
    + {{deviceView.ramUsage.value}} % +
    +
    +
    +
    +
    + {{/if}} + {{#if deviceView.internalMemory}} +
    +
    +
    +
    Local Storage
    +
    +
    +
    +
    + {{deviceView.internalMemory.usage}} % + + TOTAL OF {{deviceView.internalMemory.total}} GB + +
    +
    +
    +
    +
    + {{/if}} + {{#if deviceView.externalMemory}} +
    +
    +
    +
    External Storage
    +
    +
    +
    + {{deviceView.externalMemory.usage}} % + + TOTAL OF {{deviceView.externalMemory.total}} GB + +
    +
    +
    +
    +
    + {{/if}} + {{else}} +
    +

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

    +
    + {{/if}} +
    +
    +
    +
    + {{/if}} + +
    + + +
    +
    + + + + + + +
    +
    +
    +
    -
    -
    -
    - - - - - Add device specific policy -
    +
    + + +
    +
    + {{#if deviceView.location}} +
    +
    + {{else}} +
    +

    + + Device location information is not available. +

    +
    +

    +

    +

    + {{/if}} +
    +
    +
    +
    + + -
    -
    Device Location
    -
    -
    -
    -
    - Not available yet -
    -
    -
    -
    -
    -
    Operations Log
    -
    - -
    -
    - Not available yet +
    + + +
    +
    + + + + + + +
    +
    +

    + + 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}} +

    + Device not found +

    +
    + You have tried to access either a removed or non-existing device. + {{/if}} {{/zone}} {{#zone "bottomJs"}} - {{js "js/device-view.js"}} - - - - + {{#if isAuthorized}} + + + + + + + {{js "js/device-detail.js"}} + + {{js "js/load-map.js"}} + {{/if}} {{/zone}} \ No newline at end of file diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.notification.listing/listing.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.notification.listing/listing.hbs index 9e05b2c4ca..b0ca5a7e98 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.notification.listing/listing.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.notification.listing/listing.hbs @@ -43,7 +43,7 @@
    -
    +
    No unread messages
    diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.notification.listing/public/js/notification-listing.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.notification.listing/public/js/notification-listing.js index a68e69d7bb..9c4182dcbb 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.notification.listing/public/js/notification-listing.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.notification.listing/public/js/notification-listing.js @@ -66,11 +66,11 @@ function showAdvanceOperation(operation, button) { $(button).addClass('selected'); $(button).siblings().removeClass('selected'); if ($(button).attr("id") == 'allNotifications') { - $("#ast-container").html('
    You do not have any unread notifications
    '); + $("#noNotificationtxt").html('You do not have any unread notifications '); } else if ($(button).attr("id") == 'unReadNotifications') { - $("#ast-container").html('
    You do not have any notifications
    '); + $("#noNotificationtxt").html('You do not have any notifications '); } else { - $("#ast-container").html('
    You do not have any notifications
    '); + $("#noNotificationtxt").html('You do not have any notifications '); } var hiddenOperation = ".wr-hidden-operations-content > div"; $(hiddenOperation + '[data-operation="' + operation + '"]').show();