|
|
@ -375,15 +375,15 @@ function loadDevices(searchType, searchParam) {
|
|
|
|
|
|
|
|
|
|
|
|
var fnCreatedRow = function (row, data, dataIndex) {
|
|
|
|
var fnCreatedRow = function (row, data, dataIndex) {
|
|
|
|
$(row).attr('data-type', 'selectable');
|
|
|
|
$(row).attr('data-type', 'selectable');
|
|
|
|
$(row).attr('data-deviceid', data.deviceIdentifier);
|
|
|
|
$(row).attr('data-deviceid', htmlspecialchars(data.deviceIdentifier));
|
|
|
|
$(row).attr('data-devicetype', data.deviceType);
|
|
|
|
$(row).attr('data-devicetype', htmlspecialchars(data.deviceType));
|
|
|
|
$(row).attr('data-url', context + '/device/' + data.deviceType + '?id=' + data.deviceIdentifier);
|
|
|
|
$(row).attr('data-url', context + '/device/' + htmlspecialchars(data.deviceType) + '?id=' + htmlspecialchars(data.deviceIdentifier));
|
|
|
|
var model = getPropertyValue(data.properties, 'DEVICE_MODEL');
|
|
|
|
var model = htmlspecialchars(getPropertyValue(data.properties, 'DEVICE_MODEL'));
|
|
|
|
var vendor = getPropertyValue(data.properties, 'VENDOR');
|
|
|
|
var vendor = htmlspecialchars(getPropertyValue(data.properties, 'VENDOR'));
|
|
|
|
var owner = data.user;
|
|
|
|
var owner = htmlspecialchars(data.user);
|
|
|
|
var status = data.status;
|
|
|
|
var status = htmlspecialchars(data.status);
|
|
|
|
var ownership = data.ownership;
|
|
|
|
var ownership = htmlspecialchars(data.ownership);
|
|
|
|
var deviceType = data.deviceType;
|
|
|
|
var deviceType = htmlspecialchars(data.deviceType);
|
|
|
|
var category = getDeviceTypeCategory(deviceType);
|
|
|
|
var category = getDeviceTypeCategory(deviceType);
|
|
|
|
$.each($('td', row), function (colIndex) {
|
|
|
|
$.each($('td', row), function (colIndex) {
|
|
|
|
switch (colIndex) {
|
|
|
|
switch (colIndex) {
|
|
|
@ -417,6 +417,10 @@ function loadDevices(searchType, searchParam) {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function htmlspecialchars(text){
|
|
|
|
|
|
|
|
return jQuery('<div/>').text(text).html();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var dataFilter = function (data) {
|
|
|
|
var dataFilter = function (data) {
|
|
|
|
data = JSON.parse(data);
|
|
|
|
data = JSON.parse(data);
|
|
|
|
var objects = [];
|
|
|
|
var objects = [];
|
|
|
|