Fix new Frontend 9

This commit is contained in:
Urtzi Alfaro
2025-08-04 13:02:46 +02:00
parent 73c523f193
commit e052a72161
3 changed files with 683 additions and 258 deletions

View File

@@ -30,6 +30,23 @@ export {
useApiHooks,
} from './hooks';
// Export WebSocket functionality
export {
WebSocketManager,
useWebSocket,
useTrainingWebSocket,
useForecastWebSocket,
} from './websocket';
// Export WebSocket types
export type {
WebSocketConfig,
WebSocketMessage,
WebSocketHandlers,
WebSocketStatus,
WebSocketMetrics,
} from './websocket';
// Export types
export * from './types';

View File

@@ -95,9 +95,10 @@ export const useWebSocket = (config: WebSocketConfig) => {
};
// Hook for training job updates
export const useTrainingWebSocket = (tenantId: string) => {
export const useTrainingWebSocket = (jobId: string) => {
const config: WebSocketConfig = {
url: `ws://localhost:8000/api/v1/ws/training/${tenantId}`,
url: `ws://localhost:8002/api/v1/ws/tenants/{tenant_id}/training/jobs/${jobId}/live`,
reconnect: true,
};

File diff suppressed because it is too large Load Diff