+
+ {{#if device.deviceInfoAvailable}}
+ {{#if device.BatteryLevel}}
+
+
+
+
BATTERY
+
+
+
+ {{device.BatteryLevel
+ .value}} %
+
+
+
+
+
+ {{/if}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{#if device.ramUsage}}
+
+
+
+
RAM Usage
+
+
+
+ {{device.ramUsage
+ .value}} %
+
+
+
+
-
Device Details
-
-
-
-
- {{#equal deviceView.type "windows"}}
-
-
Not
- available yet
+ {{/if}}
+ {{#if device.internalMemory}}
+
+
+
+
Local Storage
+
+
- {{/equal}}
- {{#if deviceView.deviceInfoAvailable}}
- {{#if deviceView.BatteryLevel}}
-
-
-
-
BATTERY
-
-
-
- {{deviceView.BatteryLevel.value}} %
-
-
-
-
-
- {{/if}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{#if deviceView.ramUsage}}
-
-
-
-
RAM Usage
-
-
-
- {{deviceView.ramUsage.value}} %
-
-
-
-
-
- {{/if}}
- {{#if deviceView.internalMemory}}
-
-
-
-
Local Storage
-
-
-
-
- {{deviceView.internalMemory.usage}} %
+
+ {{device.internalMemory
+ .usage}} %
- TOTAL OF {{deviceView.internalMemory.total}} GB
+ TOTAL OF {{device.internalMemory
+ .total}} GB
-
-
-
-
-
- {{/if}}
- {{#if deviceView.externalMemory}}
-
-
-
-
External Storage
-
-
-
- {{deviceView.externalMemory.usage}} %
+
+
+
+
+
+ {{/if}}
+ {{#if device.externalMemory}}
+
+
+
+
External Storage
+
+
+
+ {{device.externalMemory
+ .usage}} %
- TOTAL OF {{deviceView.externalMemory.total}} GB
+ TOTAL OF {{device.externalMemory
+ .total}} GB
-
-
-
-
-
- {{/if}}
- {{else}}
-
-
-
- Battery, RAM and Storage related information are not
- available yet.
-
- {{/if}}
+
+ {{/if}}
+ {{else}}
+
+
+
+ Battery, RAM and Storage related information are not
+ available yet.
+
{{/if}}
+
+
+
+
+ {{/zone}}
-
-
-
- Policy Compliance
+ {{#zone "device-view-tab-injected-conents"}}
+
+
+
-
-
+
+
+
-
- Loading Policy
- Compliance...
-
-
-
-
-
+
+ Loading Policy
+ Compliance...
+
+
+
+
+
+
+
+
+
+
Device Location
+
+
+ {{#if device.location}}
+
-
-
-
Device Location
-
-
- {{#if deviceView.location}}
-
-
- {{else}}
-
-
-
- Device location information is not available.
-
-
-
-
-
- {{/if}}
-
-
+ {{else}}
+
+
+
+ Device location information is not available.
+
-
-
-
- Installed Applications
+
+
+
+ {{/if}}
+
+
+
+
+
+
+
+ Installed Applications
-
-
-
+
+
+
-
- Loading Applications
- List...
-
-
-
-
-
- No applications found.
-
-
Please try refreshing in a while.
-
-
-
-
-
-
-
-
- Operations Log
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Loading Operations Log...
-
-
-
-
-
- There are no operations, performed yet on this device.
-
-
-
-
-
-
- Operation Code |
- Status |
- Request created at |
-
-
-
-
-
-
-
+
+ Loading Applications
+ List...
+
+
+
+
+
+ No applications found.
+
+
Please try refreshing in a while.
+
- {{/zone}}
+
+ {{/zone}}
+
+
{{else}}
@@ -500,19 +421,13 @@
{{#if isAuthorized}}
-
{{js "js/device-detail.js"}}
{{js "js/load-map.js"}}
diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.windows.device-view/device-view.js b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.windows.device-view/device-view.js
index e12577afdd..1400f4429c 100644
--- a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.windows.device-view/device-view.js
+++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.windows.device-view/device-view.js
@@ -36,9 +36,6 @@ function onRequest(context) {
if (filteredDeviceData["type"]) {
viewModel["type"] = filteredDeviceData["type"];
viewModel.isNotWindows = true;
- if (viewModel["deviceType"] == "windows") {
- viewModel.isNotWindows = false;
- }
}
if (filteredDeviceData["deviceIdentifier"]) {
viewModel["deviceIdentifier"] = filteredDeviceData["deviceIdentifier"];
@@ -92,10 +89,10 @@ function onRequest(context) {
viewModel["internalMemory"] = {};
viewModel["internalMemory"]["total"] = Math.
- round(filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]["INTERNAL_TOTAL_MEMORY"] * 100) / 100;
+ round(filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]["INTERNAL_TOTAL_MEMORY"] * 100) / 100;
if (filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]["INTERNAL_TOTAL_MEMORY"] != 0) {
viewModel["internalMemory"]["usage"] = Math.
- round((filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]["INTERNAL_TOTAL_MEMORY"] -
+ round((filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]["INTERNAL_TOTAL_MEMORY"] -
filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]["INTERNAL_AVAILABLE_MEMORY"])
/ filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]["INTERNAL_TOTAL_MEMORY"] * 10000) / 100;
} else {
@@ -104,10 +101,10 @@ function onRequest(context) {
viewModel["externalMemory"] = {};
viewModel["externalMemory"]["total"] = Math.
- round(filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]["EXTERNAL_TOTAL_MEMORY"] * 100) / 100;
+ round(filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]["EXTERNAL_TOTAL_MEMORY"] * 100) / 100;
if (filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]["EXTERNAL_TOTAL_MEMORY"] != 0) {
viewModel["externalMemory"]["usage"] = Math.
- round((filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]["EXTERNAL_TOTAL_MEMORY"] -
+ round((filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]["EXTERNAL_TOTAL_MEMORY"] -
filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]["EXTERNAL_AVAILABLE_MEMORY"])
/ filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]["EXTERNAL_TOTAL_MEMORY"] * 10000) / 100;
} else {
@@ -119,10 +116,10 @@ function onRequest(context) {
viewModel["internalMemory"] = {};
viewModel["internalMemory"]["total"] = Math.
- round(filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]["DeviceCapacity"] * 100) / 100;
+ round(filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]["DeviceCapacity"] * 100) / 100;
if (filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]["DeviceCapacity"] != 0) {
viewModel["internalMemory"]["usage"] = Math.
- round((filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]["DeviceCapacity"] -
+ round((filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]["DeviceCapacity"] -
filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]["AvailableDeviceCapacity"])
/ filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]["DeviceCapacity"] * 10000) / 100;
} else {
@@ -151,7 +148,7 @@ function onRequest(context) {
}
if (filteredDeviceData["latestDeviceInfo"]["updatedTime"]) {
viewModel["lastUpdatedTime"] = filteredDeviceData["latestDeviceInfo"]["updatedTime"].
- substr(0, filteredDeviceData["latestDeviceInfo"]["updatedTime"].indexOf("+"));
+ substr(0, filteredDeviceData["latestDeviceInfo"]["updatedTime"].indexOf("+"));
}
viewModel["BatteryLevel"] = {};
viewModel["BatteryLevel"]["value"] = filteredDeviceData["latestDeviceInfo"]["batteryLevel"];
@@ -162,7 +159,7 @@ function onRequest(context) {
viewModel["ramUsage"] = {};
if (filteredDeviceData["latestDeviceInfo"]["totalRAMMemory"] != 0) {
viewModel["ramUsage"]["value"] = Math.
- round((filteredDeviceData["latestDeviceInfo"]["totalRAMMemory"] -
+ round((filteredDeviceData["latestDeviceInfo"]["totalRAMMemory"] -
filteredDeviceData["latestDeviceInfo"]["availableRAMMemory"])
/ filteredDeviceData["latestDeviceInfo"]["totalRAMMemory"] * 10000) / 100;
} else {
@@ -171,10 +168,10 @@ function onRequest(context) {
viewModel["internalMemory"] = {};
viewModel["internalMemory"]["total"] = Math.
- round(filteredDeviceData["latestDeviceInfo"]["internalTotalMemory"] * 100) / 100;
+ round(filteredDeviceData["latestDeviceInfo"]["internalTotalMemory"] * 100) / 100;
if (filteredDeviceData["latestDeviceInfo"]["internalTotalMemory"] != 0) {
viewModel["internalMemory"]["usage"] = Math.
- round((filteredDeviceData["latestDeviceInfo"]["internalTotalMemory"] -
+ round((filteredDeviceData["latestDeviceInfo"]["internalTotalMemory"] -
filteredDeviceData["latestDeviceInfo"]["internalAvailableMemory"])
/ filteredDeviceData["latestDeviceInfo"]["internalTotalMemory"] * 10000) / 100;
} else {
@@ -183,10 +180,10 @@ function onRequest(context) {
viewModel["externalMemory"] = {};
viewModel["externalMemory"]["total"] = Math.
- round(filteredDeviceData["latestDeviceInfo"]["externalTotalMemory"] * 100) / 100;
+ round(filteredDeviceData["latestDeviceInfo"]["externalTotalMemory"] * 100) / 100;
if (filteredDeviceData["latestDeviceInfo"]["externalTotalMemory"] != 0) {
viewModel["externalMemory"]["usage"] = Math.
- round((filteredDeviceData["latestDeviceInfo"]["externalTotalMemory"] -
+ round((filteredDeviceData["latestDeviceInfo"]["externalTotalMemory"] -
filteredDeviceData["latestDeviceInfo"]["externalAvailableMemory"])
/ filteredDeviceData["latestDeviceInfo"]["externalTotalMemory"] * 10000) / 100;
} else {
@@ -197,7 +194,7 @@ function onRequest(context) {
viewModel["deviceInfoAvailable"] = false;
}
- deviceViewData["deviceView"] = viewModel;
+ deviceViewData["device"] = viewModel;
} else if (response["status"] == "unauthorized") {
deviceViewData["deviceFound"] = true;
deviceViewData["isAuthorized"] = false;
@@ -207,5 +204,11 @@ function onRequest(context) {
} else {
deviceViewData["deviceFound"] = false;
}
+
+ var autoCompleteParams = [
+ {"name" : "deviceId", "value" : deviceId}
+ ];
+
+ deviceViewData["autoCompleteParams"] = autoCompleteParams;
return deviceViewData;
}
\ No newline at end of file
diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.windows.device-view/public/js/device-detail.js b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.windows.device-view/public/js/device-detail.js
index a90864968b..0063bc7242 100755
--- a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.windows.device-view/public/js/device-detail.js
+++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.windows.device-view/public/js/device-detail.js
@@ -22,6 +22,7 @@ var InitiateViewOption = null;
var deviceId = $(".device-id");
var deviceIdentifier = deviceId.data("deviceid");
var deviceType = deviceId.data("type");
+ var ownership = deviceId.data("ownership");
var payload = [deviceIdentifier];
var operationTable;
var serviceUrl;
@@ -111,9 +112,6 @@ var InitiateViewOption = null;
$(document).ready(function() {
$(".device-detail-body").removeClass("hidden");
$("#loading-content").remove();
- console.log("##### something went wrong here!" + deviceType)
- loadOperationBar(deviceType);
- loadOperationsLog(false);
loadApplicationsList();
loadPolicyCompliance();
@@ -126,14 +124,10 @@ var InitiateViewOption = null;
$("#apps-spinner").removeClass("hidden");
loadApplicationsList();
});
-
- $("#refresh-operations").click(function () {
- $("#operations-spinner").removeClass("hidden");
- loadOperationsLog(true);
- });
});
function loadOperationsLog(update) {
+ var owner = $("#device-owner").data("owner");
var operationsLogTable = "#operations-log-table";
if (update) {
operationTable = $(operationsLogTable).DataTable();
@@ -148,8 +142,8 @@ var InitiateViewOption = null;
pageLength : 10,
order: [],
ajax: {
- url: "/emm/api/operation/paginate",
- data: {deviceId : deviceIdentifier, deviceType: deviceType},
+ url: "/devicemgt/api/operation/paginate",
+ data: {deviceId : deviceIdentifier, deviceType: deviceType, owner:owner},
dataSrc: function (json) {
$("#operations-spinner").addClass("hidden");
$("#operations-log-container").empty();
@@ -242,7 +236,7 @@ var InitiateViewOption = null;
} else {
$("#applications-list-container").
html("No applications found.
" +
- "
Please try refreshing the list in a while.
");
+ "
Please try refreshing the list in a while.
");
}
}
},
@@ -250,8 +244,8 @@ var InitiateViewOption = null;
function () {
$("#applications-list-container").
html("
Loading application list " +
- "was not successful. please try refreshing the list in a while.
");
- });
+ "was not successful. please try refreshing the list in a while.
");
+ });
});
}
@@ -304,7 +298,7 @@ var InitiateViewOption = null;
} else {
$("#policy-list-container").
html("
This device " +
- "has no policy applied.
");
+ "has no policy applied.
");
}
}
},
@@ -312,7 +306,7 @@ var InitiateViewOption = null;
function () {
$("#policy-list-container").
html("
Loading policy compliance related data " +
- "was not successful. please try refreshing data in a while.
");
+ "was not successful. please try refreshing data in a while.