|
|
@ -80,7 +80,9 @@ var operationModule = function () {
|
|
|
|
"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",
|
|
|
|
|
|
|
|
"KIOSK_APPS_CODE": "KIOSK_APPS"
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// Constants to define Windows Operation Constants
|
|
|
|
// Constants to define Windows Operation Constants
|
|
|
@ -893,7 +895,7 @@ var operationModule = function () {
|
|
|
|
"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["diableScreenCapture"],
|
|
|
|
"SET_SCREEN_CAPTURE_DISABLED" : operationData["disableScreenCapture"],
|
|
|
|
"SET_STATUS_BAR_DISABLED" : operationData["disableStatusBar"]
|
|
|
|
"SET_STATUS_BAR_DISABLED" : operationData["disableStatusBar"]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
@ -1012,6 +1014,32 @@ var operationModule = function () {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case androidOperationConstants["SYSTEM_UPDATE_POLICY_CODE"]:
|
|
|
|
|
|
|
|
operationType = operationTypeConstants["PROFILE"];
|
|
|
|
|
|
|
|
if (operationData["cosuSystemUpdatePolicyType"] != "window") {
|
|
|
|
|
|
|
|
payload = {
|
|
|
|
|
|
|
|
"operation": {
|
|
|
|
|
|
|
|
"type": operationData["cosuSystemUpdatePolicyType"]
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
payload = {
|
|
|
|
|
|
|
|
"operation": {
|
|
|
|
|
|
|
|
"type": operationData["cosuSystemUpdatePolicyType"],
|
|
|
|
|
|
|
|
"startTime": operationData["cosuSystemUpdatePolicyWindowStartTime"],
|
|
|
|
|
|
|
|
"endTime": operationData["cosuSystemUpdatePolicyWindowEndTime"]
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case androidOperationConstants["KIOSK_APPS_CODE"]:
|
|
|
|
|
|
|
|
operationType = operationTypeConstants["PROFILE"];
|
|
|
|
|
|
|
|
payload = {
|
|
|
|
|
|
|
|
"operation": {
|
|
|
|
|
|
|
|
"whitelistedApplications": operationData["cosuWhitelistedApplications"]
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
default:
|
|
|
|
// If the operation is neither of above, it is a command operation
|
|
|
|
// If the operation is neither of above, it is a command operation
|
|
|
|
operationType = operationTypeConstants["COMMAND"];
|
|
|
|
operationType = operationTypeConstants["COMMAND"];
|
|
|
@ -1158,29 +1186,13 @@ var operationModule = function () {
|
|
|
|
|
|
|
|
|
|
|
|
publicMethods.getWindowsServiceEndpoint = function (operationCode) {
|
|
|
|
publicMethods.getWindowsServiceEndpoint = function (operationCode) {
|
|
|
|
var featureMap = {
|
|
|
|
var featureMap = {
|
|
|
|
"CAMERA": "camera",
|
|
|
|
"DEVICE_LOCK": "lock-devices",
|
|
|
|
"DEVICE_LOCK": "lock",
|
|
|
|
"DEVICE_RING": "ring-devices",
|
|
|
|
"DEVICE_LOCATION": "location",
|
|
|
|
"LOCK_RESET": "lock-reset-devices",
|
|
|
|
"CLEAR_PASSWORD": "clear-password",
|
|
|
|
"WIPE_DATA": "wipe-devices"
|
|
|
|
"APPLICATION_LIST": "get-application-list",
|
|
|
|
|
|
|
|
"DEVICE_RING": "ring-device",
|
|
|
|
|
|
|
|
"DEVICE_REBOOT": "reboot-device",
|
|
|
|
|
|
|
|
"UPGRADE_FIRMWARE": "upgrade-firmware",
|
|
|
|
|
|
|
|
"DEVICE_MUTE": "mute",
|
|
|
|
|
|
|
|
"LOCK_RESET": "lock-reset",
|
|
|
|
|
|
|
|
"NOTIFICATION": "notification",
|
|
|
|
|
|
|
|
"ENCRYPT_STORAGE": "encrypt",
|
|
|
|
|
|
|
|
"CHANGE_LOCK_CODE": "change-lock-code",
|
|
|
|
|
|
|
|
"WEBCLIP": "webclip",
|
|
|
|
|
|
|
|
"INSTALL_APPLICATION": "install-application",
|
|
|
|
|
|
|
|
"UNINSTALL_APPLICATION": "uninstall-application",
|
|
|
|
|
|
|
|
"BLACKLIST_APPLICATIONS": "blacklist-applications",
|
|
|
|
|
|
|
|
"PASSCODE_POLICY": "password-policy",
|
|
|
|
|
|
|
|
"ENTERPRISE_WIPE": "enterprise-wipe",
|
|
|
|
|
|
|
|
"WIPE_DATA": "wipe-data",
|
|
|
|
|
|
|
|
"DISENROLL": "disenroll"
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
return "/mdm-windows-agent/services/windows/operation/" + featureMap[operationCode];
|
|
|
|
//return "/mdm-windows-agent/services/windows/operation/" + featureMap[operationCode];
|
|
|
|
|
|
|
|
return "/api/device-mgt/windows/v1.0/admin/devices/" + featureMap[operationCode];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Get the icon for the featureCode
|
|
|
|
* Get the icon for the featureCode
|
|
|
@ -1213,15 +1225,9 @@ var operationModule = function () {
|
|
|
|
publicMethods.getWindowsIconForFeature = function (operationCode) {
|
|
|
|
publicMethods.getWindowsIconForFeature = function (operationCode) {
|
|
|
|
var featureMap = {
|
|
|
|
var featureMap = {
|
|
|
|
"DEVICE_LOCK": "fw-lock",
|
|
|
|
"DEVICE_LOCK": "fw-lock",
|
|
|
|
"DEVICE_LOCATION": "fw-map-location",
|
|
|
|
|
|
|
|
"DISENROLL": "fw-delete",
|
|
|
|
|
|
|
|
"WIPE_DATA": "fw-clear",
|
|
|
|
|
|
|
|
"DEVICE_RING": "fw-dial-up",
|
|
|
|
"DEVICE_RING": "fw-dial-up",
|
|
|
|
"DEVICE_REBOOT": "fw-refresh",
|
|
|
|
"LOCK_RESET": "fw-key",
|
|
|
|
"UPGRADE_FIRMWARE": "fw-up-arrow",
|
|
|
|
"WIPE_DATA": "fw-clear"
|
|
|
|
"DEVICE_MUTE": "fw-incoming-call",
|
|
|
|
|
|
|
|
"NOTIFICATION": "fw-message",
|
|
|
|
|
|
|
|
"LOCK_RESET": "fw-key"
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
return featureMap[operationCode];
|
|
|
|
return featureMap[operationCode];
|
|
|
|
};
|
|
|
|
};
|
|
|
@ -1272,12 +1278,18 @@ var operationModule = function () {
|
|
|
|
var key = operationDataObj.data("key");
|
|
|
|
var key = operationDataObj.data("key");
|
|
|
|
var value;
|
|
|
|
var value;
|
|
|
|
if (operationDataObj.is(":text") || operationDataObj.is("textarea") ||
|
|
|
|
if (operationDataObj.is(":text") || operationDataObj.is("textarea") ||
|
|
|
|
operationDataObj.is(":password") || operationDataObj.is(":hidden")) {
|
|
|
|
operationDataObj.is(":password") || operationDataObj.is("input[type=hidden]")) {
|
|
|
|
value = operationDataObj.val();
|
|
|
|
value = operationDataObj.val();
|
|
|
|
|
|
|
|
operationData[key] = value;
|
|
|
|
} else if (operationDataObj.is(":checkbox")) {
|
|
|
|
} else if (operationDataObj.is(":checkbox")) {
|
|
|
|
value = operationDataObj.is(":checked");
|
|
|
|
value = operationDataObj.is(":checked");
|
|
|
|
|
|
|
|
operationData[key] = value;
|
|
|
|
|
|
|
|
} else if (operationDataObj.is(":radio") && operationDataObj.is(":checked")) {
|
|
|
|
|
|
|
|
value = operationDataObj.val();
|
|
|
|
|
|
|
|
operationData[key] = value;
|
|
|
|
} else if (operationDataObj.is("select")) {
|
|
|
|
} else if (operationDataObj.is("select")) {
|
|
|
|
value = operationDataObj.find("option:selected").attr("value");
|
|
|
|
value = operationDataObj.find("option:selected").attr("value");
|
|
|
|
|
|
|
|
operationData[key] = value;
|
|
|
|
} else if (operationDataObj.hasClass("grouped-array-input")) {
|
|
|
|
} else if (operationDataObj.hasClass("grouped-array-input")) {
|
|
|
|
value = [];
|
|
|
|
value = [];
|
|
|
|
var childInput;
|
|
|
|
var childInput;
|
|
|
@ -1286,7 +1298,7 @@ var operationModule = function () {
|
|
|
|
$(".child-input", this).each(function () {
|
|
|
|
$(".child-input", this).each(function () {
|
|
|
|
childInput = $(this);
|
|
|
|
childInput = $(this);
|
|
|
|
if (childInput.is(":text") || childInput.is("textarea") || childInput.is(":password")
|
|
|
|
if (childInput.is(":text") || childInput.is("textarea") || childInput.is(":password")
|
|
|
|
|| childInput.is(":hidden")) {
|
|
|
|
|| childInput.is("input[type=hidden]")) {
|
|
|
|
childInputValue = childInput.val();
|
|
|
|
childInputValue = childInput.val();
|
|
|
|
} else if (childInput.is(":checkbox")) {
|
|
|
|
} else if (childInput.is(":checkbox")) {
|
|
|
|
childInputValue = childInput.is(":checked");
|
|
|
|
childInputValue = childInput.is(":checked");
|
|
|
@ -1313,7 +1325,7 @@ var operationModule = function () {
|
|
|
|
$(".child-input", this).each(function () {
|
|
|
|
$(".child-input", this).each(function () {
|
|
|
|
childInput = $(this);
|
|
|
|
childInput = $(this);
|
|
|
|
if (childInput.is(":text") || childInput.is("textarea") || childInput.is(":password")
|
|
|
|
if (childInput.is(":text") || childInput.is("textarea") || childInput.is(":password")
|
|
|
|
|| childInput.is(":hidden")) {
|
|
|
|
|| childInput.is("input[type=hidden]")) {
|
|
|
|
childInputValue = childInput.val();
|
|
|
|
childInputValue = childInput.val();
|
|
|
|
} else if (childInput.is(":checkbox")) {
|
|
|
|
} else if (childInput.is(":checkbox")) {
|
|
|
|
childInputValue = childInput.is(":checked");
|
|
|
|
childInputValue = childInput.is(":checked");
|
|
|
@ -1345,7 +1357,7 @@ var operationModule = function () {
|
|
|
|
childInput = $(this);
|
|
|
|
childInput = $(this);
|
|
|
|
childInputKey = childInput.data("child-key");
|
|
|
|
childInputKey = childInput.data("child-key");
|
|
|
|
if (childInput.is(":text") || childInput.is("textarea") || childInput.is(":password")
|
|
|
|
if (childInput.is(":text") || childInput.is("textarea") || childInput.is(":password")
|
|
|
|
|| childInput.is(":hidden")) {
|
|
|
|
|| childInput.is("input[type=hidden]")) {
|
|
|
|
childInputValue = childInput.val();
|
|
|
|
childInputValue = childInput.val();
|
|
|
|
} else if (childInput.is(":checkbox")) {
|
|
|
|
} else if (childInput.is(":checkbox")) {
|
|
|
|
childInputValue = childInput.is(":checked");
|
|
|
|
childInputValue = childInput.is(":checked");
|
|
|
@ -1369,9 +1381,9 @@ var operationModule = function () {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
operationData[key] = value;
|
|
|
|
operationData[key] = value;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
switch (platformType) {
|
|
|
|
switch (platformType) {
|
|
|
@ -1421,10 +1433,15 @@ var operationModule = function () {
|
|
|
|
// populating input value according to the type of input
|
|
|
|
// populating input value according to the type of input
|
|
|
|
if (operationDataObj.is(":text") ||
|
|
|
|
if (operationDataObj.is(":text") ||
|
|
|
|
operationDataObj.is("textarea") ||
|
|
|
|
operationDataObj.is("textarea") ||
|
|
|
|
operationDataObj.is(":password")) {
|
|
|
|
operationDataObj.is(":password") ||
|
|
|
|
|
|
|
|
operationDataObj.is("input[type=hidden]")) {
|
|
|
|
operationDataObj.val(value);
|
|
|
|
operationDataObj.val(value);
|
|
|
|
} else if (operationDataObj.is(":checkbox")) {
|
|
|
|
} else if (operationDataObj.is(":checkbox")) {
|
|
|
|
operationDataObj.prop("checked", value);
|
|
|
|
operationDataObj.prop("checked", value);
|
|
|
|
|
|
|
|
} else if (operationDataObj.is(":radio")) {
|
|
|
|
|
|
|
|
if (operationDataObj.val() == uiPayload[key]) {
|
|
|
|
|
|
|
|
operationDataObj.attr("checked", true);
|
|
|
|
|
|
|
|
}
|
|
|
|
} else if (operationDataObj.is("select")) {
|
|
|
|
} else if (operationDataObj.is("select")) {
|
|
|
|
operationDataObj.val(value);
|
|
|
|
operationDataObj.val(value);
|
|
|
|
/* trigger a change of value, so that if slidable panes exist,
|
|
|
|
/* trigger a change of value, so that if slidable panes exist,
|
|
|
@ -1447,9 +1464,9 @@ var operationModule = function () {
|
|
|
|
var childInputValue = value[childInputIndex];
|
|
|
|
var childInputValue = value[childInputIndex];
|
|
|
|
// populating extracted value in the UI according to the input type
|
|
|
|
// populating extracted value in the UI according to the input type
|
|
|
|
if (childInput.is(":text") ||
|
|
|
|
if (childInput.is(":text") ||
|
|
|
|
childInput.is(":hidden") ||
|
|
|
|
|
|
|
|
childInput.is("textarea") ||
|
|
|
|
childInput.is("textarea") ||
|
|
|
|
childInput.is(":password") ||
|
|
|
|
childInput.is(":password") ||
|
|
|
|
|
|
|
|
childInput.is("input[type=hidden]") ||
|
|
|
|
childInput.is("select")) {
|
|
|
|
childInput.is("select")) {
|
|
|
|
childInput.val(childInputValue);
|
|
|
|
childInput.val(childInputValue);
|
|
|
|
} else if (childInput.is(":checkbox")) {
|
|
|
|
} else if (childInput.is(":checkbox")) {
|
|
|
@ -1495,9 +1512,9 @@ var operationModule = function () {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// populating extracted value in the UI according to the input type
|
|
|
|
// populating extracted value in the UI according to the input type
|
|
|
|
if (childInput.is(":text") ||
|
|
|
|
if (childInput.is(":text") ||
|
|
|
|
childInput.is(":hidden") ||
|
|
|
|
|
|
|
|
childInput.is("textarea") ||
|
|
|
|
childInput.is("textarea") ||
|
|
|
|
childInput.is(":password") ||
|
|
|
|
childInput.is(":password") ||
|
|
|
|
|
|
|
|
childInput.is("input[type=hidden]") ||
|
|
|
|
childInput.is("select")) {
|
|
|
|
childInput.is("select")) {
|
|
|
|
childInput.val(childInputValue);
|
|
|
|
childInput.val(childInputValue);
|
|
|
|
} else if (childInput.is(":checkbox")) {
|
|
|
|
} else if (childInput.is(":checkbox")) {
|
|
|
@ -1524,9 +1541,9 @@ var operationModule = function () {
|
|
|
|
var childInputValue = multiColumnKeyValuePair[childInputKey];
|
|
|
|
var childInputValue = multiColumnKeyValuePair[childInputKey];
|
|
|
|
// populating extracted value in the UI according to the input type
|
|
|
|
// populating extracted value in the UI according to the input type
|
|
|
|
if (childInput.is(":text") ||
|
|
|
|
if (childInput.is(":text") ||
|
|
|
|
childInput.is(":hidden") ||
|
|
|
|
|
|
|
|
childInput.is("textarea") ||
|
|
|
|
childInput.is("textarea") ||
|
|
|
|
childInput.is(":password") ||
|
|
|
|
childInput.is(":password") ||
|
|
|
|
|
|
|
|
childInput.is("input[type=hidden]") ||
|
|
|
|
childInput.is("select")) {
|
|
|
|
childInput.is("select")) {
|
|
|
|
childInput.val(childInputValue);
|
|
|
|
childInput.val(childInputValue);
|
|
|
|
} else if (childInput.is(":checkbox")) {
|
|
|
|
} else if (childInput.is(":checkbox")) {
|
|
|
@ -1697,7 +1714,7 @@ var operationModule = function () {
|
|
|
|
restrictions["enableAutoTime"] = restriction["enabled"];
|
|
|
|
restrictions["enableAutoTime"] = restriction["enabled"];
|
|
|
|
continue;
|
|
|
|
continue;
|
|
|
|
} else if (featureCode == androidOperationConstants["SET_SCREEN_CAPTURE_DISABLED"]){
|
|
|
|
} else if (featureCode == androidOperationConstants["SET_SCREEN_CAPTURE_DISABLED"]){
|
|
|
|
restrictions["diableScreenCapture"] = restriction["enabled"];
|
|
|
|
restrictions["disableScreenCapture"] = restriction["enabled"];
|
|
|
|
continue;
|
|
|
|
continue;
|
|
|
|
} else if (featureCode == androidOperationConstants["SET_STATUS_BAR_DISABLED"]){
|
|
|
|
} else if (featureCode == androidOperationConstants["SET_STATUS_BAR_DISABLED"]){
|
|
|
|
restrictions["disableStatusBar"] = restriction["enabled"];
|
|
|
|
restrictions["disableStatusBar"] = restriction["enabled"];
|
|
|
|