|
|
@ -27,6 +27,11 @@ function operationSelect(selection) {
|
|
|
|
showPopup();
|
|
|
|
showPopup();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var resetLoader = function () {
|
|
|
|
|
|
|
|
$("#btnSend").removeClass("hidden");
|
|
|
|
|
|
|
|
$('#lbl-execution').addClass("hidden");
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
function submitForm(formId) {
|
|
|
|
function submitForm(formId) {
|
|
|
|
$("#btnSend").addClass("hidden");
|
|
|
|
$("#btnSend").addClass("hidden");
|
|
|
|
$("#lbl-execution").removeClass("hidden");
|
|
|
|
$("#lbl-execution").removeClass("hidden");
|
|
|
@ -48,9 +53,9 @@ 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") {
|
|
|
|
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");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -58,71 +63,74 @@ function submitForm(formId) {
|
|
|
|
uri += uriencodedQueryStr;
|
|
|
|
uri += uriencodedQueryStr;
|
|
|
|
var httpMethod = form.attr("method").toUpperCase();
|
|
|
|
var httpMethod = form.attr("method").toUpperCase();
|
|
|
|
//var contentType = form.attr("enctype");
|
|
|
|
//var contentType = form.attr("enctype");
|
|
|
|
|
|
|
|
var validaterString = validatePayload(operationCode, payload);
|
|
|
|
|
|
|
|
|
|
|
|
if (contentType == undefined || contentType == "") {
|
|
|
|
if (validaterString == "OK") {
|
|
|
|
contentType = "application/x-www-form-urlencoded";
|
|
|
|
|
|
|
|
payload = uriencodedFormStr;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//setting responses callbacks
|
|
|
|
if (contentType == undefined || contentType == "") {
|
|
|
|
var defaultStatusClasses = "fw fw-stack-1x";
|
|
|
|
contentType = "application/x-www-form-urlencoded";
|
|
|
|
var content = $("#operation-response-template").find(".content");
|
|
|
|
payload = uriencodedFormStr;
|
|
|
|
var title = content.find("#title");
|
|
|
|
}
|
|
|
|
var statusIcon = content.find("#status-icon");
|
|
|
|
|
|
|
|
var description = content.find("#description");
|
|
|
|
|
|
|
|
description.html("");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var resetLoader = function () {
|
|
|
|
//setting responses callbacks
|
|
|
|
$("#btnSend").removeClass("hidden");
|
|
|
|
var defaultStatusClasses = "fw fw-stack-1x";
|
|
|
|
$('#lbl-execution').addClass("hidden");
|
|
|
|
var content = $("#operation-response-template").find(".content");
|
|
|
|
};
|
|
|
|
var title = content.find("#title");
|
|
|
|
|
|
|
|
var statusIcon = content.find("#status-icon");
|
|
|
|
|
|
|
|
var description = content.find("#description");
|
|
|
|
|
|
|
|
description.html("");
|
|
|
|
|
|
|
|
|
|
|
|
var successCallBack = function (response) {
|
|
|
|
var successCallBack = function (response) {
|
|
|
|
var res = response;
|
|
|
|
var res = response;
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
res = JSON.parse(response).messageFromServer;
|
|
|
|
res = JSON.parse(response).messageFromServer;
|
|
|
|
} catch (err) {
|
|
|
|
} catch (err) {
|
|
|
|
//do nothing
|
|
|
|
//do nothing
|
|
|
|
}
|
|
|
|
}
|
|
|
|
title.html("Operation Triggered!");
|
|
|
|
title.html("Operation Triggered!");
|
|
|
|
statusIcon.attr("class", defaultStatusClasses + " fw-check");
|
|
|
|
statusIcon.attr("class", defaultStatusClasses + " fw-check");
|
|
|
|
description.html(res);
|
|
|
|
description.html(res);
|
|
|
|
// console.log("success!");
|
|
|
|
// console.log("success!");
|
|
|
|
resetLoader();
|
|
|
|
resetLoader();
|
|
|
|
$(modalPopupContent).html(content.html());
|
|
|
|
$(modalPopupContent).html(content.html());
|
|
|
|
};
|
|
|
|
};
|
|
|
|
var errorCallBack = function (response) {
|
|
|
|
var errorCallBack = function (response) {
|
|
|
|
// console.log(response);
|
|
|
|
// console.log(response);
|
|
|
|
title.html("An Error Occurred!");
|
|
|
|
title.html("An Error Occurred!");
|
|
|
|
statusIcon.attr("class", defaultStatusClasses + " fw-error");
|
|
|
|
statusIcon.attr("class", defaultStatusClasses + " fw-error");
|
|
|
|
var reason = (response.responseText == "null")?response.statusText:response.responseText;
|
|
|
|
var reason = (response.responseText == "null") ? response.statusText : response.responseText;
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
reason = JSON.parse(reason).message;
|
|
|
|
reason = JSON.parse(reason).message;
|
|
|
|
} catch (err) {
|
|
|
|
} catch (err) {
|
|
|
|
//do nothing
|
|
|
|
//do nothing
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
description.html(reason);
|
|
|
|
|
|
|
|
// console.log("Error!");
|
|
|
|
|
|
|
|
resetLoader();
|
|
|
|
|
|
|
|
$(modalPopupContent).html(content.html());
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
//executing http request
|
|
|
|
|
|
|
|
if (httpMethod == "GET") {
|
|
|
|
|
|
|
|
invokerUtil.get(uri, successCallBack, errorCallBack, contentType);
|
|
|
|
|
|
|
|
} else if (httpMethod == "POST") {
|
|
|
|
|
|
|
|
var deviceList = [deviceId];
|
|
|
|
|
|
|
|
payload = generatePayload(operationCode, payload, deviceList);
|
|
|
|
|
|
|
|
invokerUtil.post(uri, payload, successCallBack, errorCallBack, contentType);
|
|
|
|
|
|
|
|
} else if (httpMethod == "PUT") {
|
|
|
|
|
|
|
|
invokerUtil.put(uri, payload, successCallBack, errorCallBack, contentType);
|
|
|
|
|
|
|
|
} else if (httpMethod == "DELETE") {
|
|
|
|
|
|
|
|
invokerUtil.delete(uri, successCallBack, errorCallBack, contentType);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
title.html("An Error Occurred!");
|
|
|
|
|
|
|
|
statusIcon.attr("class", defaultStatusClasses + " fw-error");
|
|
|
|
|
|
|
|
description.html("This operation requires http method: " + httpMethod + " which is not supported yet!");
|
|
|
|
|
|
|
|
resetLoader();
|
|
|
|
|
|
|
|
$(modalPopupContent).html(content.html());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
description.html(reason);
|
|
|
|
|
|
|
|
// console.log("Error!");
|
|
|
|
|
|
|
|
resetLoader();
|
|
|
|
|
|
|
|
$(modalPopupContent).html(content.html());
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
//executing http request
|
|
|
|
|
|
|
|
if (httpMethod == "GET") {
|
|
|
|
|
|
|
|
invokerUtil.get(uri, successCallBack, errorCallBack, contentType);
|
|
|
|
|
|
|
|
} else if (httpMethod == "POST") {
|
|
|
|
|
|
|
|
var deviceList = [deviceId];
|
|
|
|
|
|
|
|
payload = generatePayload(operationCode, payload, deviceList);
|
|
|
|
|
|
|
|
invokerUtil.post(uri, payload, successCallBack, errorCallBack, contentType);
|
|
|
|
|
|
|
|
} else if (httpMethod == "PUT") {
|
|
|
|
|
|
|
|
invokerUtil.put(uri, payload, successCallBack, errorCallBack, contentType);
|
|
|
|
|
|
|
|
} else if (httpMethod == "DELETE") {
|
|
|
|
|
|
|
|
invokerUtil.delete(uri, successCallBack, errorCallBack, contentType);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
title.html("An Error Occurred!");
|
|
|
|
|
|
|
|
statusIcon.attr("class", defaultStatusClasses + " fw-error");
|
|
|
|
|
|
|
|
description.html("This operation requires http method: " + httpMethod + " which is not supported yet!");
|
|
|
|
|
|
|
|
resetLoader();
|
|
|
|
resetLoader();
|
|
|
|
$(modalPopupContent).html(content.html());
|
|
|
|
$(".modal #operation-error-msg span").text(validaterString);
|
|
|
|
|
|
|
|
$(".modal #operation-error-msg").removeClass("hidden");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -161,6 +169,21 @@ var operationTypeConstants = {
|
|
|
|
"COMMAND": "command"
|
|
|
|
"COMMAND": "command"
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function validatePayload(operationCode, payload) {
|
|
|
|
|
|
|
|
console.log(payload);
|
|
|
|
|
|
|
|
var returnVal = "OK";
|
|
|
|
|
|
|
|
switch (operationCode) {
|
|
|
|
|
|
|
|
case "NOTIFICATION":
|
|
|
|
|
|
|
|
if (!payload.messageText) {
|
|
|
|
|
|
|
|
returnVal = "Message Body Can't be empty !";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return returnVal;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var generatePayload = function (operationCode, operationData, deviceList) {
|
|
|
|
var generatePayload = function (operationCode, operationData, deviceList) {
|
|
|
|
var payload;
|
|
|
|
var payload;
|
|
|
@ -170,40 +193,40 @@ var generatePayload = function (operationCode, operationData, deviceList) {
|
|
|
|
operationType = operationTypeConstants["PROFILE"];
|
|
|
|
operationType = operationTypeConstants["PROFILE"];
|
|
|
|
payload = {
|
|
|
|
payload = {
|
|
|
|
"operation": {
|
|
|
|
"operation": {
|
|
|
|
"CAMERA" : operationData["cameraEnabled"],
|
|
|
|
"CAMERA": operationData["cameraEnabled"],
|
|
|
|
"DISALLOW_ADJUST_VOLUME" : operationData["disallowAdjustVolumeEnabled"],
|
|
|
|
"DISALLOW_ADJUST_VOLUME": operationData["disallowAdjustVolumeEnabled"],
|
|
|
|
"DISALLOW_CONFIG_BLUETOOTH" : operationData["disallowConfigBluetooth"],
|
|
|
|
"DISALLOW_CONFIG_BLUETOOTH": operationData["disallowConfigBluetooth"],
|
|
|
|
"DISALLOW_CONFIG_CELL_BROADCASTS" : operationData["disallowConfigCellBroadcasts"],
|
|
|
|
"DISALLOW_CONFIG_CELL_BROADCASTS": operationData["disallowConfigCellBroadcasts"],
|
|
|
|
"DISALLOW_CONFIG_CREDENTIALS" : operationData["disallowConfigCredentials"],
|
|
|
|
"DISALLOW_CONFIG_CREDENTIALS": operationData["disallowConfigCredentials"],
|
|
|
|
"DISALLOW_CONFIG_MOBILE_NETWORKS" : operationData["disallowConfigMobileNetworks"],
|
|
|
|
"DISALLOW_CONFIG_MOBILE_NETWORKS": operationData["disallowConfigMobileNetworks"],
|
|
|
|
"DISALLOW_CONFIG_TETHERING" : operationData["disallowConfigTethering"],
|
|
|
|
"DISALLOW_CONFIG_TETHERING": operationData["disallowConfigTethering"],
|
|
|
|
"DISALLOW_CONFIG_VPN" : operationData["disallowConfigVpn"],
|
|
|
|
"DISALLOW_CONFIG_VPN": operationData["disallowConfigVpn"],
|
|
|
|
"DISALLOW_CONFIG_WIFI" : operationData["disallowConfigWifi"],
|
|
|
|
"DISALLOW_CONFIG_WIFI": operationData["disallowConfigWifi"],
|
|
|
|
"DISALLOW_APPS_CONTROL" : operationData["disallowAppControl"],
|
|
|
|
"DISALLOW_APPS_CONTROL": operationData["disallowAppControl"],
|
|
|
|
"DISALLOW_CREATE_WINDOWS" : operationData["disallowCreateWindows"],
|
|
|
|
"DISALLOW_CREATE_WINDOWS": operationData["disallowCreateWindows"],
|
|
|
|
"DISALLOW_CROSS_PROFILE_COPY_PASTE" : operationData["disallowCrossProfileCopyPaste"],
|
|
|
|
"DISALLOW_CROSS_PROFILE_COPY_PASTE": operationData["disallowCrossProfileCopyPaste"],
|
|
|
|
"DISALLOW_DEBUGGING_FEATURES" : operationData["disallowDebugging"],
|
|
|
|
"DISALLOW_DEBUGGING_FEATURES": operationData["disallowDebugging"],
|
|
|
|
"DISALLOW_FACTORY_RESET" : operationData["disallowFactoryReset"],
|
|
|
|
"DISALLOW_FACTORY_RESET": operationData["disallowFactoryReset"],
|
|
|
|
"DISALLOW_ADD_USER" : operationData["disallowAddUser"],
|
|
|
|
"DISALLOW_ADD_USER": operationData["disallowAddUser"],
|
|
|
|
"DISALLOW_INSTALL_APPS" : operationData["disallowInstallApps"],
|
|
|
|
"DISALLOW_INSTALL_APPS": operationData["disallowInstallApps"],
|
|
|
|
"DISALLOW_INSTALL_UNKNOWN_SOURCES" : operationData["disallowInstallUnknownSources"],
|
|
|
|
"DISALLOW_INSTALL_UNKNOWN_SOURCES": operationData["disallowInstallUnknownSources"],
|
|
|
|
"DISALLOW_MODIFY_ACCOUNTS" : operationData["disallowModifyAccounts"],
|
|
|
|
"DISALLOW_MODIFY_ACCOUNTS": operationData["disallowModifyAccounts"],
|
|
|
|
"DISALLOW_MOUNT_PHYSICAL_MEDIA" : operationData["disallowMountPhysicalMedia"],
|
|
|
|
"DISALLOW_MOUNT_PHYSICAL_MEDIA": operationData["disallowMountPhysicalMedia"],
|
|
|
|
"DISALLOW_NETWORK_RESET" : operationData["disallowNetworkReset"],
|
|
|
|
"DISALLOW_NETWORK_RESET": operationData["disallowNetworkReset"],
|
|
|
|
"DISALLOW_OUTGOING_BEAM" : operationData["disallowOutgoingBeam"],
|
|
|
|
"DISALLOW_OUTGOING_BEAM": operationData["disallowOutgoingBeam"],
|
|
|
|
"DISALLOW_OUTGOING_CALLS" : operationData["disallowOutgoingCalls"],
|
|
|
|
"DISALLOW_OUTGOING_CALLS": operationData["disallowOutgoingCalls"],
|
|
|
|
"DISALLOW_REMOVE_USER" : operationData["disallowRemoveUser"],
|
|
|
|
"DISALLOW_REMOVE_USER": operationData["disallowRemoveUser"],
|
|
|
|
"DISALLOW_SAFE_BOOT" : operationData["disallowSafeBoot"],
|
|
|
|
"DISALLOW_SAFE_BOOT": operationData["disallowSafeBoot"],
|
|
|
|
"DISALLOW_SHARE_LOCATION" : operationData["disallowLocationSharing"],
|
|
|
|
"DISALLOW_SHARE_LOCATION": operationData["disallowLocationSharing"],
|
|
|
|
"DISALLOW_SMS" : operationData["disallowSMS"],
|
|
|
|
"DISALLOW_SMS": operationData["disallowSMS"],
|
|
|
|
"DISALLOW_UNINSTALL_APPS" : operationData["disallowUninstallApps"],
|
|
|
|
"DISALLOW_UNINSTALL_APPS": operationData["disallowUninstallApps"],
|
|
|
|
"DISALLOW_UNMUTE_MICROPHONE" : operationData["disallowUnmuteMicrophone"],
|
|
|
|
"DISALLOW_UNMUTE_MICROPHONE": operationData["disallowUnmuteMicrophone"],
|
|
|
|
"DISALLOW_USB_FILE_TRANSFER" : operationData["disallowUSBFileTransfer"],
|
|
|
|
"DISALLOW_USB_FILE_TRANSFER": operationData["disallowUSBFileTransfer"],
|
|
|
|
"ALLOW_PARENT_PROFILE_APP_LINKING" : operationData["disallowParentProfileAppLinking"],
|
|
|
|
"ALLOW_PARENT_PROFILE_APP_LINKING": operationData["disallowParentProfileAppLinking"],
|
|
|
|
"ENSURE_VERIFY_APPS" : operationData["ensureVerifyApps"],
|
|
|
|
"ENSURE_VERIFY_APPS": operationData["ensureVerifyApps"],
|
|
|
|
"AUTO_TIME" : operationData["enableAutoTime"],
|
|
|
|
"AUTO_TIME": operationData["enableAutoTime"],
|
|
|
|
"SET_SCREEN_CAPTURE_DISABLED" : operationData["disableScreenCapture"],
|
|
|
|
"SET_SCREEN_CAPTURE_DISABLED": operationData["disableScreenCapture"],
|
|
|
|
"SET_STATUS_BAR_DISABLED" : operationData["disableStatusBar"]
|
|
|
|
"SET_STATUS_BAR_DISABLED": operationData["disableStatusBar"]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
break;
|
|
|
|
break;
|
|
|
@ -211,7 +234,7 @@ var generatePayload = function (operationCode, operationData, deviceList) {
|
|
|
|
operationType = operationTypeConstants["PROFILE"];
|
|
|
|
operationType = operationTypeConstants["PROFILE"];
|
|
|
|
payload = {
|
|
|
|
payload = {
|
|
|
|
"operation": {
|
|
|
|
"operation": {
|
|
|
|
"lockCode" : operationData["lockCode"]
|
|
|
|
"lockCode": operationData["lockCode"]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
break;
|
|
|
|
break;
|
|
|
@ -219,7 +242,7 @@ var generatePayload = function (operationCode, operationData, deviceList) {
|
|
|
|
operationType = operationTypeConstants["PROFILE"];
|
|
|
|
operationType = operationTypeConstants["PROFILE"];
|
|
|
|
payload = {
|
|
|
|
payload = {
|
|
|
|
"operation": {
|
|
|
|
"operation": {
|
|
|
|
"encrypted" : operationData["encryptStorageEnabled"]
|
|
|
|
"encrypted": operationData["encryptStorageEnabled"]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
break;
|
|
|
|
break;
|
|
|
@ -228,8 +251,8 @@ var generatePayload = function (operationCode, operationData, deviceList) {
|
|
|
|
payload = {
|
|
|
|
payload = {
|
|
|
|
"operation": {
|
|
|
|
"operation": {
|
|
|
|
//"message" : operationData["message"]
|
|
|
|
//"message" : operationData["message"]
|
|
|
|
"messageText": operationData["messageText"],
|
|
|
|
"messageTitle": operationData["messageTitle"],
|
|
|
|
"messageTitle": operationData["messageTitle"]
|
|
|
|
"messageText": operationData["messageText"]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
break;
|
|
|
|
break;
|
|
|
@ -237,8 +260,8 @@ var generatePayload = function (operationCode, operationData, deviceList) {
|
|
|
|
operationType = operationTypeConstants["PROFILE"];
|
|
|
|
operationType = operationTypeConstants["PROFILE"];
|
|
|
|
payload = {
|
|
|
|
payload = {
|
|
|
|
"operation": {
|
|
|
|
"operation": {
|
|
|
|
"schedule" : operationData["schedule"],
|
|
|
|
"schedule": operationData["schedule"],
|
|
|
|
"server" : operationData["server"]
|
|
|
|
"server": operationData["server"]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
break;
|
|
|
|
break;
|
|
|
@ -246,7 +269,7 @@ var generatePayload = function (operationCode, operationData, deviceList) {
|
|
|
|
operationType = operationTypeConstants["PROFILE"];
|
|
|
|
operationType = operationTypeConstants["PROFILE"];
|
|
|
|
payload = {
|
|
|
|
payload = {
|
|
|
|
"operation": {
|
|
|
|
"operation": {
|
|
|
|
"pin" : operationData["pin"]
|
|
|
|
"pin": operationData["pin"]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
break;
|
|
|
|
break;
|
|
|
@ -255,15 +278,15 @@ var generatePayload = function (operationCode, operationData, deviceList) {
|
|
|
|
payload = {
|
|
|
|
payload = {
|
|
|
|
"operation": {
|
|
|
|
"operation": {
|
|
|
|
"ssid": operationData["wifiSSID"],
|
|
|
|
"ssid": operationData["wifiSSID"],
|
|
|
|
"type": operationData["wifiType"],
|
|
|
|
"type": operationData["wifiType"],
|
|
|
|
"password" : operationData["wifiPassword"],
|
|
|
|
"password": operationData["wifiPassword"],
|
|
|
|
"eap" : operationData["wifiEAP"],
|
|
|
|
"eap": operationData["wifiEAP"],
|
|
|
|
"phase2" : operationData["wifiPhase2"],
|
|
|
|
"phase2": operationData["wifiPhase2"],
|
|
|
|
"provisioning" : operationData["wifiProvisioning"],
|
|
|
|
"provisioning": operationData["wifiProvisioning"],
|
|
|
|
"identity" : operationData["wifiIdentity"],
|
|
|
|
"identity": operationData["wifiIdentity"],
|
|
|
|
"anonymousIdentity" : operationData["wifiAnoIdentity"],
|
|
|
|
"anonymousIdentity": operationData["wifiAnoIdentity"],
|
|
|
|
"cacert" : operationData["wifiCaCert"],
|
|
|
|
"cacert": operationData["wifiCaCert"],
|
|
|
|
"cacertName" : operationData["wifiCaCertName"]
|
|
|
|
"cacertName": operationData["wifiCaCertName"]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
break;
|
|
|
|
break;
|
|
|
@ -282,8 +305,8 @@ var generatePayload = function (operationCode, operationData, deviceList) {
|
|
|
|
operationType = operationTypeConstants["PROFILE"];
|
|
|
|
operationType = operationTypeConstants["PROFILE"];
|
|
|
|
payload = {
|
|
|
|
payload = {
|
|
|
|
"operation": {
|
|
|
|
"operation": {
|
|
|
|
"message" : operationData["lock-message"],
|
|
|
|
"message": operationData["lock-message"],
|
|
|
|
"isHardLockEnabled" : operationData["hard-lock"]
|
|
|
|
"isHardLockEnabled": operationData["hard-lock"]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
break;
|
|
|
|
break;
|
|
|
@ -375,39 +398,39 @@ var androidOperationConstants = {
|
|
|
|
"LOCK_OPERATION_CODE": "DEVICE_LOCK",
|
|
|
|
"LOCK_OPERATION_CODE": "DEVICE_LOCK",
|
|
|
|
"UPGRADE_FIRMWARE": "UPGRADE_FIRMWARE",
|
|
|
|
"UPGRADE_FIRMWARE": "UPGRADE_FIRMWARE",
|
|
|
|
"DISALLOW_ADJUST_VOLUME": "DISALLOW_ADJUST_VOLUME",
|
|
|
|
"DISALLOW_ADJUST_VOLUME": "DISALLOW_ADJUST_VOLUME",
|
|
|
|
"DISALLOW_CONFIG_BLUETOOTH" : "DISALLOW_CONFIG_BLUETOOTH",
|
|
|
|
"DISALLOW_CONFIG_BLUETOOTH": "DISALLOW_CONFIG_BLUETOOTH",
|
|
|
|
"DISALLOW_CONFIG_CELL_BROADCASTS" : "DISALLOW_CONFIG_CELL_BROADCASTS",
|
|
|
|
"DISALLOW_CONFIG_CELL_BROADCASTS": "DISALLOW_CONFIG_CELL_BROADCASTS",
|
|
|
|
"DISALLOW_CONFIG_CREDENTIALS" : "DISALLOW_CONFIG_CREDENTIALS",
|
|
|
|
"DISALLOW_CONFIG_CREDENTIALS": "DISALLOW_CONFIG_CREDENTIALS",
|
|
|
|
"DISALLOW_CONFIG_MOBILE_NETWORKS" : "DISALLOW_CONFIG_MOBILE_NETWORKS",
|
|
|
|
"DISALLOW_CONFIG_MOBILE_NETWORKS": "DISALLOW_CONFIG_MOBILE_NETWORKS",
|
|
|
|
"DISALLOW_CONFIG_TETHERING" : "DISALLOW_CONFIG_TETHERING",
|
|
|
|
"DISALLOW_CONFIG_TETHERING": "DISALLOW_CONFIG_TETHERING",
|
|
|
|
"DISALLOW_CONFIG_VPN" : "DISALLOW_CONFIG_VPN",
|
|
|
|
"DISALLOW_CONFIG_VPN": "DISALLOW_CONFIG_VPN",
|
|
|
|
"DISALLOW_CONFIG_WIFI" : "DISALLOW_CONFIG_WIFI",
|
|
|
|
"DISALLOW_CONFIG_WIFI": "DISALLOW_CONFIG_WIFI",
|
|
|
|
"DISALLOW_APPS_CONTROL" : "DISALLOW_APPS_CONTROL",
|
|
|
|
"DISALLOW_APPS_CONTROL": "DISALLOW_APPS_CONTROL",
|
|
|
|
"DISALLOW_CREATE_WINDOWS" : "DISALLOW_CREATE_WINDOWS",
|
|
|
|
"DISALLOW_CREATE_WINDOWS": "DISALLOW_CREATE_WINDOWS",
|
|
|
|
"DISALLOW_CROSS_PROFILE_COPY_PASTE" : "DISALLOW_CROSS_PROFILE_COPY_PASTE",
|
|
|
|
"DISALLOW_CROSS_PROFILE_COPY_PASTE": "DISALLOW_CROSS_PROFILE_COPY_PASTE",
|
|
|
|
"DISALLOW_DEBUGGING_FEATURES" : "DISALLOW_DEBUGGING_FEATURES",
|
|
|
|
"DISALLOW_DEBUGGING_FEATURES": "DISALLOW_DEBUGGING_FEATURES",
|
|
|
|
"DISALLOW_FACTORY_RESET" : "DISALLOW_FACTORY_RESET",
|
|
|
|
"DISALLOW_FACTORY_RESET": "DISALLOW_FACTORY_RESET",
|
|
|
|
"DISALLOW_ADD_USER" : "DISALLOW_ADD_USER",
|
|
|
|
"DISALLOW_ADD_USER": "DISALLOW_ADD_USER",
|
|
|
|
"DISALLOW_INSTALL_APPS" : "DISALLOW_INSTALL_APPS",
|
|
|
|
"DISALLOW_INSTALL_APPS": "DISALLOW_INSTALL_APPS",
|
|
|
|
"DISALLOW_INSTALL_UNKNOWN_SOURCES" : "DISALLOW_INSTALL_UNKNOWN_SOURCES",
|
|
|
|
"DISALLOW_INSTALL_UNKNOWN_SOURCES": "DISALLOW_INSTALL_UNKNOWN_SOURCES",
|
|
|
|
"DISALLOW_MODIFY_ACCOUNTS" : "DISALLOW_MODIFY_ACCOUNTS",
|
|
|
|
"DISALLOW_MODIFY_ACCOUNTS": "DISALLOW_MODIFY_ACCOUNTS",
|
|
|
|
"DISALLOW_MOUNT_PHYSICAL_MEDIA" : "DISALLOW_MOUNT_PHYSICAL_MEDIA",
|
|
|
|
"DISALLOW_MOUNT_PHYSICAL_MEDIA": "DISALLOW_MOUNT_PHYSICAL_MEDIA",
|
|
|
|
"DISALLOW_NETWORK_RESET" : "DISALLOW_NETWORK_RESET",
|
|
|
|
"DISALLOW_NETWORK_RESET": "DISALLOW_NETWORK_RESET",
|
|
|
|
"DISALLOW_OUTGOING_BEAM" : "DISALLOW_OUTGOING_BEAM",
|
|
|
|
"DISALLOW_OUTGOING_BEAM": "DISALLOW_OUTGOING_BEAM",
|
|
|
|
"DISALLOW_OUTGOING_CALLS" : "DISALLOW_OUTGOING_CALLS",
|
|
|
|
"DISALLOW_OUTGOING_CALLS": "DISALLOW_OUTGOING_CALLS",
|
|
|
|
"DISALLOW_REMOVE_USER" : "DISALLOW_REMOVE_USER",
|
|
|
|
"DISALLOW_REMOVE_USER": "DISALLOW_REMOVE_USER",
|
|
|
|
"DISALLOW_SAFE_BOOT" : "DISALLOW_SAFE_BOOT",
|
|
|
|
"DISALLOW_SAFE_BOOT": "DISALLOW_SAFE_BOOT",
|
|
|
|
"DISALLOW_SHARE_LOCATION" : "DISALLOW_SHARE_LOCATION",
|
|
|
|
"DISALLOW_SHARE_LOCATION": "DISALLOW_SHARE_LOCATION",
|
|
|
|
"DISALLOW_SMS" : "DISALLOW_SMS",
|
|
|
|
"DISALLOW_SMS": "DISALLOW_SMS",
|
|
|
|
"DISALLOW_UNINSTALL_APPS" : "DISALLOW_UNINSTALL_APPS",
|
|
|
|
"DISALLOW_UNINSTALL_APPS": "DISALLOW_UNINSTALL_APPS",
|
|
|
|
"DISALLOW_UNMUTE_MICROPHONE" : "DISALLOW_UNMUTE_MICROPHONE",
|
|
|
|
"DISALLOW_UNMUTE_MICROPHONE": "DISALLOW_UNMUTE_MICROPHONE",
|
|
|
|
"DISALLOW_USB_FILE_TRANSFER" : "DISALLOW_USB_FILE_TRANSFER",
|
|
|
|
"DISALLOW_USB_FILE_TRANSFER": "DISALLOW_USB_FILE_TRANSFER",
|
|
|
|
"ALLOW_PARENT_PROFILE_APP_LINKING" : "ALLOW_PARENT_PROFILE_APP_LINKING",
|
|
|
|
"ALLOW_PARENT_PROFILE_APP_LINKING": "ALLOW_PARENT_PROFILE_APP_LINKING",
|
|
|
|
"ENSURE_VERIFY_APPS" : "ENSURE_VERIFY_APPS",
|
|
|
|
"ENSURE_VERIFY_APPS": "ENSURE_VERIFY_APPS",
|
|
|
|
"AUTO_TIME" : "AUTO_TIME",
|
|
|
|
"AUTO_TIME": "AUTO_TIME",
|
|
|
|
"SET_SCREEN_CAPTURE_DISABLED" : "SET_SCREEN_CAPTURE_DISABLED",
|
|
|
|
"SET_SCREEN_CAPTURE_DISABLED": "SET_SCREEN_CAPTURE_DISABLED",
|
|
|
|
"SET_STATUS_BAR_DISABLED" : "SET_STATUS_BAR_DISABLED",
|
|
|
|
"SET_STATUS_BAR_DISABLED": "SET_STATUS_BAR_DISABLED",
|
|
|
|
"APPLICATION_OPERATION_CODE":"APP-RESTRICTION",
|
|
|
|
"APPLICATION_OPERATION_CODE": "APP-RESTRICTION",
|
|
|
|
"SYSTEM_UPDATE_POLICY_CODE": "SYSTEM_UPDATE_POLICY",
|
|
|
|
"SYSTEM_UPDATE_POLICY_CODE": "SYSTEM_UPDATE_POLICY",
|
|
|
|
"KIOSK_APPS_CODE": "KIOSK_APPS"
|
|
|
|
"KIOSK_APPS_CODE": "KIOSK_APPS"
|
|
|
|
};
|
|
|
|
};
|