mirror of
https://repository.entgra.net/community/device-mgt-plugins.git
synced 2025-09-16 23:42:15 +00:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
90f509c065
@ -112,7 +112,7 @@ function loadDevices() {
|
||||
user: data.devices[index].enrolmentInfo.owner,
|
||||
status: data.devices[index].enrolmentInfo.status,
|
||||
ownership: data.devices[index].enrolmentInfo.ownership,
|
||||
deviceType: data.devices[index].type,
|
||||
type: data.devices[index].type,
|
||||
deviceIdentifier: data.devices[index].deviceIdentifier,
|
||||
name : data.devices[index].name
|
||||
}
|
||||
@ -133,7 +133,7 @@ function loadDevices() {
|
||||
// possible params - nRow, aData, dataIndex
|
||||
var fnCreatedRow = function (nRow, aData) {
|
||||
$(nRow).attr('data-type', 'selectable');
|
||||
$(nRow).attr('data-devicetype', aData["deviceType"]);
|
||||
$(nRow).attr('data-devicetype', aData["type"]);
|
||||
$(nRow).attr('data-deviceid', aData["deviceIdentifier"]);
|
||||
};
|
||||
|
||||
@ -142,7 +142,7 @@ function loadDevices() {
|
||||
class : 'remove-padding icon-only content-fill viewEnabledIcon',
|
||||
data : null,
|
||||
render: function (data, type, row) {
|
||||
var deviceType = row.deviceType;
|
||||
var deviceType = row.type;
|
||||
var deviceIdentifier = row.deviceIdentifier;
|
||||
var url = "#";
|
||||
if (row.status != 'REMOVED') {
|
||||
@ -197,9 +197,9 @@ function loadDevices() {
|
||||
},
|
||||
{
|
||||
className: 'fade-edge remove-padding-top',
|
||||
data: 'deviceType',
|
||||
render: function (deviceType) {
|
||||
return '<div><label class="label-bold">Type : </label>' + deviceType + '</div>';
|
||||
data: 'type',
|
||||
render: function (type) {
|
||||
return '<div><label class="label-bold">Type : </label>' + type + '</div>';
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
@ -33,6 +33,7 @@
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<!--suppress HtmlUnknownTarget -->
|
||||
<a href="{{@app.context}}/policies">
|
||||
Policies
|
||||
</a>
|
||||
@ -41,25 +42,29 @@
|
||||
|
||||
{{#zone "navbarActions"}}
|
||||
{{#if permissions.ADD_ADMIN_POLICY}}
|
||||
<li>
|
||||
<a href="{{@app.context}}/policy/add" class="cu-btn">
|
||||
<span class="icon fw-stack">
|
||||
<i class="fw fw-add fw-stack-1x"></i>
|
||||
<i class="fw fw-ring fw-stack-2x"></i>
|
||||
</span>
|
||||
Add Policy
|
||||
</a>
|
||||
</li>
|
||||
{{#equal noPolicy false}}
|
||||
<li>
|
||||
<!--suppress HtmlUnknownTarget -->
|
||||
<a href="{{@app.context}}/policy/add" class="cu-btn">
|
||||
<span class="icon fw-stack">
|
||||
<i class="fw fw-add fw-stack-1x"></i>
|
||||
<i class="fw fw-ring fw-stack-2x"></i>
|
||||
</span>
|
||||
Add New Policy
|
||||
</a>
|
||||
</li>
|
||||
{{/equal}}
|
||||
{{/if}}
|
||||
{{#if permissions.CHANGE_POLICY_PRIORITY}}
|
||||
{{#equal noPolicy false}}
|
||||
<li>
|
||||
<!--suppress HtmlUnknownTarget -->
|
||||
<a href="{{@app.context}}/policy/priority" class="cu-btn">
|
||||
<span class="icon fw-stack">
|
||||
<i class="fw fw-throttling-policy fw-stack-1x"></i>
|
||||
<i class="fw fw-ring fw-stack-2x"></i>
|
||||
</span>
|
||||
Policy Priority
|
||||
Policy Priority
|
||||
</a>
|
||||
</li>
|
||||
{{/equal}}
|
||||
@ -70,7 +75,7 @@
|
||||
<i class="fw fw-check fw-stack-1x"></i>
|
||||
<i class="fw fw-ring fw-stack-2x"></i>
|
||||
</span>
|
||||
Apply Changes To Devices
|
||||
Apply Changes To Devices
|
||||
</a>
|
||||
</li>
|
||||
{{/zone}}
|
||||
@ -82,18 +87,21 @@
|
||||
{{#equal noPolicy true}}
|
||||
<div id="ast-container" class="ast-container list-view">
|
||||
<div class="ctrl-info-panel col-centered text-center wr-login">
|
||||
<h2>You don't have any policy at the moment.</h2>
|
||||
<br/>
|
||||
<h3 class="text-muted">
|
||||
<i class="fw fw-policy fw-3x"></i>
|
||||
</h3>
|
||||
<h3 class="text-muted">You do not have any device policy at the moment</h3>
|
||||
{{#if permissions.ADD_ADMIN_POLICY}}
|
||||
<p class="text-center">
|
||||
<a href="{{@app.context}}/policy/add" class="wr-btn">
|
||||
<span class="fw-stack">
|
||||
<i class="fw fw-ring fw-stack-2x"></i>
|
||||
<i class="fw fw-add fw-stack-1x"></i>
|
||||
</span>
|
||||
Add New Policy
|
||||
<h3>
|
||||
<!--suppress HtmlUnknownTarget -->
|
||||
<a href="{{@app.context}}/policy/add" class="btn-operations btn-default">
|
||||
<span class="fw-stack">
|
||||
<i class="fw fw-ring fw-stack-2x"></i>
|
||||
<i class="fw fw-add fw-stack-1x"></i>
|
||||
</span>
|
||||
Add New Policy
|
||||
</a>
|
||||
</p>
|
||||
</h3>
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
@ -229,6 +237,7 @@
|
||||
data-display="{{status}}">
|
||||
</td>
|
||||
<td class="text-right content-fill text-left-on-grid-view no-wrap">
|
||||
<!--suppress HtmlUnknownTarget -->
|
||||
<a href="{{@app.context}}/policy/edit?id={{id}}"
|
||||
data-id="{{id}}"
|
||||
data-click-event="remove-form"
|
||||
|
||||
@ -74,31 +74,48 @@ function onRequest(context) {
|
||||
viewModel["model"] = filteredDeviceData["initialDeviceInfo"]["DEVICE_MODEL"];
|
||||
}
|
||||
if (filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]) {
|
||||
viewModel["BatteryLevel"] = {};
|
||||
viewModel["BatteryLevel"]["value"] = filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]["BATTERY_LEVEL"];
|
||||
if (deviceType == "android") {
|
||||
viewModel["BatteryLevel"] = {};
|
||||
viewModel["BatteryLevel"]["value"] = filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]["BATTERY_LEVEL"];
|
||||
|
||||
viewModel["internalMemory"] = {};
|
||||
viewModel["internalMemory"]["total"] = Math.
|
||||
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"] -
|
||||
filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]["INTERNAL_AVAILABLE_MEMORY"])
|
||||
/ filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]["INTERNAL_TOTAL_MEMORY"] * 10000) / 100;
|
||||
} else {
|
||||
viewModel["internalMemory"]["usage"] = 0;
|
||||
}
|
||||
viewModel["internalMemory"] = {};
|
||||
viewModel["internalMemory"]["total"] = Math.
|
||||
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"] -
|
||||
filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]["INTERNAL_AVAILABLE_MEMORY"])
|
||||
/ filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]["INTERNAL_TOTAL_MEMORY"] * 10000) / 100;
|
||||
} else {
|
||||
viewModel["internalMemory"]["usage"] = 0;
|
||||
}
|
||||
|
||||
viewModel["externalMemory"] = {};
|
||||
viewModel["externalMemory"]["total"] = Math.
|
||||
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"] -
|
||||
filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]["EXTERNAL_AVAILABLE_MEMORY"])
|
||||
/ filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]["EXTERNAL_TOTAL_MEMORY"] * 10000) / 100;
|
||||
} else {
|
||||
viewModel["externalMemory"]["usage"] = 0;
|
||||
viewModel["externalMemory"] = {};
|
||||
viewModel["externalMemory"]["total"] = Math.
|
||||
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"] -
|
||||
filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]["EXTERNAL_AVAILABLE_MEMORY"])
|
||||
/ filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]["EXTERNAL_TOTAL_MEMORY"] * 10000) / 100;
|
||||
} else {
|
||||
viewModel["externalMemory"]["usage"] = 0;
|
||||
}
|
||||
} else if (deviceType == "ios") {
|
||||
viewModel["BatteryLevel"] = {};
|
||||
viewModel["BatteryLevel"]["value"] = filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]["BatteryLevel"];
|
||||
|
||||
viewModel["internalMemory"] = {};
|
||||
viewModel["internalMemory"]["total"] = Math.
|
||||
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"] -
|
||||
filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]["AvailableDeviceCapacity"])
|
||||
/ filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]["DeviceCapacity"] * 10000) / 100;
|
||||
} else {
|
||||
viewModel["internalMemory"]["usage"] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user