Merge pull request #743 from rasika/filter-features

Adding filters for the android features
revert-dabc3590
Kamidu Sachith Punchihewa 7 years ago committed by GitHub
commit a601482e66

@ -36,7 +36,7 @@
} }
</style> </style>
{{#each controlOperations}} {{#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}} {{#if iconFont}}
<i class="fw {{iconFont}}"></i> <i class="fw {{iconFont}}"></i>
{{else}} {{else}}

@ -24,7 +24,7 @@ function onRequest(context) {
var device = context.unit.params.device; var device = context.unit.params.device;
var autoCompleteParams = context.unit.params.autoCompleteParams; var autoCompleteParams = context.unit.params.autoCompleteParams;
var encodedFeaturePayloads = context.unit.params.encodedFeaturePayloads; var encodedFeaturePayloads = context.unit.params.encodedFeaturePayloads;
var allControlOps = operationModule.getControlOperations(device.type); var allControlOps = operationModule.getControlOperations(device);
var filteredControlOps = []; var filteredControlOps = [];
var queryParams = []; var queryParams = [];
var formParams = []; var formParams = [];

@ -68,12 +68,12 @@
}, },
"DEVICE_REBOOT": { "DEVICE_REBOOT": {
"icon": "fw-refresh", "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" "permission": "/device-mgt/devices/owning-device/operations/android/reboot"
}, },
"UPGRADE_FIRMWARE": { "UPGRADE_FIRMWARE": {
"icon": "fw-hardware", "icon": "fw-hardware",
"isDisabled" : true, "filter" : {"property" : "ownership", "value" : "COPE", "text": "This feature is only available in COPE/COSU"},
"formParams": [ "formParams": [
{ {
"type": "checkbox", "type": "checkbox",

@ -22,7 +22,7 @@ function onRequest(context) {
var device = context.unit.params.device; var device = context.unit.params.device;
var autoCompleteParams = context.unit.params.autoCompleteParams; var autoCompleteParams = context.unit.params.autoCompleteParams;
var encodedFeaturePayloads=context.unit.params.encodedFeaturePayloads; var encodedFeaturePayloads=context.unit.params.encodedFeaturePayloads;
var controlOperations = operationModule.getControlOperations(device.type); var controlOperations = operationModule.getControlOperations(device);
var queryParams = []; var queryParams = [];
var formParams = []; var formParams = [];
var pathParams = []; var pathParams = [];

Loading…
Cancel
Save