diff --git a/README.md b/README.md
index 002b41eab..be623b12a 100644
--- a/README.md
+++ b/README.md
@@ -201,7 +201,7 @@ client.get_extracted_content(content_id)
```
### LLM Framework Integration
-Indexify can work with any LLM framework, or with your applications directly. We have an example of a Langchain application [here](https://getindexify.ai/integrations/langchain/python_langchain/) and DSPy [here](https://docs.getindexify.ai/integrations/dspy/python_dspy/).
+Indexify can work with any LLM framework, or with your applications directly. We have an example of a Langchain application [here](https://docs.getindexify.ai/integrations/langchain/python_langchain/) and DSPy [here](https://docs.getindexify.ai/integrations/dspy/python_dspy/).
### Try out other extractors
We have a ton of other extractors, you can list them and try them out -
@@ -217,7 +217,7 @@ Any extraction or transformation algorithm can be expressed as an Indexify Extra
Extractors which produce structured data from content, such as bounding boxes and object type, or line items of invoices are stored in
structured store. You can query extracted structured data using Indexify's SQL interface.
-We have an example [here](https://getindexify.ai/usecases/image_retrieval/)
+We have an example [here](https://docs.getindexify.ai/usecases/image_retrieval/)
## Contributions
Please open an issue to discuss new features, or join our Discord group. Contributions are welcome, there are a bunch of open tasks we could use help with!
diff --git a/docs/docs/extractor_cli.md b/docs/docs/extractor_cli.md
index c4d2c5cbd..b391bfc9d 100644
--- a/docs/docs/extractor_cli.md
+++ b/docs/docs/extractor_cli.md
@@ -1,6 +1,6 @@
# Command Line Interface
-Indexify has two CLIs, `indexify-extractor` for running and testing the Extractors. And a CLI to run the server. If you want to learn about the CLI interface of the server, please read (Operating Indexify)[https://getindexify.ai/configuration/]
+Indexify has two CLIs, `indexify-extractor` for running and testing the Extractors. And a CLI to run the server. If you want to learn about the CLI interface of the server, please read (Operating Indexify)[https://docs.getindexify.ai/configuration/]
## Indexify Extractor CLI
diff --git a/ui/src/components/ExtractionGraphs.tsx b/ui/src/components/ExtractionGraphs.tsx
index 222ea21af..d90e62f53 100644
--- a/ui/src/components/ExtractionGraphs.tsx
+++ b/ui/src/components/ExtractionGraphs.tsx
@@ -3,15 +3,15 @@ import {
IExtractionPolicy,
IExtractor,
ITask,
-} from "getindexify";
-import { Alert, IconButton, Typography } from "@mui/material";
-import { Box, Stack } from "@mui/system";
-import React, { ReactElement } from "react";
-import GavelIcon from "@mui/icons-material/Gavel";
-import InfoIcon from "@mui/icons-material/Info";
-import ExtractionPolicyItem from "./ExtractionPolicyItem";
-import { IExtractionGraphCol, IExtractionGraphColumns } from "../types";
-import CopyText from "./CopyText";
+} from 'getindexify'
+import { Alert, IconButton, Typography } from '@mui/material'
+import { Box, Stack } from '@mui/system'
+import React, { ReactElement } from 'react'
+import GavelIcon from '@mui/icons-material/Gavel'
+import InfoIcon from '@mui/icons-material/Info'
+import ExtractionPolicyItem from './ExtractionPolicyItem'
+import { IExtractionGraphCol, IExtractionGraphColumns } from '../types'
+import CopyText from './CopyText'
const ExtractionGraphs = ({
extractionGraphs,
@@ -19,29 +19,29 @@ const ExtractionGraphs = ({
extractors,
tasks,
}: {
- extractionGraphs: IExtractionGraph[];
- namespace: string;
- extractors: IExtractor[];
- tasks: ITask[];
+ extractionGraphs: IExtractionGraph[]
+ namespace: string
+ extractors: IExtractor[]
+ tasks: ITask[]
}) => {
- const itemheight = 60;
+ const itemheight = 60
const cols: IExtractionGraphColumns = {
- name: { displayName: "Name", width: 350 },
- extractor: { displayName: "Extractor", width: 225 },
- mimeTypes: { displayName: "Input MimeTypes", width: 225 },
- inputParams: { displayName: "Input Parameters", width: 225 },
- taskCount: { displayName: "Tasks", width: 75 },
- };
+ name: { displayName: 'Name', width: 350 },
+ extractor: { displayName: 'Extractor', width: 225 },
+ mimeTypes: { displayName: 'Input MimeTypes', width: 225 },
+ inputParams: { displayName: 'Input Parameters', width: 225 },
+ taskCount: { displayName: 'Tasks', width: 75 },
+ }
const renderHeader = () => {
return (
{Object.values(cols).map((col: IExtractionGraphCol) => {
@@ -49,20 +49,20 @@ const ExtractionGraphs = ({
{col.displayName}
- );
+ )
})}
- );
- };
+ )
+ }
const renderGraphItems = (
policies: IExtractionPolicy[],
source: string,
depth = 0
): ReactElement[] => {
- let items: ReactElement[] = [];
+ let items: ReactElement[] = []
// use sibling count to keep track of how many are above
- let siblingCount = items.length;
+ let siblingCount = items.length
policies
.filter((policy) => policy.content_source === source)
.forEach((policy, i) => {
@@ -78,13 +78,13 @@ const ExtractionGraphs = ({
siblingCount={siblingCount}
itemHeight={itemheight}
/>
- );
- const children = renderGraphItems(policies, policy.name, depth + 1);
- items = items.concat(children);
- siblingCount = children.length;
- });
- return items;
- };
+ )
+ const children = renderGraphItems(policies, policy.name, depth + 1)
+ items = items.concat(children)
+ siblingCount = children.length
+ })
+ return items
+ }
const renderContent = () => {
if (extractionGraphs.length === 0) {
@@ -94,50 +94,48 @@ const ExtractionGraphs = ({
No Graphs Found
- );
+ )
}
return (
- {renderHeader()}
+ {renderHeader()}
{extractionGraphs.map((graph) => {
return (
-
-
- {graph.name}
-
+
+ {graph.name}
- {renderGraphItems(graph.extraction_policies, "")}
+ {renderGraphItems(graph.extraction_policies, '')}
- );
+ )
})}
- );
- };
+ )
+ }
return (
<>
Extraction Graphs
@@ -146,7 +144,7 @@ const ExtractionGraphs = ({
{renderContent()}
>
- );
-};
+ )
+}
-export default ExtractionGraphs;
+export default ExtractionGraphs
diff --git a/ui/src/components/TasksTable.tsx b/ui/src/components/TasksTable.tsx
index bcba748a2..239fa6937 100644
--- a/ui/src/components/TasksTable.tsx
+++ b/ui/src/components/TasksTable.tsx
@@ -1,12 +1,12 @@
-import React from "react";
-import { DataGrid, GridColDef } from "@mui/x-data-grid";
-import { IExtractionPolicy, ITask } from "getindexify";
-import { Alert, Typography } from "@mui/material";
-import { Box, Stack } from "@mui/system";
-import TaskIcon from '@mui/icons-material/Task';
-import moment from "moment";
-import { Link } from "react-router-dom";
-import {TaskStatus} from "getindexify"
+import React from 'react'
+import { DataGrid, GridColDef } from '@mui/x-data-grid'
+import { IExtractionPolicy, ITask } from 'getindexify'
+import { Alert, Typography } from '@mui/material'
+import { Box, Stack } from '@mui/system'
+import TaskIcon from '@mui/icons-material/Task'
+import moment from 'moment'
+import { Link } from 'react-router-dom'
+import { TaskStatus } from 'getindexify'
const TasksTable = ({
namespace,
@@ -15,21 +15,21 @@ const TasksTable = ({
hideContentId,
hideExtractionPolicy,
}: {
- namespace: string;
- policies: IExtractionPolicy[];
- tasks: ITask[];
- hideContentId?: boolean;
- hideExtractionPolicy?: boolean;
+ namespace: string
+ policies: IExtractionPolicy[]
+ tasks: ITask[]
+ hideContentId?: boolean
+ hideExtractionPolicy?: boolean
}) => {
let columns: GridColDef[] = [
{
- field: "id",
- headerName: "Task ID",
+ field: 'id',
+ headerName: 'Task ID',
width: 170,
},
{
- field: "content_metadata.id",
- headerName: "Content ID",
+ field: 'content_metadata.id',
+ headerName: 'Content ID',
width: 170,
valueGetter: (params) => params.row.content_metadata.id,
renderCell: (params) => (
@@ -37,63 +37,61 @@ const TasksTable = ({
),
},
{
- field: "extraction_policy_id",
- headerName: "Extraction Policy",
+ field: 'extraction_policy_id',
+ headerName: 'Extraction Policy',
renderCell: (params) => {
- const policy = policies.find(policy => policy.id === params.value)
- return policy ?
- {policy?.name}
- : null
+ const policy = policies.find((policy) => policy.id === params.value)
+ return policy ? (
+
+ {policy?.name}
+
+ ) : null
},
width: 200,
},
{
- field: "outcome",
- headerName: "Outcome",
+ field: 'outcome',
+ headerName: 'Outcome',
valueGetter: (params) => {
if (params.value === TaskStatus.Failure) {
- return "Failure"
+ return 'Failure'
} else if (params.value === TaskStatus.Success) {
- return "Success"
+ return 'Success'
} else {
- return "Unknown"
+ return 'Unknown'
}
},
width: 100,
},
{
- field: "content_metadata.storage_url",
- headerName: "Storage URL",
- valueGetter: (params) => params.row.content_metadata.storage_url,
- width: 200,
- },
- {
- field: "content_metadata.source",
- headerName: "Source",
+ field: 'content_metadata.source',
+ headerName: 'Source',
valueGetter: (params) => params.row.content_metadata.source,
width: 170,
},
{
- field: "content_metadata.created_at",
- headerName: "Created At",
+ field: 'content_metadata.created_at',
+ headerName: 'Created At',
renderCell: (params) => {
return moment(params.row.content_metadata.created_at * 1000).format(
- "MM/DD/YYYY h:mm A"
- );
+ 'MM/DD/YYYY h:mm A'
+ )
},
valueGetter: (params) => params.row.content_metadata.created_at,
width: 200,
},
- ];
+ ]
columns = columns.filter((col) => {
- if (hideContentId && col.field === "content_metadata.id") {
- return false;
- } else if (hideExtractionPolicy && col.field === "extraction_policy_id") {
- return false;
+ if (hideContentId && col.field === 'content_metadata.id') {
+ return false
+ } else if (hideExtractionPolicy && col.field === 'extraction_policy_id') {
+ return false
}
- return true;
- });
+ return true
+ })
const renderContent = () => {
if (tasks.length === 0) {
@@ -103,16 +101,16 @@ const TasksTable = ({
No Tasks Found
- );
+ )
}
return (
- );
- };
+ )
+ }
return (
<>
@@ -140,7 +138,7 @@ const TasksTable = ({
{renderContent()}
>
- );
-};
+ )
+}
-export default TasksTable;
+export default TasksTable
diff --git a/ui/src/components/tables/ContentTable.tsx b/ui/src/components/tables/ContentTable.tsx
index 30e928155..8fbd48099 100644
--- a/ui/src/components/tables/ContentTable.tsx
+++ b/ui/src/components/tables/ContentTable.tsx
@@ -1,5 +1,5 @@
-import { DataGrid, GridColDef } from "@mui/x-data-grid";
-import { IContentMetadata, IExtractionPolicy } from "getindexify";
+import { DataGrid, GridColDef } from '@mui/x-data-grid'
+import { IContentMetadata, IExtractionPolicy } from 'getindexify'
import {
Alert,
Button,
@@ -12,147 +12,147 @@ import {
TextField,
Typography,
IconButton,
-} from "@mui/material";
-import { Box, Stack } from "@mui/system";
-import ArticleIcon from "@mui/icons-material/Article";
-import InfoIcon from "@mui/icons-material/Info";
-import React, { useEffect, useState } from "react";
-import moment from "moment";
-import { Link } from "react-router-dom";
-import CopyText from "../CopyText";
+} from '@mui/material'
+import { Box, Stack } from '@mui/system'
+import ArticleIcon from '@mui/icons-material/Article'
+import InfoIcon from '@mui/icons-material/Info'
+import React, { useEffect, useState } from 'react'
+import moment from 'moment'
+import { Link } from 'react-router-dom'
+import CopyText from '../CopyText'
function getChildCountMap(
contents: IContentMetadata[]
): Record {
// Initialize a record to hold the count of children for each parent
- const childrenCountMap: Record = {};
+ const childrenCountMap: Record = {}
// iterate over content
contents.forEach((content) => {
if (content.parent_id) {
if (childrenCountMap[content.parent_id]) {
- childrenCountMap[content.parent_id]++;
+ childrenCountMap[content.parent_id]++
} else {
- childrenCountMap[content.parent_id] = 1;
+ childrenCountMap[content.parent_id] = 1
}
}
- });
+ })
- const result: Record = {};
+ const result: Record = {}
contents.forEach((content) => {
- result[content.id] = childrenCountMap[content.id] || 0;
- });
+ result[content.id] = childrenCountMap[content.id] || 0
+ })
- return result;
+ return result
}
const ContentTable = ({
extractionPolicies,
content,
}: {
- extractionPolicies: IExtractionPolicy[];
- content: IContentMetadata[];
+ extractionPolicies: IExtractionPolicy[]
+ content: IContentMetadata[]
}) => {
- const childCountMap = getChildCountMap(content);
+ const childCountMap = getChildCountMap(content)
const [paginationModel, setPaginationModel] = useState({
page: 1,
pageSize: 5,
- });
- const [graphTabIds, setGraphTabIds] = useState([]);
+ })
+ const [graphTabIds, setGraphTabIds] = useState([])
const [searchFilter, setSearchFilter] = useState<{
- contentId: string;
- policyName: string;
- }>({ contentId: "", policyName: "Any" });
+ contentId: string
+ policyName: string
+ }>({ contentId: '', policyName: 'Any' })
const [filteredContent, setFilteredContent] = useState(
- content.filter((c) => c.source === "")
- );
- const [currentTab, setCurrentTab] = useState("ingested");
+ content.filter((c) => c.source === '')
+ )
+ const [currentTab, setCurrentTab] = useState('ingested')
const onClickChildren = (selectedContent: IContentMetadata) => {
// append id to graphTabIds - this adds a new tab
- setGraphTabIds([...graphTabIds, selectedContent.id]);
- setCurrentTab(selectedContent.id);
- };
+ setGraphTabIds([...graphTabIds, selectedContent.id])
+ setCurrentTab(selectedContent.id)
+ }
const onChangeTab = (event: React.SyntheticEvent, selectedValue: string) => {
- setCurrentTab(selectedValue);
- };
+ setCurrentTab(selectedValue)
+ }
const goToPage = (page: number) => {
setPaginationModel((currentModel) => ({
...currentModel,
page,
- }));
- };
+ }))
+ }
useEffect(() => {
// when filtered content updates go to first page
- goToPage(0);
- }, [filteredContent]);
+ goToPage(0)
+ }, [filteredContent])
useEffect(() => {
// when we update searchFilter update content
- if (currentTab === "search") {
- goToPage(0);
+ if (currentTab === 'search') {
+ goToPage(0)
const searchPolicy = extractionPolicies.find(
(policy) => policy.name === searchFilter.policyName
- );
+ )
setFilteredContent(
content.filter((c) => {
// filter contentId
- if (!c.id.startsWith(searchFilter.contentId)) return false;
+ if (!c.id.startsWith(searchFilter.contentId)) return false
// filter policy
- if (searchFilter.policyName === "Ingested") {
+ if (searchFilter.policyName === 'Ingested') {
// TODO: match mimetype and filter ingested source
- } else if (searchPolicy && searchFilter.policyName !== "Any") {
+ } else if (searchPolicy && searchFilter.policyName !== 'Any') {
if (c.source !== searchPolicy?.name) {
- return false;
+ return false
}
}
- return true;
+ return true
})
- );
- } else if (currentTab === "ingested") {
+ )
+ } else if (currentTab === 'ingested') {
// go back to root node of graph tab
- setGraphTabIds([]);
- setFilteredContent([...content.filter((c) => c.source === "")]);
+ setGraphTabIds([])
+ setFilteredContent([...content.filter((c) => c.source === '')])
} else {
// current tab is now a content id
// remove tabs after id: selectedValue if possible
setGraphTabIds((currentIds) => {
- const index = currentIds.indexOf(currentTab);
- const newIds = [...currentIds];
- newIds.splice(index + 1);
- return newIds;
- });
+ const index = currentIds.indexOf(currentTab)
+ const newIds = [...currentIds]
+ newIds.splice(index + 1)
+ return newIds
+ })
// update filteredContent
const newFilteredContent = [
...content.filter((c) => c.parent_id === currentTab),
- ];
- setFilteredContent(newFilteredContent);
+ ]
+ setFilteredContent(newFilteredContent)
}
- }, [searchFilter, currentTab, content, extractionPolicies]);
+ }, [searchFilter, currentTab, content, extractionPolicies])
let columns: GridColDef[] = [
{
- field: "view",
- headerName: "",
+ field: 'view',
+ headerName: '',
width: 100,
renderCell: (params) => (
-
+
View
),
},
{
- field: "id",
- headerName: "ID",
+ field: 'id',
+ headerName: 'ID',
width: 200,
renderCell: (params) => {
return (
@@ -160,81 +160,71 @@ const ContentTable = ({
{params.value}
>
- );
+ )
},
},
{
- field: "childCount",
- headerName: "Children",
+ field: 'childCount',
+ headerName: 'Children',
width: 140,
valueGetter: (params) => childCountMap[params.row.id],
renderCell: (params) => {
const clickable =
- currentTab !== "search" && childCountMap[params.row.id] !== 0;
+ currentTab !== 'search' && childCountMap[params.row.id] !== 0
return (
{
- e.stopPropagation();
- onClickChildren(params.row);
+ e.stopPropagation()
+ onClickChildren(params.row)
}}
sx={{
- pointerEvents: clickable ? "search" : "none",
- textDecoration: clickable ? "underline" : "none",
+ pointerEvents: clickable ? 'search' : 'none',
+ textDecoration: clickable ? 'underline' : 'none',
}}
variant="text"
>
{params.value}
- );
+ )
},
},
{
- field: "source",
- headerName: "Source",
+ field: 'source',
+ headerName: 'Source',
width: 220,
},
{
- field: "mime_type",
- headerName: "Mime Type",
- width: 150,
- },
- {
- field: "parent_id",
- headerName: "Parent ID",
+ field: 'parent_id',
+ headerName: 'Parent ID',
width: 170,
},
{
- field: "labels",
- headerName: "Labels",
+ field: 'labels',
+ headerName: 'Labels',
width: 150,
valueGetter: (params) => {
- return JSON.stringify(params.value);
+ return JSON.stringify(params.value)
},
},
{
- field: "storage_url",
- headerName: "Storage URL",
- width: 200,
- },
- {
- field: "created_at",
- headerName: "Created At",
+ field: 'created_at',
+ headerName: 'Created At',
width: 200,
valueGetter: (params) => {
- return moment(params.value * 1000).format("MM/DD/YYYY h:mm A");
+ return moment(params.value * 1000).format('MM/DD/YYYY h:mm A')
},
},
- ];
+ ]
columns = columns.filter((col) => {
if (
- currentTab === "ingested" &&
- (col.field === "source" || col.field === "parent_id")
+ currentTab === 'ingested' &&
+ (col.field === 'source' || col.field === 'parent_id')
) {
- return false;
+ return false
}
- return true;
- });
+ return true
+ })
const renderContent = () => {
if (content.length === 0) {
@@ -244,18 +234,18 @@ const ContentTable = ({
No Content Found
- );
+ )
}
return (
-
+
- );
- };
+ )
+ }
return (
<>
Content
-
+
-
-
+
+
{graphTabIds.map((id, i) => {
- return ;
+ return
})}
{/* Filter for search tab */}
- {currentTab === "search" && (
+ {currentTab === 'search' && (
{/* Added gap for spacing between elements */}
@@ -345,7 +335,7 @@ const ContentTable = ({
{renderContent()}
>
- );
-};
+ )
+}
-export default ContentTable;
+export default ContentTable
diff --git a/ui/src/components/tables/ExtractorsTable.tsx b/ui/src/components/tables/ExtractorsTable.tsx
index f57f8ac6f..83f8874e6 100644
--- a/ui/src/components/tables/ExtractorsTable.tsx
+++ b/ui/src/components/tables/ExtractorsTable.tsx
@@ -1,15 +1,15 @@
-import React from "react";
-import { DataGrid, GridColDef } from "@mui/x-data-grid";
-import { Alert, Chip, IconButton, Typography } from "@mui/material";
-import { Box, Stack } from "@mui/system";
-import MemoryIcon from "@mui/icons-material/MemoryOutlined";
-import InfoIcon from "@mui/icons-material/Info";
-import { Extractor } from "getindexify";
+import React from 'react'
+import { DataGrid, GridColDef } from '@mui/x-data-grid'
+import { Alert, Chip, IconButton, Typography } from '@mui/material'
+import { Box, Stack } from '@mui/system'
+import MemoryIcon from '@mui/icons-material/MemoryOutlined'
+import InfoIcon from '@mui/icons-material/Info'
+import { Extractor } from 'getindexify'
const ExtractorsTable = ({ extractors }: { extractors: Extractor[] }) => {
const columns: GridColDef[] = [
- { field: "name", headerName: "Name", width: 300 },
- { field: "description", headerName: "Description", width: 300 },
+ { field: 'name', headerName: 'Name', width: 300 },
+ { field: 'description', headerName: 'Description', width: 300 },
// {
// field: "input_mime_types",
// headerName: "Input MimeTypes",
@@ -33,56 +33,56 @@ const ExtractorsTable = ({ extractors }: { extractors: Extractor[] }) => {
// },
// },
{
- field: "input_params",
- headerName: "Input Parameters",
+ field: 'input_params',
+ headerName: 'Input Parameters',
width: 300,
valueGetter: (params) => {
- return params.value?.properties;
+ return params.value?.properties
},
renderCell: (params) => {
if (!params.value) {
- return None ;
+ return None
}
return (
-
+
{Object.keys(params.value).map((val: string) => {
return (
- );
+ )
})}
- );
+ )
},
},
{
- field: "outputs",
- headerName: "Outputs",
+ field: 'outputs',
+ headerName: 'Outputs',
width: 300,
valueGetter: (params) => {
- return params.value ?? {};
+ return params.value ?? {}
},
renderCell: (params) => {
if (!params.value) {
- return None ;
+ return None
}
return (
{Object.keys(params.value).map((val: string) => {
- return ;
+ return
})}
- );
+ )
},
},
- ];
+ ]
const getRowId = (row: Extractor) => {
- return row.name;
- };
+ return row.name
+ }
const renderContent = () => {
if (extractors.length === 0) {
@@ -92,16 +92,16 @@ const ExtractorsTable = ({ extractors }: { extractors: Extractor[] }) => {
No Extractors Found
- );
+ )
}
return (
{
pageSizeOptions={[5, 10]}
/>
- );
- };
+ )
+ }
return (
<>
Extractors
@@ -138,7 +138,7 @@ const ExtractorsTable = ({ extractors }: { extractors: Extractor[] }) => {
{renderContent()}
>
- );
-};
+ )
+}
-export default ExtractorsTable;
+export default ExtractorsTable
diff --git a/ui/src/components/tables/IndexTable.tsx b/ui/src/components/tables/IndexTable.tsx
index 47606b890..74f42b0b3 100644
--- a/ui/src/components/tables/IndexTable.tsx
+++ b/ui/src/components/tables/IndexTable.tsx
@@ -1,34 +1,34 @@
-import { DataGrid, GridColDef } from "@mui/x-data-grid";
-import { IExtractionPolicy, IIndex } from "getindexify";
-import { Alert, Button, IconButton, Typography } from "@mui/material";
-import { Box, Stack } from "@mui/system";
-import ManageSearchIcon from "@mui/icons-material/ManageSearch";
-import InfoIcon from "@mui/icons-material/Info";
-import React from "react";
-import { Link } from "react-router-dom";
-import CopyText from "../CopyText";
+import { DataGrid, GridColDef } from '@mui/x-data-grid'
+import { IExtractionPolicy, IIndex } from 'getindexify'
+import { Alert, Button, IconButton, Typography } from '@mui/material'
+import { Box, Stack } from '@mui/system'
+import ManageSearchIcon from '@mui/icons-material/ManageSearch'
+import InfoIcon from '@mui/icons-material/Info'
+import React from 'react'
+import { Link } from 'react-router-dom'
+import CopyText from '../CopyText'
const IndexTable = ({
indexes,
namespace,
extractionPolicies,
}: {
- indexes: IIndex[];
- namespace: string;
- extractionPolicies: IExtractionPolicy[];
+ indexes: IIndex[]
+ namespace: string
+ extractionPolicies: IExtractionPolicy[]
}) => {
const getPolicyFromIndexname = (
indexName: string
): IExtractionPolicy | undefined => {
return extractionPolicies.find((policy) =>
String(indexName).startsWith(`${policy.graph_name}.${policy.name}`)
- );
- };
+ )
+ }
const columns: GridColDef[] = [
{
- field: "searchIndex",
- headerName: "",
+ field: 'searchIndex',
+ headerName: '',
width: 140,
renderCell: (params) => {
return (
@@ -42,12 +42,12 @@ const IndexTable = ({
>
- );
+ )
},
},
{
- field: "name",
- headerName: "Name",
+ field: 'name',
+ headerName: 'Name',
width: 500,
renderCell: (params) => {
return (
@@ -55,17 +55,17 @@ const IndexTable = ({
{params.value}
>
- );
+ )
},
},
{
- field: "policy_name",
- headerName: "Policy Name",
+ field: 'policy_name',
+ headerName: 'Policy Name',
width: 300,
renderCell: (params) => {
- const policy = getPolicyFromIndexname(params.row.name);
+ const policy = getPolicyFromIndexname(params.row.name)
if (!policy) {
- return null;
+ return null
}
return (
{policy.name}
- );
+ )
},
},
- ];
+ ]
const getRowId = (row: IIndex) => {
- return row.name;
- };
+ return row.name
+ }
const renderContent = () => {
if (indexes.length === 0) {
@@ -90,17 +90,17 @@ const IndexTable = ({
No Indexes Found
- );
+ )
}
return (
<>
>
- );
- };
+ )
+ }
return (
<>
Indexes
@@ -138,7 +138,7 @@ const IndexTable = ({
{renderContent()}
>
- );
-};
+ )
+}
-export default IndexTable;
+export default IndexTable
diff --git a/ui/src/components/tables/SchemasTable.tsx b/ui/src/components/tables/SchemasTable.tsx
index cf9a4750b..fee8f193f 100644
--- a/ui/src/components/tables/SchemasTable.tsx
+++ b/ui/src/components/tables/SchemasTable.tsx
@@ -1,52 +1,52 @@
-import React from "react";
-import { DataGrid, GridColDef } from "@mui/x-data-grid";
-import { Alert, Chip, IconButton, Typography } from "@mui/material";
-import { Box, Stack } from "@mui/system";
-import StorageIcon from "@mui/icons-material/Storage";
-import InfoIcon from "@mui/icons-material/Info";
-import { ISchema } from "getindexify";
+import React from 'react'
+import { DataGrid, GridColDef } from '@mui/x-data-grid'
+import { Alert, Chip, IconButton, Typography } from '@mui/material'
+import { Box, Stack } from '@mui/system'
+import StorageIcon from '@mui/icons-material/Storage'
+import InfoIcon from '@mui/icons-material/Info'
+import { ISchema } from 'getindexify'
const SchemasTable = ({ schemas }: { schemas: ISchema[] }) => {
const getRowId = (row: ISchema) => {
- return row.id;
- };
+ return row.id
+ }
const columns: GridColDef[] = [
- { field: "namespace", headerName: "namespace", width: 200 },
+ { field: 'namespace', headerName: 'namespace', width: 200 },
{
- field: "extraction_graph_name",
- headerName: "Extraction Graph",
+ field: 'extraction_graph_name',
+ headerName: 'Extraction Graph',
width: 250,
},
{
- field: "columns",
- headerName: "Columns",
+ field: 'columns',
+ headerName: 'Columns',
width: 500,
renderCell: (params) => {
if (!params.value) {
- return None ;
+ return None
}
return (
-
+
{Object.keys(params.value).map((val) => (
))}
- );
+ )
},
},
- ];
+ ]
const renderContent = () => {
const filteredSchemas = schemas.filter(
(schema) => Object.keys(schema.columns).length > 0
- );
+ )
if (filteredSchemas.length === 0) {
return (
@@ -54,16 +54,16 @@ const SchemasTable = ({ schemas }: { schemas: ISchema[] }) => {
No Schemas Found
- );
+ )
}
return (
{
pageSizeOptions={[5, 10]}
/>
- );
- };
+ )
+ }
return (
<>
SQL Tables
@@ -100,7 +100,7 @@ const SchemasTable = ({ schemas }: { schemas: ISchema[] }) => {
{renderContent()}
>
- );
-};
+ )
+}
-export default SchemasTable;
+export default SchemasTable