Added captive portal authorized clients count #200

This commit is contained in:
Tomaae 2022-06-25 15:18:00 +02:00
parent 981668032e
commit e14d018b20
No known key found for this signature in database
GPG key ID: 8360BBD8A381D1C0
2 changed files with 23 additions and 0 deletions

View file

@ -1381,6 +1381,7 @@ class MikrotikControllerData:
{"name": "uptime_epoch", "default": 0},
{"name": "clients_wired", "default": 0},
{"name": "clients_wireless", "default": 0},
{"name": "captive_authorized", "default": 0},
],
)
@ -1547,6 +1548,13 @@ class MikrotikControllerData:
],
)
auth_hosts = sum(
1
for uid in self.data["hostspot_host"]
if self.data["hostspot_host"][uid]["authorized"]
)
self.data["resource"]["captive_authorized"] = auth_hosts
# ---------------------------
# get_queue
# ---------------------------