import { LightragStatus } from '@/api/lightrag'
import { useTranslation } from 'react-i18next'
const StatusCard = ({ status }: { status: LightragStatus | null }) => {
const { t } = useTranslation()
if (!status) {
return
{t('graphPanel.statusCard.storageInfo')}
{t('graphPanel.statusCard.workingDirectory')}:
{status.working_directory}
{t('graphPanel.statusCard.inputDirectory')}:
{status.input_directory}
{t('graphPanel.statusCard.llmConfig')}
{t('graphPanel.statusCard.llmBinding')}:
{status.configuration.llm_binding}
{t('graphPanel.statusCard.llmBindingHost')}:
{status.configuration.llm_binding_host}
{t('graphPanel.statusCard.llmModel')}:
{status.configuration.llm_model}
{t('graphPanel.statusCard.maxTokens')}:
{status.configuration.max_tokens}
{t('graphPanel.statusCard.embeddingConfig')}
{t('graphPanel.statusCard.embeddingBinding')}:
{status.configuration.embedding_binding}
{t('graphPanel.statusCard.embeddingBindingHost')}:
{status.configuration.embedding_binding_host}
{t('graphPanel.statusCard.embeddingModel')}:
{status.configuration.embedding_model}
{status.configuration.enable_rerank && (
{t('graphPanel.statusCard.rerankerConfig')}
{t('graphPanel.statusCard.rerankerBindingHost')}:
{status.configuration.rerank_binding_host || '-'}
{t('graphPanel.statusCard.rerankerModel')}:
{status.configuration.rerank_model || '-'}
)}
{t('graphPanel.statusCard.storageConfig')}
{t('graphPanel.statusCard.kvStorage')}:
{status.configuration.kv_storage}
{t('graphPanel.statusCard.docStatusStorage')}:
{status.configuration.doc_status_storage}
{t('graphPanel.statusCard.graphStorage')}:
{status.configuration.graph_storage}
{t('graphPanel.statusCard.vectorStorage')}:
{status.configuration.vector_storage}
{t('graphPanel.statusCard.workspace')}:
{status.configuration.workspace || '-'}
{t('graphPanel.statusCard.maxGraphNodes')}:
{status.configuration.max_graph_nodes || '-'}
{status.keyed_locks && (
<>
{t('graphPanel.statusCard.lockStatus')}:
mp {status.keyed_locks.current_status.pending_mp_cleanup}/{status.keyed_locks.current_status.total_mp_locks} |
async {status.keyed_locks.current_status.pending_async_cleanup}/{status.keyed_locks.current_status.total_async_locks}
(pid: {status.keyed_locks.process_id})
>
)}
)
}
export default StatusCard