{row.doc_name} |
-
+
{row.doc_type}
|
@@ -167,8 +185,8 @@ const Documents = () => {
{moment(row.last_sync).format('YYYY-MM-DD HH:MM:SS')} |
{
{row.status}
|
+
+ {(function () {
+ if (row.status === 'TODO' || row.status === 'RUNNING') {
+ return ''
+ } else if (row.status === 'FINISHED') {
+ return (
+
+
+ SUCCESS
+
+
+ )
+ } else {
+ return (
+
+
+ FAILED
+
+
+ )
+ }
+ })()}
+ |
{
<>
>
}
@@ -296,9 +348,13 @@ const Documents = () => {
{stepsOfAddingDocument.map((item: any, index: number) => (
-
- {item}
+ {index < activeStep ? : `${index + 1}.`}
+ {`${item}`}
))}
@@ -386,151 +442,224 @@ const Documents = () => {
/>
>
)}
+
+ setSynchChecked(event.target.checked)
+ }
+ />
+ }
+ >
+ Synch:
+
-
+
+
+
>
)}
diff --git a/datacenter/app/datastores/page.tsx b/datacenter/app/datastores/page.tsx
index c8166c8c5..05033bca5 100644
--- a/datacenter/app/datastores/page.tsx
+++ b/datacenter/app/datastores/page.tsx
@@ -3,8 +3,9 @@
import { useRouter } from 'next/navigation'
import React, { useState, useEffect } from 'react'
import { InboxOutlined } from '@ant-design/icons'
+import CheckCircleOutlinedIcon from '@mui/icons-material/CheckCircleOutlined';
import type { UploadProps } from 'antd'
-import { message, Upload } from 'antd'
+import { message, Upload, Popover } from 'antd'
import {
useColorScheme,
Modal,
@@ -16,6 +17,8 @@ import {
Input,
Textarea,
Chip,
+ Switch,
+ Typography,
styled
} from '@/lib/mui'
@@ -33,7 +36,7 @@ const Item = styled(Sheet)(({ theme }) => ({
}))
const stepsOfAddingSpace = [
- 'Knowledge Space Configuration',
+ 'Knowledge Space Config',
'Choose a Datasource type',
'Setup the Datasource'
]
@@ -70,6 +73,7 @@ const Index = () => {
const [textSource, setTextSource] = useState('')
const [text, setText] = useState('')
const [originFileObj, setOriginFileObj] = useState(null)
+ const [synchChecked, setSynchChecked] = useState(true)
const props: UploadProps = {
name: 'file',
multiple: false,
@@ -127,8 +131,8 @@ const Index = () => {
{knowledgeSpaceList.length ? (
{
},
'& tbody tr: hover a': {
textDecoration: 'underline'
+ },
+ '& tbody tr a': {
+ color: 'rgb(13, 96, 217)'
}
}}
>
@@ -145,6 +152,7 @@ const Index = () => {
Name |
Vector |
Owner |
+ Description |
@@ -164,23 +172,22 @@ const Index = () => {
}
-
+
{row.vector_type}
|
-
+
{row.owner}
|
+
+
+ {row.desc.length > 10
+ ? `${row.desc.slice(0, 10)}...`
+ : row.desc}
+
+ |
))}
@@ -213,9 +220,13 @@ const Index = () => {
{stepsOfAddingSpace.map((item: any, index: number) => (
-
- {item}
+ {index < activeStep ? : `${index + 1}.`}
+ {`${item}`}
))}
@@ -236,18 +247,21 @@ const Index = () => {
message.error('please input the name')
return
}
- const res = await fetch(`${process.env.API_BASE_URL}/knowledge/space/add`, {
- method: 'POST',
- headers: {
- 'Content-Type': 'application/json'
- },
- body: JSON.stringify({
- name: knowledgeSpaceName,
- vector_type: 'Chroma',
- owner: 'keting',
- desc: 'test1'
- })
- })
+ const res = await fetch(
+ `${process.env.API_BASE_URL}/knowledge/space/add`,
+ {
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/json'
+ },
+ body: JSON.stringify({
+ name: knowledgeSpaceName,
+ vector_type: 'Chroma',
+ owner: 'keting',
+ desc: 'test1'
+ })
+ }
+ )
const data = await res.json()
if (data.success) {
message.success('success')
@@ -357,94 +371,164 @@ const Index = () => {
/>
>
)}
+
+ setSynchChecked(event.target.checked)
+ }
+ />
+ }
+ >
+ Synch:
+
-
+
+
+
>
)}
diff --git a/datacenter/app/globals.css b/datacenter/app/globals.css
index 153cf633c..93095ccd9 100644
--- a/datacenter/app/globals.css
+++ b/datacenter/app/globals.css
@@ -12,28 +12,6 @@ body {
background-color: var(--joy-palette-background-body);
}
-table {
- border-collapse: collapse;
- width: 100%;
-}
-
-th, td {
- border: 1px solid #ddd;
- text-align: left;
- padding: 8px;
-}
-
-th {
- background-color: #f2f2f2;
-}
-
-tr:nth-child(even) {
- background-color: #f2f2f2;
-}
-tr:hover {
- background-color: #ddd;
-}
-
body .ant-btn-primary {
background-color: #1677ff;
}
|