mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Adding filter value options for data-dep-status and data-boolean
This commit is contained in:
parent
e996f1f9f0
commit
f3da8d4a57
@ -74,6 +74,7 @@ if (uriMatcher.match("/{context}/api/data-tables/invoker/filters")) {
|
||||
}
|
||||
//Adding policy compliance
|
||||
result.compliance = ["MONITOR", "ENFORCE", "WARN", "BLOCK"];
|
||||
result.depStatus = ["Empty", "Assigned", "Pushed", "Removed"];
|
||||
response["status"] = 200;
|
||||
response["content"] = result;
|
||||
response["contentType"] = "application/json";
|
||||
|
||||
@ -134,6 +134,14 @@ $.fn.datatables_extended = function (settings) {
|
||||
var compliance = cachedFilterRes.compliance[i];
|
||||
select.append('<option value="' + compliance + '">' + compliance + '</option>')
|
||||
}
|
||||
} else if (filterColumn.eq(column.index()).hasClass('data-dep-status')) {
|
||||
for(i = 0; i < cachedFilterRes.deviceTypes.length; i++){
|
||||
var depStatus = cachedFilterRes.depStatus[i];
|
||||
select.append('<option value="' + depStatus + '">' + depStatus + '</option>')
|
||||
}
|
||||
} else if (filterColumn.eq(column.index()).hasClass('data-boolean')) {
|
||||
select.append('<option value="true">Enabled</option>');
|
||||
select.append('<option value="false">Disabled</option>');
|
||||
} else if ($(column.nodes()).attr('data-search')) {
|
||||
var values = [];
|
||||
column.nodes().unique().sort().each(function (d, j) {
|
||||
|
||||
@ -202,6 +202,14 @@ $.fn.datatables_extended_serverside_paging = function (settings, url, dataFilter
|
||||
var compliance = cachedFilterRes.compliance[i];
|
||||
select.append('<option value="' + compliance + '">' + compliance + '</option>')
|
||||
}
|
||||
} else if (filterColumn.eq(column.index()).hasClass('data-dep-status')) {
|
||||
for(i = 0; i < cachedFilterRes.deviceTypes.length; i++){
|
||||
var depStatus = cachedFilterRes.depStatus[i];
|
||||
select.append('<option value="' + depStatus + '">' + depStatus + '</option>')
|
||||
}
|
||||
} else if (filterColumn.eq(column.index()).hasClass('data-boolean')) {
|
||||
select.append('<option value="true">Enabled</option>');
|
||||
select.append('<option value="false">Disabled</option>');
|
||||
} else if ($(column.nodes()).attr('data-search')) {
|
||||
var titles = [];
|
||||
column.nodes().unique().sort().each(function (d, j) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user