URL Websocket K-Psul
This commit is contained in:
parent
f6fa13fa95
commit
6ba8c9e741
1 changed files with 3 additions and 1 deletions
|
@ -1085,7 +1085,9 @@ $(document).ready(function() {
|
|||
websocket_msg_default = {'opegroups':[],'opes':[],'checkouts':[],'articles':[]}
|
||||
|
||||
var websocket_protocol = window.location.protocol == 'https:' ? 'wss' : 'ws';
|
||||
socket = new ReconnectingWebSocket(websocket_protocol+"://" + window.location.host + "/ws/k-fet/k-psul/");
|
||||
var location_host = window.location.host;
|
||||
var location_url = window.location.pathname.startsWith('/gestion/') ? location_host + '/gestion' : location_host;
|
||||
socket = new ReconnectingWebSocket(websocket_protocol+"://" + location_url + "/ws/k-fet/k-psul/");
|
||||
socket.onmessage = function(e) {
|
||||
data = $.extend({}, websocket_msg_default, JSON.parse(e.data));
|
||||
|
||||
|
|
Loading…
Reference in a new issue