Fix new Frontend 9
This commit is contained in:
@@ -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';
|
||||
|
||||
|
||||
@@ -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,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user