-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
63 lines (52 loc) · 2.01 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<html>
<head>
<title>Chat</title>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/1.4.8/socket.io.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
</head>
<body>
<script type="text/javascript">
$(document).ready(function() {
var socket = io.connect('http://0.0.0.0:9000');
socket.on('connect', function() {
socket.send('User has connected!');
console.log('Connect to main node');
});
// --------------------------------------------------
socket.on('main_config', function (msg) {
$("#messages").append('<li>' + JSON.stringify(msg) + '</li>');
console.log('main_config:', msg);
// {"global_config": global_config, "task": task_config}
})
socket.on('info', function (msg) {
$("#messages").append('<li>' + 'info:' + JSON.stringify(msg) + '</li>');
console.log('info:', msg);
// {"global_config": global_config, "task": task_config}
})
socket.on('task result', function(msg) {
$("#messages").append('<li>'+JSON.stringify(msg)+'</li>');
console.log('task result:', msg);
// temp = {'configuration': configuration, "result": result[2]}
});
socket.on('regression', function(msg) {
$("#messages").append('<li>'+JSON.stringify(msg)+'</li>');
console.log('regression', msg);
// {"regression": {'configuration': configuration, "prediction": value}}
});
socket.on('best point', function(msg) {
$("#messages").append('<li>'+JSON.stringify(msg)+'</li>');
console.log('best point:', msg);
// temp = {"best point": {'configuration': configuration, "result": value}}
});
socket.on('default conf', function(msg) {
$("#messages").append('<li>'+JSON.stringify(msg)+'</li>');
console.log('default conf:', msg);
// {'conf': default_features, "result": default_value}
});
});
</script>
<ul id="messages"></ul>
</body>
</html>
<!--
-->