debugging web ui
This commit is contained in:
@ -267,7 +267,9 @@
|
||||
|
||||
async function loadInitialData() {
|
||||
try {
|
||||
const response = await fetch('/api/health');
|
||||
// Use port 8080 for API calls since that's where our API runs
|
||||
const apiUrl = `http://${window.location.hostname}:8080/api/health`;
|
||||
const response = await fetch(apiUrl);
|
||||
if (response.ok) {
|
||||
const data = await response.json();
|
||||
updateSystemStatus(data);
|
||||
@ -283,7 +285,9 @@
|
||||
|
||||
function connectWebSocket() {
|
||||
const protocol = window.location.protocol === 'https:' ? 'wss:' : 'ws:';
|
||||
const wsUrl = `${protocol}//${window.location.host}/ws/dashboard`;
|
||||
// Use port 8080 for WebSocket connection since that's where our API runs
|
||||
const host = window.location.hostname;
|
||||
const wsUrl = `${protocol}//${host}:8080/ws/dashboard`;
|
||||
|
||||
ws = new WebSocket(wsUrl);
|
||||
|
||||
|
Reference in New Issue
Block a user