mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-08-17 15:58:25 +00:00
Merge remote-tracking branch 'origin/new-page-framework' into llm_framework
This commit is contained in:
commit
cb4a16f0d0
@ -41,7 +41,7 @@ const ChunkList = () => {
|
|||||||
<div className="p-4">
|
<div className="p-4">
|
||||||
{chunkList.length ? (
|
{chunkList.length ? (
|
||||||
<>
|
<>
|
||||||
<Table color="neutral" stripe="odd" variant="outlined">
|
<Table color="info" variant="soft" size="lg">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Name</th>
|
<th>Name</th>
|
||||||
|
@ -38,17 +38,17 @@ const documentTypeList = [
|
|||||||
{
|
{
|
||||||
type: 'text',
|
type: 'text',
|
||||||
title: 'Text',
|
title: 'Text',
|
||||||
subTitle: 'Paste some text'
|
subTitle: 'Fill your raw text'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'webPage',
|
type: 'webPage',
|
||||||
title: 'Web Page',
|
title: 'URL',
|
||||||
subTitle: 'Crawl text from a web page'
|
subTitle: 'Fetch the content of a URL'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'file',
|
type: 'file',
|
||||||
title: 'File',
|
title: 'Document',
|
||||||
subTitle: 'It can be: PDF, CSV, JSON, Text, PowerPoint, Word, Excel'
|
subTitle: 'Upload a document, document type can be PDF, CSV, Text, PowerPoint, Word, Markdown'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
const page_size = 20;
|
const page_size = 20;
|
||||||
@ -123,7 +123,7 @@ const Documents = () => {
|
|||||||
</Sheet>
|
</Sheet>
|
||||||
{documents.length ? (
|
{documents.length ? (
|
||||||
<>
|
<>
|
||||||
<Table color="neutral" stripe="odd" variant="outlined">
|
<Table color="info" variant="soft" size="lg">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Name</th>
|
<th>Name</th>
|
||||||
@ -138,11 +138,12 @@ const Documents = () => {
|
|||||||
{documents.map((row: any) => (
|
{documents.map((row: any) => (
|
||||||
<tr key={row.id}>
|
<tr key={row.id}>
|
||||||
<td>{row.doc_name}</td>
|
<td>{row.doc_name}</td>
|
||||||
<td>{row.doc_type}</td>
|
<td><Chip variant='soft' color='neutral'>{row.doc_type}</Chip></td>
|
||||||
<td>{row.chunk_size}</td>
|
<td>{row.chunk_size} chunks</td>
|
||||||
<td>{moment(row.last_sync).format('YYYY-MM-DD HH:MM:SS')}</td>
|
<td>{moment(row.last_sync).format('YYYY-MM-DD HH:MM:SS')}</td>
|
||||||
<td>
|
<td>
|
||||||
<Chip
|
<Chip
|
||||||
|
variant="soft"
|
||||||
color={(function () {
|
color={(function () {
|
||||||
switch (row.status) {
|
switch (row.status) {
|
||||||
case 'TODO':
|
case 'TODO':
|
||||||
@ -401,7 +402,7 @@ const Documents = () => {
|
|||||||
)
|
)
|
||||||
const data = await res.json()
|
const data = await res.json()
|
||||||
if (data.success) {
|
if (data.success) {
|
||||||
setDocuments(data.data)
|
setDocuments(data.data.data)
|
||||||
setTotal(data.data.total)
|
setTotal(data.data.total)
|
||||||
setCurrent(data.data.page)
|
setCurrent(data.data.page)
|
||||||
}
|
}
|
||||||
@ -443,7 +444,7 @@ const Documents = () => {
|
|||||||
)
|
)
|
||||||
const data = await res.json()
|
const data = await res.json()
|
||||||
if (data.success) {
|
if (data.success) {
|
||||||
setDocuments(data.data)
|
setDocuments(data.data.data)
|
||||||
setTotal(data.data.total)
|
setTotal(data.data.total)
|
||||||
setCurrent(data.data.page)
|
setCurrent(data.data.page)
|
||||||
}
|
}
|
||||||
@ -489,7 +490,7 @@ const Documents = () => {
|
|||||||
)
|
)
|
||||||
const data = await res.json()
|
const data = await res.json()
|
||||||
if (data.success) {
|
if (data.success) {
|
||||||
setDocuments(data.data)
|
setDocuments(data.data.data)
|
||||||
setTotal(data.data.total)
|
setTotal(data.data.total)
|
||||||
setCurrent(data.data.page)
|
setCurrent(data.data.page)
|
||||||
}
|
}
|
||||||
|
@ -39,17 +39,17 @@ const documentTypeList = [
|
|||||||
{
|
{
|
||||||
type: 'text',
|
type: 'text',
|
||||||
title: 'Text',
|
title: 'Text',
|
||||||
subTitle: 'Paste some text'
|
subTitle: 'Fill your raw text'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'webPage',
|
type: 'webPage',
|
||||||
title: 'Web Page',
|
title: 'URL',
|
||||||
subTitle: 'Crawl text from a web page'
|
subTitle: 'Fetch the content of a URL'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'file',
|
type: 'file',
|
||||||
title: 'File',
|
title: 'Document',
|
||||||
subTitle: 'It can be: PDF, CSV, JSON, Text, PowerPoint, Word, Excel'
|
subTitle: 'Upload a document, document type can be PDF, CSV, Text, PowerPoint, Word, Markdown'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -125,11 +125,11 @@ const Index = () => {
|
|||||||
</Sheet>
|
</Sheet>
|
||||||
<div className="page-body p-4">
|
<div className="page-body p-4">
|
||||||
{knowledgeSpaceList.length ? (
|
{knowledgeSpaceList.length ? (
|
||||||
<Table color="neutral" stripe="odd" variant="outlined">
|
<Table color="info" variant="soft" size="lg">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Name</th>
|
<th>Name</th>
|
||||||
<th>Provider</th>
|
<th>Vector</th>
|
||||||
<th>Owner</th>
|
<th>Owner</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
@ -18,7 +18,7 @@ const LeftSider = () => {
|
|||||||
|
|
||||||
const menus = useMemo(() => {
|
const menus = useMemo(() => {
|
||||||
return [{
|
return [{
|
||||||
label: 'Datastores',
|
label: 'Knowledge Space',
|
||||||
route: '/datastores',
|
route: '/datastores',
|
||||||
icon: <Article fontSize="small" />,
|
icon: <Article fontSize="small" />,
|
||||||
active: pathname === '/datastores'
|
active: pathname === '/datastores'
|
||||||
|
Loading…
Reference in New Issue
Block a user