Set default fallback wsport + small fix.

This commit is contained in:
gerlofvanek 2025-03-03 21:22:32 +01:00
parent 3489ebe908
commit 30270d87f1
5 changed files with 20 additions and 19 deletions

View file

@ -282,7 +282,7 @@ const WebSocketManager = {
}
if (!wsPort) {
wsPort = window.ws_port || '11701';
wsPort = window.ws_port || '11700';
}
console.log("Using WebSocket port:", wsPort);

View file

@ -370,7 +370,7 @@ const WebSocketManager = {
wsPort = window.config.port;
}
if (!wsPort) {
wsPort = window.ws_port || '11701';
wsPort = window.ws_port || '11700';
}
console.log("Using WebSocket port:", wsPort);
this.ws = new WebSocket(`ws://${window.location.hostname}:${wsPort}`);

View file

@ -269,7 +269,7 @@ const WebSocketManager = {
}
if (!wsPort) {
wsPort = window.ws_port || '11701';
wsPort = window.ws_port || '11700';
}
console.log("Using WebSocket port:", wsPort);

View file

@ -120,6 +120,23 @@
updateShutdownButtons();
});
</script>
<script>
function getAPIKeys() {
return {
cryptoCompare: "{{ chart_api_key|safe }}",
coinGecko: "{{ coingecko_api_key|safe }}"
};
}
function getWebSocketConfig() {
return {
port: "{{ ws_port|safe }}",
fallbackPort: "11700"
};
}
</script>
</head>
<body class="dark:bg-gray-700">

View file

@ -8,22 +8,6 @@
};
</script>
<script>
function getAPIKeys() {
return {
cryptoCompare: "{{ chart_api_key|safe }}",
coinGecko: "{{ coingecko_api_key|safe }}"
};
}
function getWebSocketConfig() {
return {
port: "{{ ws_port|safe }}",
fallbackPort: "11700"
};
}
</script>
<section class="py-3 px-4 mt-6">
<div class="lg:container mx-auto">
<div class="relative py-8 px-8 bg-coolGray-900 dark:bg-gray-500 rounded-md overflow-hidden">