Merge remote-tracking branch 'upstream/master'

revert-dabc3590
Megala 8 years ago
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&nbsp;:&nbsp;&nbsp;</label>' + deviceType + '</div>'; return '<div><label class="label-bold">Type&nbsp;:&nbsp;&nbsp;</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}}
{{#equal noPolicy false}}
<li> <li>
<!--suppress HtmlUnknownTarget -->
<a href="{{@app.context}}/policy/add" class="cu-btn"> <a href="{{@app.context}}/policy/add" class="cu-btn">
<span class="icon fw-stack"> <span class="icon fw-stack">
<i class="fw fw-add fw-stack-1x"></i> <i class="fw fw-add fw-stack-1x"></i>
<i class="fw fw-ring fw-stack-2x"></i> <i class="fw fw-ring fw-stack-2x"></i>
</span> </span>
Add Policy &nbsp;Add New Policy
</a> </a>
</li> </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 &nbsp;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 &nbsp;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 -->
<a href="{{@app.context}}/policy/add" class="btn-operations btn-default">
<span class="fw-stack"> <span class="fw-stack">
<i class="fw fw-ring fw-stack-2x"></i> <i class="fw fw-ring fw-stack-2x"></i>
<i class="fw fw-add fw-stack-1x"></i> <i class="fw fw-add fw-stack-1x"></i>
</span> </span>
Add New Policy &nbsp;&nbsp;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,6 +74,7 @@ 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"]) {
if (deviceType == "android") {
viewModel["BatteryLevel"] = {}; viewModel["BatteryLevel"] = {};
viewModel["BatteryLevel"]["value"] = filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]["BATTERY_LEVEL"]; viewModel["BatteryLevel"]["value"] = filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]["BATTERY_LEVEL"];
@ -100,6 +101,22 @@ function onRequest(context) {
} 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…
Cancel
Save