fix
This commit is contained in:
parent
5678e90ae6
commit
24585ef523
2 changed files with 4 additions and 2 deletions
|
@ -130,7 +130,8 @@ Plotly.d3.csv("/1h.csv", function(err, rows){
|
|||
|
||||
Plotly.newPlot('graph', data, layout);
|
||||
|
||||
var wsUri = window.location.toString().replace('http','ws') + "ws";
|
||||
var url = window.location.toString().replace('http','ws');
|
||||
var wsUri = url.substring(0, url.lastIndexOf("/")) + "/ws";
|
||||
|
||||
var connectSocket = function() {
|
||||
websocket = new WebSocket(wsUri);
|
||||
|
|
|
@ -133,7 +133,8 @@ Plotly.d3.csv("/{{ code }}.csv", function(err, rows){
|
|||
|
||||
Plotly.newPlot('graph', data, layout);
|
||||
|
||||
var wsUri = window.location.toString().replace('http','ws') + "ws";
|
||||
var url = window.location.toString().replace('http','ws');
|
||||
var wsUri = url.substring(0, url.lastIndexOf("/")) + "/ws";
|
||||
|
||||
var connectSocket = function() {
|
||||
websocket = new WebSocket(wsUri);
|
||||
|
|
Loading…
Reference in a new issue