|
|
@ -38,32 +38,40 @@ var displayPolicy = function (policyPayloadObj) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$("#policy-status").html(policyStatus);
|
|
|
|
$("#policy-status").html(policyStatus);
|
|
|
|
console.log(policyPayloadObj);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// if (policyPayloadObj.users.length > 0) {
|
|
|
|
if (policyPayloadObj.users == null) {
|
|
|
|
// $("#policy-users").text(policyPayloadObj.users.toString().split(",").join(", "));
|
|
|
|
$("#policy-users").text("NONE");
|
|
|
|
// } else {
|
|
|
|
}
|
|
|
|
// $("#users-row").addClass("hidden");
|
|
|
|
else if (policyPayloadObj.users.length > 0) {
|
|
|
|
// }
|
|
|
|
$("#policy-users").text(policyPayloadObj.users.toString().split(",").join(", "));
|
|
|
|
// if (policyPayloadObj.deviceGroups.length > 0) {
|
|
|
|
} else {
|
|
|
|
// debugger;
|
|
|
|
$("#users-row").addClass("hidden");
|
|
|
|
// var deviceGroups = policyPayloadObj.deviceGroups;
|
|
|
|
}
|
|
|
|
// var assignedGroups = [];
|
|
|
|
|
|
|
|
// for (var index in deviceGroups) {
|
|
|
|
if (policyPayloadObj.deviceGroups == null) {
|
|
|
|
// if (deviceGroups.hasOwnProperty(index)) {
|
|
|
|
$("#policy-groups").text("NONE");
|
|
|
|
// assignedGroups.push(deviceGroups[index].name);
|
|
|
|
} else if (policyPayloadObj.deviceGroups.length > 0) {
|
|
|
|
// }
|
|
|
|
debugger;
|
|
|
|
// }
|
|
|
|
var deviceGroups = policyPayloadObj.deviceGroups;
|
|
|
|
// $("#policy-groups").text(assignedGroups.toString().split(",").join(", "));
|
|
|
|
var assignedGroups = [];
|
|
|
|
// } else {
|
|
|
|
for (var index in deviceGroups) {
|
|
|
|
// $("#policy-groups").text("NONE");
|
|
|
|
if (deviceGroups.hasOwnProperty(index)) {
|
|
|
|
// }
|
|
|
|
assignedGroups.push(deviceGroups[index].name);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
$("#policy-groups").text(assignedGroups.toString().split(",").join(", "));
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
$("#policy-groups").text("NONE");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// if (policyPayloadObj.roles.length > 0) {
|
|
|
|
if (policyPayloadObj.roles == null) {
|
|
|
|
// $("#policy-roles").text(policyPayloadObj.roles.toString().split(",").join(", "));
|
|
|
|
$("#policy-roles").text("NONE");
|
|
|
|
// } else {
|
|
|
|
}
|
|
|
|
// $("#roles-row").addClass("hidden");
|
|
|
|
else if (policyPayloadObj.roles.length > 0) {
|
|
|
|
// }
|
|
|
|
$("#policy-roles").text(policyPayloadObj.roles.toString().split(",").join(", "));
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
$("#roles-row").addClass("hidden");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var deviceType = policy["platform"];
|
|
|
|
var deviceType = policy["platform"];
|
|
|
|
var policyOperationsTemplateSrc = context + '/public/cdmf.unit.device.type.' + deviceType +
|
|
|
|
var policyOperationsTemplateSrc = context + '/public/cdmf.unit.device.type.' + deviceType +
|
|
|
|