-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
29 lines (28 loc) · 895 Bytes
/
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
<!doctype html>
<html>
<head>
<title>Incident Board</title>
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font: 13px Helvetica, Arial; }
#messages { list-style-type: none; margin: 0; padding: 0; }
#messages li { padding: 5px 10px; }
#messages li:nth-child(odd) { background: #eee; }
</style>
</head>
<body>
Messages:
<ul id="messages"></ul>
<script src="/socket.io/socket.io.js"></script>
<script src="https://code.jquery.com/jquery-1.11.1.js"></script>
<script>
$(function () {
var socket = io();
socket.on('webhook-fired', function(msg){
console.dir(msg)
$('#messages').append($('<li>').text(msg.payload.incident.fire_department.name + ':' + msg.payload.incident.description.incident_number + ' updated'));
});
});
</script>
</body>
</html>