mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-07 09:36:05 -08:00
docs
This commit is contained in:
@@ -357,35 +357,20 @@ function filterDataByStatus(data, status) {
|
||||
return data.filter(function(item) {
|
||||
switch (status) {
|
||||
case 'my':
|
||||
to_display = getSetting('UI_MY_DEVICES')
|
||||
|
||||
console.log(to_display)
|
||||
|
||||
result = false;
|
||||
|
||||
if (to_display.includes('online') && item.dev_PresentLastScan === 1)
|
||||
{
|
||||
result = true;
|
||||
}
|
||||
to_display = getSetting('UI_MY_DEVICES');
|
||||
|
||||
if (to_display.includes('offline') && item.dev_PresentLastScan === 0)
|
||||
{
|
||||
result = true;
|
||||
}
|
||||
let result = false;
|
||||
|
||||
if (to_display.includes('archived') && item.dev_Archived === 1)
|
||||
{
|
||||
result = true;
|
||||
}
|
||||
|
||||
if (to_display.includes('new') && item.dev_NewDevice === 1)
|
||||
{
|
||||
result = true;
|
||||
}
|
||||
|
||||
if (to_display.includes('down') && item.dev_PresentLastScan === 0 && item.dev_AlertDeviceDown !== 0)
|
||||
{
|
||||
result = true;
|
||||
if (to_display.includes('online') && item.dev_PresentLastScan === 1) {
|
||||
result = true;
|
||||
} else if (to_display.includes('offline') && item.dev_PresentLastScan === 0) {
|
||||
result = true;
|
||||
} else if (to_display.includes('archived') && item.dev_Archived === 1) {
|
||||
result = true;
|
||||
} else if (to_display.includes('new') && item.dev_NewDevice === 1) {
|
||||
result = true;
|
||||
} else if (to_display.includes('down') && item.dev_PresentLastScan === 0 && item.dev_AlertDeviceDown !== 0) {
|
||||
result = true;
|
||||
}
|
||||
|
||||
return result; // Include all items for 'my' status
|
||||
|
||||
Reference in New Issue
Block a user