Add nightly realm reports and observed bot activity explanations
Core tests / core (push) Successful in 59s
Core tests / core (push) Successful in 59s
This commit is contained in:
@@ -195,6 +195,12 @@ class Handler(BaseHTTPRequestHandler):
|
||||
at = data['rosterAt'] if data else 0
|
||||
from datetime import datetime, timezone
|
||||
self.reply(200, json.dumps({'ok':bool(data),'ale':{'lastEventAt':datetime.fromtimestamp(at,timezone.utc).isoformat() if at else None,'activeRecently':bool(data and not data['stale'])},'events':[],'commands':{}}).encode())
|
||||
elif path == '/api/realm-insights':
|
||||
try:
|
||||
# Fixed read-only endpoint: public aggregate facts and bot activity only.
|
||||
self.reply(200, local_get('/api/realm-insights'))
|
||||
except Exception:
|
||||
self.reply(503,b'{"error":"Realm insights unavailable"}')
|
||||
elif path == '/api/operations':
|
||||
try:
|
||||
health = json.loads(local_get('/api/operations'))
|
||||
|
||||
Reference in New Issue
Block a user