|
|
@ -35,7 +35,7 @@ function InitiateViewOption() {
|
|
|
|
device.owner = validateAndReturn(device.owner);
|
|
|
|
device.owner = validateAndReturn(device.owner);
|
|
|
|
device.ownership = validateAndReturn(device.ownership);
|
|
|
|
device.ownership = validateAndReturn(device.ownership);
|
|
|
|
var arr = device.properties;
|
|
|
|
var arr = device.properties;
|
|
|
|
if (arr){
|
|
|
|
if (arr) {
|
|
|
|
device.properties = arr.reduce(function (total, current) {
|
|
|
|
device.properties = arr.reduce(function (total, current) {
|
|
|
|
total[current.name] = validateAndReturn(current.value);
|
|
|
|
total[current.name] = validateAndReturn(current.value);
|
|
|
|
return total;
|
|
|
|
return total;
|
|
|
@ -67,7 +67,7 @@ function loadDevices() {
|
|
|
|
|
|
|
|
|
|
|
|
function getPropertyValue(deviceProperties, propertyName) {
|
|
|
|
function getPropertyValue(deviceProperties, propertyName) {
|
|
|
|
var property;
|
|
|
|
var property;
|
|
|
|
for (var i =0; i < deviceProperties.length; i++) {
|
|
|
|
for (var i = 0; i < deviceProperties.length; i++) {
|
|
|
|
property = deviceProperties[i];
|
|
|
|
property = deviceProperties[i];
|
|
|
|
if (property.name == propertyName) {
|
|
|
|
if (property.name == propertyName) {
|
|
|
|
return property.value;
|
|
|
|
return property.value;
|
|
|
@ -114,7 +114,7 @@ function loadDevices() {
|
|
|
|
ownership: data.devices[index].enrolmentInfo.ownership,
|
|
|
|
ownership: data.devices[index].enrolmentInfo.ownership,
|
|
|
|
type: 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
|
|
|
|
}
|
|
|
|
}
|
|
|
|
);
|
|
|
|
);
|
|
|
|
});
|
|
|
|
});
|
|
|
@ -139,8 +139,8 @@ function loadDevices() {
|
|
|
|
|
|
|
|
|
|
|
|
var columns = [
|
|
|
|
var columns = [
|
|
|
|
{
|
|
|
|
{
|
|
|
|
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.type;
|
|
|
|
var deviceType = row.type;
|
|
|
|
var deviceIdentifier = row.deviceIdentifier;
|
|
|
|
var deviceIdentifier = row.deviceIdentifier;
|
|
|
@ -212,7 +212,7 @@ function loadDevices() {
|
|
|
|
];
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
$('#device-grid').datatables_extended_serverside_paging(
|
|
|
|
$('#device-grid').datatables_extended_serverside_paging(
|
|
|
|
null,
|
|
|
|
{"sorting": false},
|
|
|
|
"/api/device-mgt/v1.0/devices",
|
|
|
|
"/api/device-mgt/v1.0/devices",
|
|
|
|
dataFilter,
|
|
|
|
dataFilter,
|
|
|
|
columns,
|
|
|
|
columns,
|
|
|
@ -221,8 +221,8 @@ function loadDevices() {
|
|
|
|
$(".icon .text").res_text(0.2);
|
|
|
|
$(".icon .text").res_text(0.2);
|
|
|
|
$('#device-grid').removeClass('hidden');
|
|
|
|
$('#device-grid').removeClass('hidden');
|
|
|
|
}, {
|
|
|
|
}, {
|
|
|
|
"placeholder" : "Search By Device Name",
|
|
|
|
"placeholder": "Search By Device Name",
|
|
|
|
"searchKey" : "name"
|
|
|
|
"searchKey": "name"
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
$(deviceCheckbox).click(function () {
|
|
|
|
$(deviceCheckbox).click(function () {
|
|
|
@ -257,8 +257,8 @@ $(document).ready(function () {
|
|
|
|
|
|
|
|
|
|
|
|
/* for device list sorting drop down */
|
|
|
|
/* for device list sorting drop down */
|
|
|
|
$(".ctrl-filter-type-switcher").popover({
|
|
|
|
$(".ctrl-filter-type-switcher").popover({
|
|
|
|
html : true,
|
|
|
|
html: true,
|
|
|
|
content : function () {
|
|
|
|
content: function () {
|
|
|
|
return $("#content-filter-types").html();
|
|
|
|
return $("#content-filter-types").html();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|