1 /***************************************************************************** |
1 /***************************************************************************** |
2 * Copyright (C) 2014-2020 |
2 * Copyright (C) 2014-2021 |
3 * |
3 * |
4 * Michiel Broek <mbroek at mbse dot eu> |
4 * Michiel Broek <mbroek at mbse dot eu> |
5 * |
5 * |
6 * This file is part of BrewCloud |
6 * This file is part of BMS |
7 * |
7 * |
8 * This is free software; you can redistribute it and/or modify it |
8 * This is free software; you can redistribute it and/or modify it |
9 * under the terms of the GNU General Public License as published by the |
9 * under the terms of the GNU General Public License as published by the |
10 * Free Software Foundation; either version 2, or (at your option) any |
10 * Free Software Foundation; either version 2, or (at your option) any |
11 * later version. |
11 * later version. |
771 mashlist = new $.jqx.dataAdapter(mashProfileSource); |
771 mashlist = new $.jqx.dataAdapter(mashProfileSource); |
772 |
772 |
773 /* Websocket interface. Place "websocket.onmessage = function(evt) {}" in the user script. */ |
773 /* Websocket interface. Place "websocket.onmessage = function(evt) {}" in the user script. */ |
774 var websocket = new ReconnectingWebSocket('ws://'+location.hostname+'/ws'); |
774 var websocket = new ReconnectingWebSocket('ws://'+location.hostname+'/ws'); |
775 |
775 |
776 websocket.onopen = function(evt) { |
|
777 $('#wsstatus').html('WebSocket open'); |
|
778 } |
|
779 |
|
780 websocket.onclose = function(evt) { |
|
781 $('#wsstatus').html('WebSocket closed'); |
|
782 } |
|
783 |
|
784 websocket.onerror = function(event) { |
776 websocket.onerror = function(event) { |
785 console.log('Websocket error: ' + event.data); |
777 console.log('Websocket error: ' + event.data); |
786 $('#wsstatus').html('WebSocket error: ' + event.data); |
|
787 } |
778 } |
788 |
779 |
789 $(document).ready(function() { |
780 $(document).ready(function() { |
790 |
781 |
791 $('#jqxMenu').jqxMenu({ |
782 $('#jqxMenu').jqxMenu({ |