|
|
@ -1385,17 +1385,20 @@ |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
connectionStatusBtn.addEventListener('click', function() { |
|
|
|
fetch('/api/log/connection-status') |
|
|
|
.then(response => response.json()) |
|
|
|
.then(data => { |
|
|
|
console.log('SSE连接状态:', data); |
|
|
|
showInfo('连接状态信息已输出到控制台'); |
|
|
|
}) |
|
|
|
.catch(error => { |
|
|
|
showError('获取连接状态失败: ' + error.message); |
|
|
|
}); |
|
|
|
}); |
|
|
|
var connectionStatusBtn = document.getElementById('connectionStatusBtn'); |
|
|
|
if (connectionStatusBtn) { |
|
|
|
connectionStatusBtn.addEventListener('click', function() { |
|
|
|
fetch('/api/log/connection-status') |
|
|
|
.then(response => response.json()) |
|
|
|
.then(data => { |
|
|
|
console.log('SSE连接状态:', data); |
|
|
|
showInfo('连接状态信息已输出到控制台'); |
|
|
|
}) |
|
|
|
.catch(error => { |
|
|
|
showError('获取连接状态失败: ' + error.message); |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
testConnectionBtn.addEventListener('click', function() { |
|
|
|
fetch('/api/log/test-connection') |
|
|
|