From a6634345ddfcb1574845bddd6c3f10f129bb13b5 Mon Sep 17 00:00:00 2001 From: Rasika Perera Date: Wed, 5 Jul 2017 23:21:57 +0530 Subject: [PATCH] Fixing https://github.com/wso2/product-iots/issues/1063: Adding filters for the android features --- .../operation-bar.hbs | 2 +- .../operation-bar.js | 2 +- .../private/config.json | 4 ++-- .../operation-bar.js | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) 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.operation-bar/operation-bar.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.operation-bar/operation-bar.hbs index 6e2cf569a..9b6a253ef 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.operation-bar/operation-bar.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.operation-bar/operation-bar.hbs @@ -36,7 +36,7 @@ } {{#each controlOperations}} - + {{#if iconFont}} {{else}} 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.operation-bar/operation-bar.js 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.operation-bar/operation-bar.js index 588380a8e..52e11e8e2 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.operation-bar/operation-bar.js +++ 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.operation-bar/operation-bar.js @@ -24,7 +24,7 @@ function onRequest(context) { var device = context.unit.params.device; var autoCompleteParams = context.unit.params.autoCompleteParams; var encodedFeaturePayloads = context.unit.params.encodedFeaturePayloads; - var allControlOps = operationModule.getControlOperations(device.type); + var allControlOps = operationModule.getControlOperations(device); var filteredControlOps = []; var queryParams = []; var formParams = []; 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.type-view/private/config.json 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.type-view/private/config.json index 2008aad13..652ba230c 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.type-view/private/config.json +++ 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.type-view/private/config.json @@ -68,12 +68,12 @@ }, "DEVICE_REBOOT": { "icon": "fw-refresh", - "isDisabled" : true, + "filter" : {"property" : "ownership", "value" : "COPE", "text": "This feature is only available in COPE/COSU"}, "permission": "/device-mgt/devices/owning-device/operations/android/reboot" }, "UPGRADE_FIRMWARE": { "icon": "fw-hardware", - "isDisabled" : true, + "filter" : {"property" : "ownership", "value" : "COPE", "text": "This feature is only available in COPE/COSU"}, "formParams": [ { "type": "checkbox", diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.windows.new.operation-bar/operation-bar.js b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.windows.new.operation-bar/operation-bar.js index cd5ead0ca..30a8d397f 100644 --- a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.windows.new.operation-bar/operation-bar.js +++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.windows.new.operation-bar/operation-bar.js @@ -22,7 +22,7 @@ function onRequest(context) { var device = context.unit.params.device; var autoCompleteParams = context.unit.params.autoCompleteParams; var encodedFeaturePayloads=context.unit.params.encodedFeaturePayloads; - var controlOperations = operationModule.getControlOperations(device.type); + var controlOperations = operationModule.getControlOperations(device); var queryParams = []; var formParams = []; var pathParams = [];