| + | By Device Name | +By Owner | +By Status | +By Platform | +By Ownership | ++ |
|---|---|---|---|---|---|---|
| + | + | + | + | + | + | + |
|
+
+ {{unit "mdm.unit.device.operation-bar"}}
+
+
+
+ Enabling Device Operations+To enable device operations, select the desired platform from above filter. + |
+ ||||||
Device data may not have been updated. Please refresh to try again.
"; + $(".panel-body").append(defaultInnerHTML); + } + ); + } + + $(".media.tab-responsive [data-toggle=tab]").on("shown.bs.tab", function (e) { + var activeTabPane = $(e.target).attr("href"), + activeCollapsePane = $(activeTabPane).find("[data-toggle=collapse]").data("target"), + activeCollapsePaneSiblings = $(activeTabPane).siblings().find("[data-toggle=collapse]").data("target"), + activeListGroupItem = $(".media .list-group-item.active"); + + $(activeCollapsePaneSiblings).collapse("hide"); + $(activeCollapsePane).collapse("show"); + positionArrow(activeListGroupItem); + + $(".panel-heading .caret-updown").removeClass("fw-sort-down"); + $(".panel-heading.collapsed .caret-updown").addClass("fw-sort-up"); + }); + + $(".media.tab-responsive .tab-content").on("shown.bs.collapse", function (e) { + var activeTabPane = $(e.target).parent().attr("id"); + $(".media.tab-responsive [data-toggle=tab][href=#" + activeTabPane + "]").tab("show"); + $(".panel-heading .caret-updown").removeClass("fw-sort-up"); + $(".panel-heading.collapsed .caret-updown").addClass("fw-sort-down"); + }); + + function positionArrow(selectedTab) { + var selectedTabHeight = $(selectedTab).outerHeight(); + var arrowPosition = 0; + var totalHeight = 0; + var arrow = $(".media .panel-group.tab-content .arrow-left"); + var parentHeight = $(arrow).parent().outerHeight(); + +// if($(selectedTab).prev().length){ +// $(selectedTab).prevAll().each(function() { +// totalHeight += $(this).outerHeight(); +// }); +// arrowPosition = totalHeight + (selectedTabHeight / 2); +// }else{ +// arrowPosition = selectedTabHeight / 2; +// } + + if(arrowPosition >= parentHeight){ + parentHeight = arrowPosition + 10; + $(arrow).parent().height(parentHeight); + }else{ + $(arrow).parent().removeAttr("style"); + } + $(arrow).css("top", arrowPosition - 10); + } + + $(document).ready(function() { + $(".device-detail-body").removeClass("hidden"); + $("#loading-content").remove(); + loadOperationBar(deviceType); + loadOperationsLog(false); + loadApplicationsList(); + loadPolicyCompliance(); + + $("#refresh-policy").click(function () { + $("#policy-spinner").removeClass("hidden"); + loadPolicyCompliance(); + }); + + $("#refresh-apps").click(function () { + $("#apps-spinner").removeClass("hidden"); + loadApplicationsList(); + }); + + $("#refresh-operations").click(function () { + $("#operations-spinner").removeClass("hidden"); + loadOperationsLog(true); + }); + }); + + function loadOperationsLog(update) { + var operationsLogTable = "#operations-log-table"; + if (update) { + operationTable = $(operationsLogTable).DataTable(); + operationTable.ajax.reload(false); + return; + } + operationTable = $(operationsLogTable).datatables_extended({ + serverSide: true, + processing: false, + searching: false, + ordering: false, + pageLength : 10, + order: [], + ajax: { + url: "/emm/api/operation/paginate", + data: {deviceId : deviceIdentifier, deviceType: deviceType}, + dataSrc: function (json) { + $("#operations-spinner").addClass("hidden"); + $("#operations-log-container").empty(); + return json.data; + } + }, + columnDefs: [ + {targets: 0, data: "code" }, + {targets: 1, data: "status", render: + function (status) { + var html; + switch (status) { + case "COMPLETED" : + html = " Completed"; + break; + case "PENDING" : + html = " Pending"; + break; + case "ERROR" : + html = " Error"; + break; + case "IN_PROGRESS" : + html = " In Progress"; + break; + case "REPEATED" : + html = " Repeated"; + break; + } + return html; + } + }, + {targets: 2, data: "createdTimeStamp", render: + function (date) { + var value = String(date); + return value.slice(0, 16); + } + } + ], + "createdRow": function(row, data) { + $(row).attr("data-type", "selectable"); + $(row).attr("data-id", data["id"]); + $.each($("td", row), + function(colIndex) { + switch(colIndex) { + case 1: + $(this).attr("data-grid-label", "Code"); + $(this).attr("data-display", data["code"]); + break; + case 2: + $(this).attr("data-grid-label", "Status"); + $(this).attr("data-display", data["status"]); + break; + case 3: + $(this).attr("data-grid-label", "Created Timestamp"); + $(this).attr("data-display", data["createdTimeStamp"]); + break; + } + } + ); + } + }); + } + + function loadApplicationsList() { + var applicationsList = $("#applications-list"); + var applicationListingTemplate = applicationsList.attr("src"); + var deviceId = applicationsList.data("device-id"); + var deviceType = applicationsList.data("device-type"); + + $.template("application-list", applicationListingTemplate, function (template) { + var serviceURL = "/api/device-mgt/v1.0/devices/" + deviceType + "/" + deviceId + "/applications"; + invokerUtil.get( + serviceURL, + // success-callback + function (data, textStatus, jqXHR) { + if (jqXHR.status == 200 && data) { + data = JSON.parse(data); + $("#apps-spinner").addClass("hidden"); + if (data.length > 0) { + for (var i = 0; i < data.length; i++) { + data[i]["name"] = decodeURIComponent(data[i]["name"]); + data[i]["platform"] = deviceType; + } + + var viewModel = {}; + viewModel["applications"] = data; + viewModel["deviceType"] = deviceType; + var content = template(viewModel); + $("#applications-list-container").html(content); + } else { + $("#applications-list-container"). + html("
No applications found. " + + "please try refreshing the list in a while.
Loading application list " + + "was not successful. please try refreshing the list in a while.
This device " + + "has no policy applied.
Loading policy compliance related data " + + "was not successful. please try refreshing data in a while.
Loading policy compliance related data " + + "was not successful. please try refreshing data in a while.
| Operation Code | +Status | +Request created at | +
|---|---|---|
| {{code}} | ++ {{#equal status "COMPLETED"}} Completed{{/equal}} + {{#equal status "PENDING"}} Pending{{/equal}} + {{#equal status "ERROR"}} Error{{/equal}} + {{#equal status "IN_PROGRESS"}} In Progress{{/equal}} + | +{{createdTimeStamp}} | +
| Feature | +Compliance | +
|---|---|
| {{featureCode}} | ++ {{#equal compliance true}} Compliant{{/equal}} + {{#equal compliance false}} Not Compliant{{/equal}} + | +
| Device | +{{device.viewModel.vendor}} {{device.properties.model}} | +
| Model | +{{device.viewModel.model}} | +
| IMEI | +{{device.viewModel.imei}} | +
| UDID | +{{device.viewModel.udid}} | +
| Firmware Build Date | +{{device.viewModel.os_build_date}} | +
| Phone Number | +{{device.viewModel.phoneNumber}} | +
| Status | ++ {{#equal device.status "ACTIVE"}} Active{{/equal}} + {{#equal device.status "INACTIVE"}} Inactive{{/equal}} + {{#equal device.status "BLOCKED"}} Blocked{{/equal}} + {{#equal device.status "REMOVED"}} Removed{{/equal}} + | +
+ No applications found. please try refreshing the list in a while. +
+
| Operation Code | +Status | +Request created at | +
|---|
| No: | +Application Name/Description | +Package Name | ++ |
|---|---|---|---|
| + No entries added yet . + | +|||
| No: | +Key | +Value | ++ |
|---|---|---|---|
| + No entries added yet . + | +|||
| No: | +Safari Domain | ++ |
|---|---|---|
| + No entries added yet . + | +||
| No: | +App Identifier | +VPN UUID | ++ |
|---|---|---|---|
| + No entries added yet . + | +|||
| No: | +Roaming Consortium OI | ++ |
|---|---|---|
| + No entries added yet . + | +||
| No: | +NAI Realm Name | ++ |
|---|---|---|
| + No entries added yet . + | +||
| No: | +Mobile Country Code ( MCC ) | +Mobile Network Code ( MNC ) | ++ |
|---|---|---|---|
| + No entries added yet . + | +|||
| No: | +Device Name | +Password | ++ |
|---|---|---|---|
| + No entries added yet . + | +|||
| No: | +Destination | ++ |
|---|---|---|
| + No entries added yet . + | +||
| No: | +Email Domain | ++ | |
|---|---|---|---|
| + No entries added yet . + | +|||
| No: | +Safari Web Domain | ++ |
|---|---|---|
| + No entries added yet . + | +||
| No: | +Description | +Search Base | +Scope | ++ |
|---|---|---|---|---|
| + No entries added yet . + | +||||
| No: | +APN | +Username | +Password | +Proxy | +Port | ++ |
|---|---|---|---|---|---|---|
| + No entries added yet . + | +||||||
| No: | +APN | +Auth.Type | +Username | +Password | +Proxy | +Port | ++ |
|---|---|---|---|---|---|---|---|
| + No entries added yet . + | +|||||||
| No: | +Application Bundle ID | ++ |
|---|---|---|
| + No entries added yet . + | +||
| No: | +Application Name/Description | +Package Name | ++ |
|---|---|---|---|
| + No entries added yet . + | +|||
| No: | +Application Name/Description | +Package Name | ++ |
|---|---|---|---|
| + No entries added yet . + | +|||
| No: | +Application Name/Description | +Package Name | ++ |
|---|---|---|---|
| + No entries added yet . + | +|||
| No: | +Key | +Value | ++ |
|---|---|---|---|
| + No entries added yet . + | +|||
| No: | +Safari Domain | ++ |
|---|---|---|
| + No entries added yet . + | +||
| No: | +App Identifier | +VPN UUID | ++ |
|---|---|---|---|
| + No entries added yet . + | +|||