Fixing https://github.com/wso2/product-iots/issues/1063: Adding filters for the android features

merge-requests/1/head
Rasika Perera 7 years ago
parent 8236e4d2e2
commit a6634345dd

@ -36,7 +36,7 @@
}
</style>
{{#each controlOperations}}
<a {{#unless isDisabled}} href="javascript:operationSelect('{{operation}}')" {{else}} href="javascript:void(0)" class="op-disabled"{{/unless}}>
<a {{#unless isDisabled}} href="javascript:operationSelect('{{operation}}')" {{else}} href="javascript:void(0)" class="op-disabled" title="{{disabledText}}" data-toggle="tooltip" {{/unless}}>
{{#if iconFont}}
<i class="fw {{iconFont}}"></i>
{{else}}

@ -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 = [];

@ -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",

@ -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 = [];

Loading…
Cancel
Save