started adding HTML files for the web monitor program
This commit is contained in:
16
tools/web_monitor/scan_page.py
Normal file
16
tools/web_monitor/scan_page.py
Normal 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)
|
||||
}
|
||||
))
|
||||
Reference in New Issue
Block a user