added auto port finding to both web apps
This commit is contained in:
@@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
if (!window.WebSocket) alert("WebSocket not supported by this browser");
|
if (!window.WebSocket) alert("WebSocket not supported by this browser");
|
||||||
var ws = new WebSocket("ws://{{request.url.hostname}}:10000/dashboard/ws");
|
var ws = new WebSocket("ws://{{request.url.hostname}}:{{request.url.port}}/dashboard/ws");
|
||||||
let all_data = []
|
let all_data = []
|
||||||
let all_labels = []
|
let all_labels = []
|
||||||
ws.onmessage = function(event) {
|
ws.onmessage = function(event) {
|
||||||
|
|||||||
@@ -91,7 +91,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
var ws = new WebSocket("ws://{{request.url.hostname}}:80/miner/{{miner}}/ws");
|
var ws = new WebSocket("ws://{{request.url.hostname}}:{{request.url.port}}/miner/{{miner}}/ws");
|
||||||
let all_data = []
|
let all_data = []
|
||||||
let all_labels = []
|
let all_labels = []
|
||||||
ws.onmessage = function(event) {
|
ws.onmessage = function(event) {
|
||||||
|
|||||||
@@ -56,7 +56,7 @@
|
|||||||
window.post = function(url, data) {
|
window.post = function(url, data) {
|
||||||
return fetch(url, {method: "POST", headers: {'Content-Type': 'application/json'}, body: JSON.stringify(data)});
|
return fetch(url, {method: "POST", headers: {'Content-Type': 'application/json'}, body: JSON.stringify(data)});
|
||||||
}
|
}
|
||||||
var ws = new WebSocket("ws://{{request.url.hostname}}:80/scan/ws");
|
var ws = new WebSocket("ws://{{request.url.hostname}}:{{request.url.port}}/scan/ws");
|
||||||
ws.onmessage = function(event) {
|
ws.onmessage = function(event) {
|
||||||
if (event.data == "Done") {
|
if (event.data == "Done") {
|
||||||
document.getElementById("scanButton").innerHTML = "Scan"
|
document.getElementById("scanButton").innerHTML = "Scan"
|
||||||
|
|||||||
Reference in New Issue
Block a user