##// END OF EJS Templates
Disable websocket by default. Use JS thread update when websockets are...
neko259 -
r1147:24687cf5 default
parent child Browse files
Show More
@@ -20,4 +20,4 b' ARCHIVE_THREADS = True'
20 # Limit posting speed
20 # Limit posting speed
21 LIMIT_POSTING_SPEED = False
21 LIMIT_POSTING_SPEED = False
22 # Thread update
22 # Thread update
23 WEBSOCKETS_ENABLED = True
23 WEBSOCKETS_ENABLED = False
@@ -50,7 +50,7 b' function connectWebsocket() {'
50 var wsHost = metapanel.getAttribute('data-ws-host');
50 var wsHost = metapanel.getAttribute('data-ws-host');
51 var wsPort = metapanel.getAttribute('data-ws-port');
51 var wsPort = metapanel.getAttribute('data-ws-port');
52
52
53 if (wsHost.length > 0 && wsPort.length > 0)
53 if (wsHost.length > 0 && wsPort.length > 0) {
54 var centrifuge = new Centrifuge({
54 var centrifuge = new Centrifuge({
55 "url": 'ws://' + wsHost + ':' + wsPort + "/connection/websocket",
55 "url": 'ws://' + wsHost + ':' + wsPort + "/connection/websocket",
56 "project": metapanel.getAttribute('data-ws-project'),
56 "project": metapanel.getAttribute('data-ws-project'),
@@ -80,6 +80,9 b' function connectWebsocket() {'
80 centrifuge.connect();
80 centrifuge.connect();
81
81
82 return true;
82 return true;
83 } else {
84 return false;
85 }
83 }
86 }
84
87
85 /**
88 /**
@@ -204,7 +207,11 b' function initAutoupdate() {'
204 if (location.protocol === 'https:') {
207 if (location.protocol === 'https:') {
205 return enableJsUpdate();
208 return enableJsUpdate();
206 } else {
209 } else {
207 return connectWebsocket();
210 if (connectWebsocket()) {
211 return true;
212 } else {
213 return enableJsUpdate();
214 }
208 }
215 }
209 }
216 }
210
217
General Comments 0
You need to be logged in to leave comments. Login now