mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-25 08:06:48 +08:00
Add task executor bar chart, add system version string (#11155)
### What problem does this PR solve? - Add task executor bar chart - Add read version string ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -101,8 +101,6 @@ request.interceptors.response.use(
|
||||
);
|
||||
|
||||
const {
|
||||
getSystemVersion: _getSystemVersion,
|
||||
|
||||
adminLogin,
|
||||
adminLogout,
|
||||
adminListUsers,
|
||||
@ -136,6 +134,8 @@ const {
|
||||
adminUpdateWhitelistEntry,
|
||||
adminDeleteWhitelistEntry,
|
||||
adminImportWhitelist,
|
||||
|
||||
adminGetSystemVersion,
|
||||
} = api;
|
||||
|
||||
type ResponseData<D = NonNullable<unknown>> = {
|
||||
@ -260,4 +260,4 @@ export const importWhitelistFromExcel = (file: File) => {
|
||||
};
|
||||
|
||||
export const getSystemVersion = () =>
|
||||
request.get<ResponseData<string>>(_getSystemVersion);
|
||||
request.get<ResponseData<{ version: string }>>(adminGetSystemVersion);
|
||||
|
||||
31
web/src/services/admin.service.d.ts
vendored
31
web/src/services/admin.service.d.ts
vendored
@ -66,6 +66,21 @@ declare module AdminService {
|
||||
title: string;
|
||||
};
|
||||
|
||||
export type TaskExectorHeartbeatItem = {
|
||||
name: string;
|
||||
boot_at: string;
|
||||
now: string;
|
||||
ip_address: string;
|
||||
current: Record<string, object>;
|
||||
done: number;
|
||||
failed: number;
|
||||
lag: number;
|
||||
pending: number;
|
||||
pid: number;
|
||||
};
|
||||
|
||||
export type TaskExecutorInfo = Record<string, TaskExectorHeartbeatItem[]>;
|
||||
|
||||
export type ListServicesItem = {
|
||||
extra: Record<string, unknown>;
|
||||
host: string;
|
||||
@ -76,11 +91,17 @@ declare module AdminService {
|
||||
status: 'alive' | 'timeout' | 'fail';
|
||||
};
|
||||
|
||||
export type ServiceDetail = {
|
||||
service_name: string;
|
||||
status: 'alive' | 'timeout';
|
||||
message: string | Record<string, any> | Record<string, any>[];
|
||||
};
|
||||
export type ServiceDetail =
|
||||
| {
|
||||
service_name: string;
|
||||
status: 'alive' | 'timeout';
|
||||
message: string | Record<string, any> | Record<string, any>[];
|
||||
}
|
||||
| {
|
||||
service_name: 'task_executor';
|
||||
status: 'alive' | 'timeout';
|
||||
message: AdminService.TaskExecutorInfo;
|
||||
};
|
||||
|
||||
export type PermissionData = {
|
||||
enable: boolean;
|
||||
|
||||
Reference in New Issue
Block a user