started adding HTML files for the web monitor program

This commit is contained in:
UpstreamData
2022-02-24 08:57:23 -07:00
parent 4a10efd7a4
commit d330e2e978
6 changed files with 199 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
from tools.web_monitor.app import sio
import json
async def scan_found_miner(miner):
"""Send data to client that a miner was scanned.
:param miner: The miner object that was scanned.
"""
await sio.emit('scan_found_miner', json.dumps(
{
"ip": str(miner.ip),
"model": str(miner.model),
"api": str(miner.api_type)
}
))