feat(instanceDetails): replace API logs with WebSocket for real-time updates
Implement WebSocket connection for instance logs to enable real-time updates instead of periodic API polling. Remove deprecated API endpoints and update log display styling with level-specific backgrounds. Add cleanup on component unmount to prevent memory leaks.
This commit is contained in:
@@ -86,8 +86,6 @@ export const instanceApi = {
|
||||
api.get(`/frpcAct/instanceMgr/getInfo?instanceID=${instanceID}`),
|
||||
getInstanceStatus: (instanceID) =>
|
||||
api.get(`/frpcAct/instanceMgr/status?instanceID=${instanceID}`),
|
||||
getInstanceLogs: (instanceID) =>
|
||||
api.post('/frpcAct/instanceMgr/logs', { instanceID }),
|
||||
getInstanceProxies: (instanceID) =>
|
||||
api.get(`/frpcAct/proxyMgr/list?instanceID=${instanceID}`),
|
||||
createProxy: (instanceID, proxyInfo) =>
|
||||
@@ -109,9 +107,6 @@ export const systemInfoApi = {
|
||||
export default api;
|
||||
|
||||
export const TODO_API_NOTES = {
|
||||
instanceLogs: 'TODO: /frpcAct/instanceMgr/logs - 获取实例日志 API 未在 api-backend.md 中定义',
|
||||
instanceProxies: 'TODO: /frpcAct/instanceMgr/proxies - 获取实例代理列表 API 未在 api-backend.md 中定义',
|
||||
logList: 'TODO: /logMgr/list - 获取系统日志 API 未在 api-backend.md 中定义',
|
||||
monitorStats: 'TODO: /monitor/stats - 获取系统监控数据 API 未在 api-backend.md 中定义',
|
||||
systemInfo: 'TODO: /system/info - 获取系统信息 API 未在 api-backend.md 中定义'
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user