Fix log watch streaming issue where if you page away and page back - messages aren't being drawn until you refresh

This commit is contained in:
Akkadius 2017-09-21 16:32:42 -05:00
parent ff5c9fe224
commit 11eaebedd1
4 changed files with 4 additions and 3 deletions

View File

@ -4,6 +4,7 @@ function log_action (action){
socket.send(JSON.stringify({"event_unsubscribe": "dhcp_log_subscription"}));
break;
case "start":
killed_connection = 0;
console.log('start readystate is ' + socket.readyState);
socket.send(JSON.stringify({"event_subscription": "dhcp_log_subscription"}));
break;

View File

@ -6,7 +6,7 @@ function check_websocket_connection () {
}
function connect_websocket() {
var killed_connection = 0;
killed_connection = 0;
delete socket;
socket = new WebSocket("ws://" + window.location.hostname + ":8080");

View File

@ -4,7 +4,7 @@
<div class="card">
<div class="header">
<h2>
GET: Active Leases Data
GET: Active Leases Data <small>(Full Lease Data - this can be heavy) Drawing the JSON response in the browser screen takes longer than the response itself</small>
</h2>
</div>
<div class="body">

View File

@ -34,4 +34,4 @@
<script src="assets/js/ace_editor/ace.js" type="text/javascript" charset="utf-8"></script>
<script src="assets/js/ace_editor/theme-terminal.js" type="text/javascript" charset="utf-8"></script>
<script src="assets/js/glass-pages/dhcp-logs.js" type="text/javascript" charset="utf-8"></script>
<script src="assets/js/glass-pages/dhcp-logs.js" type="text/javascript" charset="utf-8"></script>