diff --git a/frontend/src/pages/Dashboard/Statistics/index.tsx b/frontend/src/pages/Dashboard/Statistics/index.tsx index f3be2f7..68337ff 100644 --- a/frontend/src/pages/Dashboard/Statistics/index.tsx +++ b/frontend/src/pages/Dashboard/Statistics/index.tsx @@ -37,60 +37,96 @@ const Statistics = ({ organization }: { organization: any }) => { }, [organization?.slug]); return ( -
-
-
- {documents.status === 'loading' ? ( - - ) : ( -
-

- {nFormatter(documents.value)} -

-

- {pluralize('Document', documents.value)} -

-
- )} -
+ //
+ //
+ //
+ // {documents.status === 'loading' ? ( + // + // ) : ( + //
+ //

+ // {nFormatter(documents.value)} + //

+ //

+ // {pluralize('Document', documents.value)} + //

+ //
+ // )} + //
-
- {vectors.status === 'loading' ? ( - - ) : ( -
-

- {nFormatter(vectors.value)} -

-

- {pluralize('Vector', vectors.value)} -

-
- )} -
+ //
+ // {vectors.status === 'loading' ? ( + // + // ) : ( + //
+ //

+ // {nFormatter(vectors.value)} + //

+ //

+ // {pluralize('Vector', vectors.value)} + //

+ //
+ // )} + //
-
- {cache.status === 'loading' ? ( - - ) : ( -
-

- {humanFileSize(cache.value)} -

-

Vector Cache (MB)

-
- )} -
+ //
+ // {cache.status === 'loading' ? ( + // + // ) : ( + //
+ //

+ // {humanFileSize(cache.value)} + //

+ //

Vector Cache (MB)

+ //
+ // )} + //
-
-
-

- {organization?.lastUpdated - ? moment(organization.lastUpdated).fromNow() - : moment(organization.createdAt).fromNow()} -

-

Last Modified

-
+ //
+ //
+ //

+ // {organization?.lastUpdated + // ? moment(organization.lastUpdated).fromNow() + // : moment(organization.createdAt).fromNow()} + //

+ //

Last Modified

+ //
+ //
+ //
+ //
+ +
+
+
+ + Documents + + + {' '} + + + ({nFormatter(documents.value)}) + +
+
+ +
+
+ + {pluralize('Vector', vectors.value)}:{' '} + + {nFormatter(vectors.value)} + + + + Vector Cache:{' '} + + {humanFileSize(cache.value)} + + + + Dimensions: {10} +
diff --git a/frontend/src/pages/Dashboard/index.tsx b/frontend/src/pages/Dashboard/index.tsx index d3134b7..ccf7a18 100644 --- a/frontend/src/pages/Dashboard/index.tsx +++ b/frontend/src/pages/Dashboard/index.tsx @@ -12,6 +12,13 @@ import DocumentsList from './DocumentsList'; import Organization from '../../models/organization'; import ApiKeyCard from './ApiKey'; import ConnectorCard from './Connector'; +import truncate from 'truncate'; + +import ChromaLogo from '../../images/vectordbs/chroma.png'; +import PineconeLogo from '../../images/vectordbs/pinecone-inverted.png'; +import qDrantLogo from '../../images/vectordbs/qdrant.png'; +import WeaviateLogo from '../../images/vectordbs/weaviate.png'; +import { GearSix } from '@phosphor-icons/react'; export default function Dashboard() { const { slug } = useParams(); @@ -97,18 +104,25 @@ export default function Dashboard() { workspaces={workspaces} hasMoreWorkspaces={hasMoreWorkspaces} loadMoreWorkspaces={fetchWorkspaces} + headerExtendedItems={ + {}} + /> + } > {!!organization && (
- - + */}
)} -
@@ -128,3 +142,70 @@ export default function Dashboard() { ); } + +function OrganizationHeader({ + organization, + workspace, + connector, + deleteWorkspace, +}: any) { + let logo; + switch (connector?.type) { + case 'chroma': + logo = ChromaLogo; + break; + case 'qdrant': + logo = qDrantLogo; + break; + case 'weaviate': + logo = WeaviateLogo; + break; + default: + logo = PineconeLogo; + } + + return ( + <> +
+
+ + {truncate(organization?.name, 20)} + +
+
+
+ + + + +
+ + ); +} diff --git a/frontend/src/pages/DocumentView/index.tsx b/frontend/src/pages/DocumentView/index.tsx index 474aef0..51ff6c4 100644 --- a/frontend/src/pages/DocumentView/index.tsx +++ b/frontend/src/pages/DocumentView/index.tsx @@ -169,7 +169,7 @@ function DocumentViewHeader({ organization, workspace, document }: any) { return ( <>