Filter offline clients
This commit is contained in:
parent
21be34ee3a
commit
8368d3fede
|
@ -75,6 +75,8 @@ function getDevices() {
|
|||
(devices = devices.concat(pageDevices))
|
||||
)
|
||||
|
||||
devices = devices.filter(device => device.ST == 'Online')
|
||||
|
||||
resolve(devices)
|
||||
} catch (e) {
|
||||
logError({
|
||||
|
@ -92,7 +94,8 @@ export async function getOnlineWifiDevices() {
|
|||
|
||||
const now = new Date()
|
||||
|
||||
const restructuredOnlineDevices = onlineDevices.map(client => ({
|
||||
const restructuredOnlineDevices = onlineDevices.map(client => {
|
||||
return {
|
||||
user: client.Name == 'unknown' ? null : client.Name,
|
||||
identity: client.Name == 'unknown' ? null : client.Name,
|
||||
oui: ouiFinder(client.macaddr),
|
||||
|
@ -111,7 +114,8 @@ export async function getOnlineWifiDevices() {
|
|||
protocol: client.PT,
|
||||
speed: client.SD,
|
||||
usage: client.bytes_total || 0
|
||||
}))
|
||||
}
|
||||
})
|
||||
|
||||
return restructuredOnlineDevices
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user