Feat: Added reranker config and lock status to status card of WebUI
Browse files- lightrag_webui/src/api/lightrag.ts +16 -0
- lightrag_webui/src/components/status/StatusCard.tsx +22 -0
- lightrag_webui/src/locales/ar.json +5 -1
- lightrag_webui/src/locales/en.json +5 -1
- lightrag_webui/src/locales/fr.json +5 -1
- lightrag_webui/src/locales/zh.json +5 -1
- lightrag_webui/src/locales/zh_TW.json +5 -1
lightrag_webui/src/api/lightrag.ts
CHANGED
@@ -42,12 +42,28 @@ export type LightragStatus = {
|
|
42 |
vector_storage: string
|
43 |
workspace?: string
|
44 |
max_graph_nodes?: string
|
|
|
|
|
|
|
45 |
}
|
46 |
update_status?: Record<string, any>
|
47 |
core_version?: string
|
48 |
api_version?: string
|
49 |
auth_mode?: 'enabled' | 'disabled'
|
50 |
pipeline_busy: boolean
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
webui_title?: string
|
52 |
webui_description?: string
|
53 |
}
|
|
|
42 |
vector_storage: string
|
43 |
workspace?: string
|
44 |
max_graph_nodes?: string
|
45 |
+
enable_rerank?: boolean
|
46 |
+
rerank_model?: string | null
|
47 |
+
rerank_binding_host?: string | null
|
48 |
}
|
49 |
update_status?: Record<string, any>
|
50 |
core_version?: string
|
51 |
api_version?: string
|
52 |
auth_mode?: 'enabled' | 'disabled'
|
53 |
pipeline_busy: boolean
|
54 |
+
keyed_locks?: {
|
55 |
+
process_id: number
|
56 |
+
cleanup_performed: {
|
57 |
+
mp_cleaned: number
|
58 |
+
async_cleaned: number
|
59 |
+
}
|
60 |
+
current_status: {
|
61 |
+
total_mp_locks: number
|
62 |
+
pending_mp_cleanup: number
|
63 |
+
total_async_locks: number
|
64 |
+
pending_async_cleanup: number
|
65 |
+
}
|
66 |
+
}
|
67 |
webui_title?: string
|
68 |
webui_description?: string
|
69 |
}
|
lightrag_webui/src/components/status/StatusCard.tsx
CHANGED
@@ -45,6 +45,18 @@ const StatusCard = ({ status }: { status: LightragStatus | null }) => {
|
|
45 |
</div>
|
46 |
</div>
|
47 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
<div className="space-y-1">
|
49 |
<h4 className="font-medium">{t('graphPanel.statusCard.storageConfig')}</h4>
|
50 |
<div className="text-foreground grid grid-cols-[120px_1fr] gap-1">
|
@@ -60,6 +72,16 @@ const StatusCard = ({ status }: { status: LightragStatus | null }) => {
|
|
60 |
<span>{status.configuration.workspace || '-'}</span>
|
61 |
<span>{t('graphPanel.statusCard.maxGraphNodes')}:</span>
|
62 |
<span>{status.configuration.max_graph_nodes || '-'}</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
</div>
|
64 |
</div>
|
65 |
</div>
|
|
|
45 |
</div>
|
46 |
</div>
|
47 |
|
48 |
+
{status.configuration.enable_rerank && (
|
49 |
+
<div className="space-y-1">
|
50 |
+
<h4 className="font-medium">{t('graphPanel.statusCard.rerankerConfig')}</h4>
|
51 |
+
<div className="text-foreground grid grid-cols-[120px_1fr] gap-1">
|
52 |
+
<span>{t('graphPanel.statusCard.rerankerBindingHost')}:</span>
|
53 |
+
<span>{status.configuration.rerank_binding_host || '-'}</span>
|
54 |
+
<span>{t('graphPanel.statusCard.rerankerModel')}:</span>
|
55 |
+
<span>{status.configuration.rerank_model || '-'}</span>
|
56 |
+
</div>
|
57 |
+
</div>
|
58 |
+
)}
|
59 |
+
|
60 |
<div className="space-y-1">
|
61 |
<h4 className="font-medium">{t('graphPanel.statusCard.storageConfig')}</h4>
|
62 |
<div className="text-foreground grid grid-cols-[120px_1fr] gap-1">
|
|
|
72 |
<span>{status.configuration.workspace || '-'}</span>
|
73 |
<span>{t('graphPanel.statusCard.maxGraphNodes')}:</span>
|
74 |
<span>{status.configuration.max_graph_nodes || '-'}</span>
|
75 |
+
{status.keyed_locks && (
|
76 |
+
<>
|
77 |
+
<span>{t('graphPanel.statusCard.lockStatus')}:</span>
|
78 |
+
<span>
|
79 |
+
mp {status.keyed_locks.current_status.pending_mp_cleanup}/{status.keyed_locks.current_status.total_mp_locks} |
|
80 |
+
async {status.keyed_locks.current_status.pending_async_cleanup}/{status.keyed_locks.current_status.total_async_locks}
|
81 |
+
(pid: {status.keyed_locks.process_id})
|
82 |
+
</span>
|
83 |
+
</>
|
84 |
+
)}
|
85 |
</div>
|
86 |
</div>
|
87 |
</div>
|
lightrag_webui/src/locales/ar.json
CHANGED
@@ -265,7 +265,11 @@
|
|
265 |
"graphStorage": "تخزين الرسم البياني",
|
266 |
"vectorStorage": "تخزين المتجهات",
|
267 |
"workspace": "مساحة العمل",
|
268 |
-
"maxGraphNodes": "الحد الأقصى لعقد الرسم البياني"
|
|
|
|
|
|
|
|
|
269 |
},
|
270 |
"propertiesView": {
|
271 |
"editProperty": "تعديل {{property}}",
|
|
|
265 |
"graphStorage": "تخزين الرسم البياني",
|
266 |
"vectorStorage": "تخزين المتجهات",
|
267 |
"workspace": "مساحة العمل",
|
268 |
+
"maxGraphNodes": "الحد الأقصى لعقد الرسم البياني",
|
269 |
+
"rerankerConfig": "تكوين إعادة الترتيب",
|
270 |
+
"rerankerBindingHost": "مضيف ربط إعادة الترتيب",
|
271 |
+
"rerankerModel": "نموذج إعادة الترتيب",
|
272 |
+
"lockStatus": "حالة القفل"
|
273 |
},
|
274 |
"propertiesView": {
|
275 |
"editProperty": "تعديل {{property}}",
|
lightrag_webui/src/locales/en.json
CHANGED
@@ -265,7 +265,11 @@
|
|
265 |
"graphStorage": "Graph Storage",
|
266 |
"vectorStorage": "Vector Storage",
|
267 |
"workspace": "Workspace",
|
268 |
-
"maxGraphNodes": "Max Graph Nodes"
|
|
|
|
|
|
|
|
|
269 |
},
|
270 |
"propertiesView": {
|
271 |
"editProperty": "Edit {{property}}",
|
|
|
265 |
"graphStorage": "Graph Storage",
|
266 |
"vectorStorage": "Vector Storage",
|
267 |
"workspace": "Workspace",
|
268 |
+
"maxGraphNodes": "Max Graph Nodes",
|
269 |
+
"rerankerConfig": "Reranker Configuration",
|
270 |
+
"rerankerBindingHost": "Reranker Binding Host",
|
271 |
+
"rerankerModel": "Reranker Model",
|
272 |
+
"lockStatus": "Lock Status"
|
273 |
},
|
274 |
"propertiesView": {
|
275 |
"editProperty": "Edit {{property}}",
|
lightrag_webui/src/locales/fr.json
CHANGED
@@ -265,7 +265,11 @@
|
|
265 |
"graphStorage": "Stockage du graphe",
|
266 |
"vectorStorage": "Stockage vectoriel",
|
267 |
"workspace": "Espace de travail",
|
268 |
-
"maxGraphNodes": "Nombre maximum de nœuds du graphe"
|
|
|
|
|
|
|
|
|
269 |
},
|
270 |
"propertiesView": {
|
271 |
"editProperty": "Modifier {{property}}",
|
|
|
265 |
"graphStorage": "Stockage du graphe",
|
266 |
"vectorStorage": "Stockage vectoriel",
|
267 |
"workspace": "Espace de travail",
|
268 |
+
"maxGraphNodes": "Nombre maximum de nœuds du graphe",
|
269 |
+
"rerankerConfig": "Configuration du reclassement",
|
270 |
+
"rerankerBindingHost": "Hôte de liaison du reclassement",
|
271 |
+
"rerankerModel": "Modèle de reclassement",
|
272 |
+
"lockStatus": "État des verrous"
|
273 |
},
|
274 |
"propertiesView": {
|
275 |
"editProperty": "Modifier {{property}}",
|
lightrag_webui/src/locales/zh.json
CHANGED
@@ -265,7 +265,11 @@
|
|
265 |
"graphStorage": "图存储",
|
266 |
"vectorStorage": "向量存储",
|
267 |
"workspace": "工作空间",
|
268 |
-
"maxGraphNodes": "最大图节点数"
|
|
|
|
|
|
|
|
|
269 |
},
|
270 |
"propertiesView": {
|
271 |
"editProperty": "编辑{{property}}",
|
|
|
265 |
"graphStorage": "图存储",
|
266 |
"vectorStorage": "向量存储",
|
267 |
"workspace": "工作空间",
|
268 |
+
"maxGraphNodes": "最大图节点数",
|
269 |
+
"rerankerConfig": "重排序配置",
|
270 |
+
"rerankerBindingHost": "重排序绑定主机",
|
271 |
+
"rerankerModel": "重排序模型",
|
272 |
+
"lockStatus": "锁状态"
|
273 |
},
|
274 |
"propertiesView": {
|
275 |
"editProperty": "编辑{{property}}",
|
lightrag_webui/src/locales/zh_TW.json
CHANGED
@@ -265,7 +265,11 @@
|
|
265 |
"graphStorage": "圖形儲存",
|
266 |
"vectorStorage": "向量儲存",
|
267 |
"workspace": "工作空間",
|
268 |
-
"maxGraphNodes": "最大圖形節點數"
|
|
|
|
|
|
|
|
|
269 |
},
|
270 |
"propertiesView": {
|
271 |
"editProperty": "編輯{{property}}",
|
|
|
265 |
"graphStorage": "圖形儲存",
|
266 |
"vectorStorage": "向量儲存",
|
267 |
"workspace": "工作空間",
|
268 |
+
"maxGraphNodes": "最大圖形節點數",
|
269 |
+
"rerankerConfig": "重排序設定",
|
270 |
+
"rerankerBindingHost": "重排序綁定主機",
|
271 |
+
"rerankerModel": "重排序模型",
|
272 |
+
"lockStatus": "鎖定狀態"
|
273 |
},
|
274 |
"propertiesView": {
|
275 |
"editProperty": "編輯{{property}}",
|