Fix new Frontend 9
This commit is contained in:
@@ -30,6 +30,23 @@ export {
|
|||||||
useApiHooks,
|
useApiHooks,
|
||||||
} from './hooks';
|
} 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 types
|
||||||
export * from './types';
|
export * from './types';
|
||||||
|
|
||||||
|
|||||||
@@ -95,9 +95,10 @@ export const useWebSocket = (config: WebSocketConfig) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Hook for training job updates
|
// Hook for training job updates
|
||||||
export const useTrainingWebSocket = (tenantId: string) => {
|
export const useTrainingWebSocket = (jobId: string) => {
|
||||||
|
|
||||||
const config: WebSocketConfig = {
|
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,
|
reconnect: true,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user