guest_worker/www/backend.html

55 lines
1 KiB
HTML
Raw Normal View History

2019-10-31 13:35:24 +00:00
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="stylesheet" type="text/css" href="backend.css" />
2019-11-04 08:24:37 +00:00
<!-- <meta http-equiv="refresh" content="20">-->
2019-10-31 13:35:24 +00:00
</head>
<body>
<div id="wrapper">
<div id="header"><span id="aai">Artificial Artificial Intelligence</span> <img src="amazon.svg" /> </div>
2019-10-31 13:35:24 +00:00
<table>
<thead>
<tr>
<th></th>
<th>worker id</th>
<th>ip address</th>
<th>country</th>
<th>fee</th>
<th>task start time</th>
<th>task completion time</th>
<th></th>
</tr>
</thead>
<tbody>
{{TBODY}}
</tbody>
</table>
</div>
2019-11-04 08:24:37 +00:00
<script src='/worker_specs/reconnecting-websocket.min.js'></script>
<script type='text/javascript'>
let ws = new ReconnectingWebSocket('ws://localhost:8888/status/ws')
ws.addEventListener('open', () => {
// ws.send('hi server')
})
ws.addEventListener('message', (event) => {
console.log('message: ' + event.data)
let data = JSON.parse(event.data)
if(data.property === 'hit_id') {
window.location.reload();
}
})
</script>
2019-10-31 13:35:24 +00:00
</body>
</html>