From 758f83b7ddeea2a2769ca94dd4e5f3edb1dec607 Mon Sep 17 00:00:00 2001 From: "shiweisong.ssw" Date: Thu, 29 Jun 2023 17:01:53 +0800 Subject: [PATCH 1/5] feat: change the text --- datacenter/components/leftSider.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/datacenter/components/leftSider.tsx b/datacenter/components/leftSider.tsx index 75260902d..c04463466 100644 --- a/datacenter/components/leftSider.tsx +++ b/datacenter/components/leftSider.tsx @@ -18,7 +18,7 @@ const LeftSider = () => { const menus = useMemo(() => { return [{ - label: 'Datastores', + label: 'Knowledge Space', route: '/datastores', icon:
, active: pathname === '/datastores' From 62d643042b5ad803f1a5222b2d5a567cc7c9fda8 Mon Sep 17 00:00:00 2001 From: "shiweisong.ssw" Date: Thu, 29 Jun 2023 17:05:16 +0800 Subject: [PATCH 2/5] feat: change document type text --- datacenter/app/datastores/documents/page.tsx | 10 +++++----- datacenter/app/datastores/page.tsx | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/datacenter/app/datastores/documents/page.tsx b/datacenter/app/datastores/documents/page.tsx index 56822b09f..8cb482b34 100644 --- a/datacenter/app/datastores/documents/page.tsx +++ b/datacenter/app/datastores/documents/page.tsx @@ -38,17 +38,17 @@ const documentTypeList = [ { type: 'text', title: 'Text', - subTitle: 'Paste some text' + subTitle: 'Fill your raw text' }, { type: 'webPage', - title: 'Web Page', - subTitle: 'Crawl text from a web page' + title: 'URL', + subTitle: 'Fetch the content of a URL' }, { type: 'file', - title: 'File', - subTitle: 'It can be: PDF, CSV, JSON, Text, PowerPoint, Word, Excel' + title: 'Document', + subTitle: 'Upload a document, document type can be PDF, CSV, Text, PowerPoint, Word, Markdown' } ] const page_size = 20; diff --git a/datacenter/app/datastores/page.tsx b/datacenter/app/datastores/page.tsx index d64a1156a..17d655a97 100644 --- a/datacenter/app/datastores/page.tsx +++ b/datacenter/app/datastores/page.tsx @@ -39,17 +39,17 @@ const documentTypeList = [ { type: 'text', title: 'Text', - subTitle: 'Paste some text' + subTitle: 'Fill your raw text' }, { type: 'webPage', - title: 'Web Page', - subTitle: 'Crawl text from a web page' + title: 'URL', + subTitle: 'Fetch the content of a URL' }, { type: 'file', - title: 'File', - subTitle: 'It can be: PDF, CSV, JSON, Text, PowerPoint, Word, Excel' + title: 'Document', + subTitle: 'Upload a document, document type can be PDF, CSV, Text, PowerPoint, Word, Markdown' } ] From ba17e7f3c692a37bfb2aafc9b6fc2b1a8ce77a7e Mon Sep 17 00:00:00 2001 From: "shiweisong.ssw" Date: Thu, 29 Jun 2023 17:30:26 +0800 Subject: [PATCH 3/5] feat: fetch data after adding --- datacenter/app/datastores/documents/chunklist/page.tsx | 2 +- datacenter/app/datastores/documents/page.tsx | 8 ++++---- datacenter/app/datastores/page.tsx | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/datacenter/app/datastores/documents/chunklist/page.tsx b/datacenter/app/datastores/documents/chunklist/page.tsx index eb68e9296..e28a8f9f0 100644 --- a/datacenter/app/datastores/documents/chunklist/page.tsx +++ b/datacenter/app/datastores/documents/chunklist/page.tsx @@ -41,7 +41,7 @@ const ChunkList = () => {
{chunkList.length ? ( <> - +
diff --git a/datacenter/app/datastores/documents/page.tsx b/datacenter/app/datastores/documents/page.tsx index 8cb482b34..19aa58fd0 100644 --- a/datacenter/app/datastores/documents/page.tsx +++ b/datacenter/app/datastores/documents/page.tsx @@ -123,7 +123,7 @@ const Documents = () => { {documents.length ? ( <> -
Name
+
@@ -401,7 +401,7 @@ const Documents = () => { ) const data = await res.json() if (data.success) { - setDocuments(data.data) + setDocuments(data.data.data) setTotal(data.data.total) setCurrent(data.data.page) } @@ -443,7 +443,7 @@ const Documents = () => { ) const data = await res.json() if (data.success) { - setDocuments(data.data) + setDocuments(data.data.data) setTotal(data.data.total) setCurrent(data.data.page) } @@ -489,7 +489,7 @@ const Documents = () => { ) const data = await res.json() if (data.success) { - setDocuments(data.data) + setDocuments(data.data.data) setTotal(data.data.total) setCurrent(data.data.page) } diff --git a/datacenter/app/datastores/page.tsx b/datacenter/app/datastores/page.tsx index 17d655a97..a5a081093 100644 --- a/datacenter/app/datastores/page.tsx +++ b/datacenter/app/datastores/page.tsx @@ -125,7 +125,7 @@ const Index = () => {
{knowledgeSpaceList.length ? ( -
Name
+
From b69f0bccd57f78619f7db14246be104fbe3f65d7 Mon Sep 17 00:00:00 2001 From: "shiweisong.ssw" Date: Thu, 29 Jun 2023 17:39:20 +0800 Subject: [PATCH 4/5] feat: beautify tables --- datacenter/app/datastores/documents/page.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/datacenter/app/datastores/documents/page.tsx b/datacenter/app/datastores/documents/page.tsx index 19aa58fd0..5199fd48a 100644 --- a/datacenter/app/datastores/documents/page.tsx +++ b/datacenter/app/datastores/documents/page.tsx @@ -138,11 +138,12 @@ const Documents = () => { {documents.map((row: any) => ( - + - + - +
Name
{row.doc_name}{row.doc_type}{row.doc_type} {row.chunk_size} {moment(row.last_sync).format('YYYY-MM-DD HH:MM:SS')} Date: Thu, 29 Jun 2023 18:04:30 +0800 Subject: [PATCH 5/5] feat: change text --- datacenter/app/datastores/documents/page.tsx | 2 +- datacenter/app/datastores/page.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/datacenter/app/datastores/documents/page.tsx b/datacenter/app/datastores/documents/page.tsx index 5199fd48a..63d001fb7 100644 --- a/datacenter/app/datastores/documents/page.tsx +++ b/datacenter/app/datastores/documents/page.tsx @@ -139,7 +139,7 @@ const Documents = () => {
{row.doc_name} {row.doc_type}{row.chunk_size}{row.chunk_size} chunks {moment(row.last_sync).format('YYYY-MM-DD HH:MM:SS')} {
NameProviderVector Owner