mirror of
https://repository.entgra.net/community/device-mgt-plugins.git
synced 2025-09-16 23:42:15 +00:00
androif file transfer feature
This commit is contained in:
parent
95f25ad9cb
commit
5049f17b6d
@ -53,7 +53,7 @@ function submitForm(formId) {
|
|||||||
} else if (input.data("param-type") == "form") {
|
} else if (input.data("param-type") == "form") {
|
||||||
var prefix = (uriencodedFormStr == "") ? "" : "&";
|
var prefix = (uriencodedFormStr == "") ? "" : "&";
|
||||||
uriencodedFormStr += prefix + input.attr("id") + "=" + input.val();
|
uriencodedFormStr += prefix + input.attr("id") + "=" + input.val();
|
||||||
if (input.attr("type") == "text") {
|
if (input.attr("type") == "text" || input.attr("type") == "password") {
|
||||||
payload[input.attr("id")] = input.val();
|
payload[input.attr("id")] = input.val();
|
||||||
} else if (input.attr("type") == "checkbox") {
|
} else if (input.attr("type") == "checkbox") {
|
||||||
payload[input.attr("id")] = input.is(":checked");
|
payload[input.attr("id")] = input.is(":checked");
|
||||||
@ -179,6 +179,17 @@ function validatePayload(operationCode, payload) {
|
|||||||
returnVal = "Message Body Can't be empty !";
|
returnVal = "Message Body Can't be empty !";
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case "FILE_TRANSFER":
|
||||||
|
if (!payload.ftpServerAddress) {
|
||||||
|
returnVal = "Please enter FTP server address";
|
||||||
|
}else if(!payload.ftpUserName){
|
||||||
|
returnVal = "Please enter FTP user name";
|
||||||
|
}else if(!payload.ftpPassword){
|
||||||
|
returnVal = "Please enter FTP password";
|
||||||
|
}else if(!payload.fileName){
|
||||||
|
returnVal = "Please enter the name of the file you want to transfer";
|
||||||
|
}
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
"analyticsEnabled": "false",
|
"analyticsEnabled": "false",
|
||||||
"groupingEnabled": "false",
|
"groupingEnabled": "false",
|
||||||
"scopes" : [
|
"scopes" : [
|
||||||
|
"perm:android:file-transfer",
|
||||||
"perm:android:enroll",
|
"perm:android:enroll",
|
||||||
"perm:android:wipe",
|
"perm:android:wipe",
|
||||||
"perm:android:ring",
|
"perm:android:ring",
|
||||||
@ -136,7 +137,7 @@
|
|||||||
"permission": "/device-mgt/devices/owning-device/operations/android/enterprise-wipe"
|
"permission": "/device-mgt/devices/owning-device/operations/android/enterprise-wipe"
|
||||||
},
|
},
|
||||||
"FILE_TRANSFER": {
|
"FILE_TRANSFER": {
|
||||||
"icon": "fw-block",
|
"icon": "fw-save",
|
||||||
"formParams": [
|
"formParams": [
|
||||||
{
|
{
|
||||||
"type": "text",
|
"type": "text",
|
||||||
|
|||||||
@ -87,6 +87,12 @@
|
|||||||
</DataSource>
|
</DataSource>
|
||||||
|
|
||||||
<Features>
|
<Features>
|
||||||
|
<Feature code="FILE_TRANSFER">
|
||||||
|
<Name>File Transfer</Name>
|
||||||
|
<Description>Transfer file to the device</Description>
|
||||||
|
<Operation context="/api/device-mgt/android/v1.0/admin/devices/file-transfer" method="POST" type="application/json">
|
||||||
|
</Operation>
|
||||||
|
</Feature>
|
||||||
<Feature code="DEVICE_RING">
|
<Feature code="DEVICE_RING">
|
||||||
<Name>Ring</Name>
|
<Name>Ring</Name>
|
||||||
<Description>Ring the device</Description>
|
<Description>Ring the device</Description>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user