From b8d91478d552232e7d8432a2c7cbc21d397f4aa3 Mon Sep 17 00:00:00 2001 From: kamidu Date: Mon, 15 Aug 2016 18:06:19 +0530 Subject: [PATCH] Device view and detail related ui fixes --- .../app/pages/mdm.page.devices/devices.hbs | 55 ++- .../public/js/operation-bar.js | 12 +- .../templates/hidden-operations-android.hbs | 458 +++++++++--------- .../public/templates/operations.hbs | 117 ++++- 4 files changed, 362 insertions(+), 280 deletions(-) diff --git a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/mdm.page.devices/devices.hbs b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/mdm.page.devices/devices.hbs index 2e5c1b3e97..80bcf1faf4 100644 --- a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/mdm.page.devices/devices.hbs +++ b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/mdm.page.devices/devices.hbs @@ -33,17 +33,36 @@ {{/zone}} {{#zone "navbarActions"}} - {{#if permissions.enroll}} -
  • - - - - - - Enroll Device - -
  • - {{/if}} +{{!-- #if permissions.enroll --}} +
  • + + + + + + + + + + + Enroll Device + +
  • + {{!-- /if --}} +
  • + + + + + + + + + + + Advanced Search + +
  • {{/zone}} {{#zone "content"}} @@ -56,7 +75,7 @@
    - +
    @@ -87,7 +107,7 @@ -
    +
    -
    +
    {{unit "mdm.unit.device.operation-bar"}}
    @@ -99,7 +119,7 @@
    @@ -117,7 +137,8 @@ {{/zone}} {{#zone "bottomJs"}} - + {{js "js/device-listing.js"}} {{/zone}} 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.operation-bar/public/js/operation-bar.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.operation-bar/public/js/operation-bar.js index 1e65ffb33a..0485b20e09 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.operation-bar/public/js/operation-bar.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.operation-bar/public/js/operation-bar.js @@ -106,12 +106,12 @@ function loadOperationBar(deviceType) { //var selectedDeviceID = deviceId; $.template("operations-bar", operationBarSrc, function (template) { //var serviceURL = "/mdm-admin/features/" + platformType; - var serviceURL = "/api/device-mgt/v1.0/devices/"+platformType+"/*/features"; + var serviceURL = "/api/device-mgt/v1.0/devices/" + platformType + "/*/features"; var successCallback = function (data) { var viewModel = {}; data = JSON.parse(data).filter(function (current) { var iconName; - switch(deviceType) { + switch (deviceType) { case platformTypeConstants.ANDROID: iconName = operationModule.getAndroidIconForFeature(current.code); current.type = deviceType; @@ -142,7 +142,6 @@ function loadOperationBar(deviceType) { function runOperation(operationName) { var deviceIdList = getSelectedDeviceIds(); var list = getDevicesByTypes(deviceIdList); - console.log(list); var successCallback = function (data) { if (operationName == "NOTIFICATION") { @@ -159,16 +158,14 @@ function runOperation(operationName) { var payload, serviceEndPoint; if (list[platformTypeConstants.IOS]) { - payload = operationModule. - generatePayload(platformTypeConstants.IOS, operationName, list[platformTypeConstants.IOS]); + payload = operationModule.generatePayload(platformTypeConstants.IOS, operationName, list[platformTypeConstants.IOS]); serviceEndPoint = operationModule.getIOSServiceEndpoint(operationName); } else if (list[platformTypeConstants.ANDROID]) { payload = operationModule .generatePayload(platformTypeConstants.ANDROID, operationName, list[platformTypeConstants.ANDROID]); serviceEndPoint = operationModule.getAndroidServiceEndpoint(operationName); } else if (list[platformTypeConstants.WINDOWS]) { - payload = operationModule. - generatePayload(platformTypeConstants.WINDOWS, operationName, list[platformTypeConstants.WINDOWS]); + payload = operationModule.generatePayload(platformTypeConstants.WINDOWS, operationName, list[platformTypeConstants.WINDOWS]); serviceEndPoint = operationModule.getWindowsServiceEndpoint(operationName); } if (operationName == "NOTIFICATION") { @@ -185,7 +182,6 @@ function runOperation(operationName) { hidePopup(); } } else { - console.log(serviceEndPoint); invokerUtil.post(serviceEndPoint, payload, successCallback, errorCallback); $(modalPopupContent).removeData(); hidePopup(); 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.operation-bar/public/templates/hidden-operations-android.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.operation-bar/public/templates/hidden-operations-android.hbs index ad8959bf0f..b92461ff74 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.operation-bar/public/templates/hidden-operations-android.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.operation-bar/public/templates/hidden-operations-android.hbs @@ -1,304 +1,286 @@
    -
    - + -
    + Wi-fi + +
    +
    - -
    -
    - +
    +
    + +
    + Configure +
    - Configure -
    -
    -
    - +
    - + +
    + +
    -
    - -
    + +
    + +
    - + +
    + +
    -
    - -
    + +
    + +
    - + +
    + +
    -
    - -
    +
    + +
    - +
    + +
    -
    - + Configure +
    +
    + -
    - -
    + +
    +
    + + +
    + +
    -
    - + + +
    + +
    + Configure
    - Configure -
    -
    -
    - - - -
    -
    - - -
    -
    - - - -
    - -
    - Configure -
    - -
    - - -
    -
    - +
    + -
    - -
    -
    - -
    - +
    + +
    +
    + +
    + -
    - +
    + +
    + Install +
    - Install -
    -
    -
    - +
    + -
    - -
    - +
    + +
    + -
    - +
    + +
    + Install +
    - Install -
    -
    -
    - +
    + + +
    + +
    + Uninstall +
    - Uninstall - - - + - -
    -
    - +
    +
    + +
    + Configure +
    - Configure
    + - - - \ No newline at end of file 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.operation-bar/public/templates/operations.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.operation-bar/public/templates/operations.hbs index e2fcd8f2cb..e04f1e8816 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.operation-bar/public/templates/operations.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.operation-bar/public/templates/operations.hbs @@ -12,7 +12,6 @@

    Please select a device or a list of devices to perform an operation.

    -
    Ok
    @@ -34,7 +33,6 @@

    Unexpected error occurred. Please Try again later.

    -
    Ok
    @@ -56,7 +54,6 @@

    Operation has been queued successfully to be sent to the device.

    -
    Ok
    @@ -79,7 +76,6 @@

    Message has been queued to be sent to the device.

    -
    Ok
    @@ -107,14 +103,11 @@

    {{#equal code "WIPE_DATA"}} {{#equal type "android"}} - Enter PIN code (Optional - This is required only if the device type - is BYOD). + Enter PIN code (Optional - This is required only if the device type is BYOD).

    -
    - +

    {{/equal}} @@ -122,25 +115,115 @@ {{#equal code "NOTIFICATION"}} Type your message below.

    - -