Web: Display the icon of the currently used storage. (#2504)
https://github.com/infiniflow/ragflow/issues/2503 ### What problem does this PR solve? _Briefly describe what this PR aims to solve. Include background context that will help reviewers understand the purpose of the PR._ ### Type of change - [x] New Feature (non-breaking change which adds functionality) Before: <img width="611" alt="image" src="https://github.com/user-attachments/assets/02a3a1ee-7bfb-4fe0-9b15-11ced69cc8a3"> After: <img width="796" alt="image" src="https://github.com/user-attachments/assets/371136af-8d16-47aa-909b-26609d3ad60e"> <img width="557" alt="image" src="https://github.com/user-attachments/assets/9268362f-2b6a-4ea1-9fe7-659f7292e5e1">
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import SvgIcon from '@/components/svg-icon';
|
||||
import { useFetchSystemStatus } from '@/hooks/user-setting-hooks';
|
||||
import { ISystemStatus, Storage } from '@/interfaces/database/userSetting';
|
||||
import {
|
||||
ISystemStatus,
|
||||
TaskExecutorElapsed,
|
||||
@@ -24,12 +25,19 @@ enum Status {
|
||||
|
||||
const TitleMap = {
|
||||
es: 'Elasticsearch',
|
||||
minio: 'MinIO Object Storage',
|
||||
storage: 'Object Storage',
|
||||
redis: 'Redis',
|
||||
mysql: 'Mysql',
|
||||
database: 'Database',
|
||||
task_executor: 'Task Executor',
|
||||
};
|
||||
|
||||
const IconMap = {
|
||||
es: 'es',
|
||||
storage: 'storage',
|
||||
redis: 'redis',
|
||||
database: 'database',
|
||||
};
|
||||
|
||||
const SystemInfo = () => {
|
||||
const {
|
||||
systemStatus,
|
||||
@@ -56,7 +64,7 @@ const SystemInfo = () => {
|
||||
{key === 'task_executor' ? (
|
||||
<img src="/logo.svg" alt="" width={26} />
|
||||
) : (
|
||||
<SvgIcon name={key} width={26}></SvgIcon>
|
||||
<SvgIcon name={IconMap[key as keyof typeof IconMap]} width={26}></SvgIcon>
|
||||
)}
|
||||
<span className={styles.title}>
|
||||
{TitleMap[key as keyof typeof TitleMap]}
|
||||
|
||||
Reference in New Issue
Block a user