mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-06-29 15:31:05 +08:00
Fix: The document management table cannot be displayed. (#13967)
### What problem does this PR solve? Fix: The document management table cannot be displayed. ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Improved table layout and overflow behavior in the files view to ensure proper scrolling and display. * **Chores** * Removed unused system status functionality and cleaned up service methods. * Updated TypeScript configuration for compatibility. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -5,7 +5,6 @@ import { IToken } from '@/interfaces/database/chat';
|
||||
import { ITenantInfo } from '@/interfaces/database/knowledge';
|
||||
import { ILangfuseConfig } from '@/interfaces/database/system';
|
||||
import {
|
||||
ISystemStatus,
|
||||
ITenant,
|
||||
ITenantUser,
|
||||
IUserInfo,
|
||||
@@ -221,28 +220,6 @@ export const useFetchSystemVersion = () => {
|
||||
return { fetchSystemVersion, version, loading };
|
||||
};
|
||||
|
||||
export const useFetchSystemStatus = () => {
|
||||
const [systemStatus, setSystemStatus] = useState<ISystemStatus>(
|
||||
{} as ISystemStatus,
|
||||
);
|
||||
const [loading, setLoading] = useState(false);
|
||||
|
||||
const fetchSystemStatus = useCallback(async () => {
|
||||
setLoading(true);
|
||||
const { data } = await userService.getSystemStatus();
|
||||
if (data.code === 0) {
|
||||
setSystemStatus(data.data);
|
||||
setLoading(false);
|
||||
}
|
||||
}, []);
|
||||
|
||||
return {
|
||||
systemStatus,
|
||||
fetchSystemStatus,
|
||||
loading,
|
||||
};
|
||||
};
|
||||
|
||||
export const useFetchManualSystemTokenList = () => {
|
||||
const {
|
||||
data,
|
||||
|
||||
@@ -278,7 +278,7 @@ export function FilesTable({
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="flex-1 h-0 size-full">
|
||||
<div className="flex-1 min-h-0 size-full">
|
||||
<Table rootClassName="max-h-full overflow-auto">
|
||||
<TableHeader>
|
||||
{table.getHeaderGroups().map((headerGroup) => (
|
||||
|
||||
@@ -18,7 +18,6 @@ const {
|
||||
delete_llm,
|
||||
enable_llm,
|
||||
deleteFactory,
|
||||
getSystemStatus,
|
||||
getSystemVersion,
|
||||
getSystemTokenList,
|
||||
removeSystemToken,
|
||||
@@ -84,10 +83,6 @@ const methods = {
|
||||
url: enable_llm,
|
||||
method: 'post',
|
||||
},
|
||||
getSystemStatus: {
|
||||
url: getSystemStatus,
|
||||
method: 'get',
|
||||
},
|
||||
getSystemVersion: {
|
||||
url: getSystemVersion,
|
||||
method: 'get',
|
||||
|
||||
1
web/typings.d.ts → web/src/typings.d.ts
vendored
1
web/typings.d.ts → web/src/typings.d.ts
vendored
@@ -8,6 +8,7 @@ declare global {
|
||||
declare module '@tanstack/react-table' {
|
||||
interface ColumnMeta {
|
||||
headerClassName?: string;
|
||||
headerCellClassName?: string;
|
||||
cellClassName?: string;
|
||||
}
|
||||
}
|
||||
@@ -171,10 +171,8 @@ export default {
|
||||
|
||||
// system
|
||||
getSystemVersion: `${restAPIv1}/system/version`,
|
||||
getSystemStatus: `${webAPI}/system/status`,
|
||||
getSystemTokenList: `${webAPI}/system/token_list`,
|
||||
createSystemToken: `${webAPI}/system/new_token`,
|
||||
listSystemToken: `${webAPI}/system/token_list`,
|
||||
removeSystemToken: `${webAPI}/system/token`,
|
||||
getSystemConfig: `${webAPI}/system/config`,
|
||||
setLangfuseConfig: `${webAPI}/langfuse/api_key`,
|
||||
|
||||
@@ -28,7 +28,8 @@
|
||||
"@parent/*": ["../src/*"]
|
||||
},
|
||||
|
||||
"types": ["vite/client", "node", "@testing-library/jest-dom"]
|
||||
"types": ["vite/client", "node", "@testing-library/jest-dom"],
|
||||
"ignoreDeprecations": "6.0"
|
||||
},
|
||||
"include": ["src"],
|
||||
"exclude": ["node_modules", "dist"],
|
||||
|
||||
Reference in New Issue
Block a user