Browse Source

111

feature/MultiClientLog
root 1 month ago
parent
commit
5d979b3310
  1. 25
      LTEMvcApp/Views/Home/Logs.cshtml

25
LTEMvcApp/Views/Home/Logs.cshtml

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

Loading…
Cancel
Save