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