feat: add pipeline status monitoring dialog

- Add pipeline status API and types
- Create PipelineStatusDialog component with position control
- Unify modal overlay style across components
This commit is contained in:
yangdx
2025-03-26 12:05:54 +08:00
parent e1d43ee831
commit d7c0b420b9
5 changed files with 245 additions and 12 deletions

View File

@@ -141,6 +141,20 @@ export type AuthStatusResponse = {
api_version?: string
}
export type PipelineStatusResponse = {
autoscanned: boolean
busy: boolean
job_name: string
job_start?: string
docs: number
batchs: number
cur_batch: number
request_pending: boolean
latest_message: string
history_messages?: string[]
update_status?: Record<string, any>
}
export type LoginResponse = {
access_token: string
token_type: string
@@ -424,6 +438,11 @@ export const getAuthStatus = async (): Promise<AuthStatusResponse> => {
}
}
export const getPipelineStatus = async (): Promise<PipelineStatusResponse> => {
const response = await axiosInstance.get('/documents/pipeline_status')
return response.data
}
export const loginToServer = async (username: string, password: string): Promise<LoginResponse> => {
const formData = new FormData();
formData.append('username', username);