androif file transfer feature

revert-dabc3590
Nirothipan 7 years ago
parent 95f25ad9cb
commit 5049f17b6d

@ -53,7 +53,7 @@ function submitForm(formId) {
} else if (input.data("param-type") == "form") {
var prefix = (uriencodedFormStr == "") ? "" : "&";
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();
} else if (input.attr("type") == "checkbox") {
payload[input.attr("id")] = input.is(":checked");
@ -179,6 +179,17 @@ function validatePayload(operationCode, payload) {
returnVal = "Message Body Can't be empty !";
}
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:
break;

@ -6,6 +6,7 @@
"analyticsEnabled": "false",
"groupingEnabled": "false",
"scopes" : [
"perm:android:file-transfer",
"perm:android:enroll",
"perm:android:wipe",
"perm:android:ring",
@ -136,7 +137,7 @@
"permission": "/device-mgt/devices/owning-device/operations/android/enterprise-wipe"
},
"FILE_TRANSFER": {
"icon": "fw-block",
"icon": "fw-save",
"formParams": [
{
"type": "text",

@ -87,6 +87,12 @@
</DataSource>
<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">
<Name>Ring</Name>
<Description>Ring the device</Description>

Loading…
Cancel
Save