diff --git a/app/graph/DataPanel.tsx b/app/graph/DataPanel.tsx index 2c528234..40e006fa 100644 --- a/app/graph/DataPanel.tsx +++ b/app/graph/DataPanel.tsx @@ -1,6 +1,14 @@ import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@/components/ui/table"; import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@/components/ui/tooltip"; +const excludedProperties = new Set([ + "category", + "color", + "label", + "target", + "source" +]); + export default function DataPanel({ node }: { node: Node }) { const rowClass = "dark:hover:bg-slate-700 hover:bg-gray-400 border-y-[1px] border-y-gray-700" @@ -14,38 +22,33 @@ export default function DataPanel({ node }: { node: Node }) { { - Object.entries(node).filter((row) => - Object.values(row)[0] !== "category" - && Object.values(row)[0] !== "color" - && Object.values(row)[0] !== "label" - && Object.values(row)[0] !== "target" - && Object.values(row)[0] !== "source").map((row, index) => ( - // eslint-disable-next-line react/no-array-index-key - - { - Object.values(row).map((cell, cellIndex) => { + Object.entries(node).filter((row) => !excludedProperties.has(row[0])).map((row, index) => ( + // eslint-disable-next-line react/no-array-index-key + + { + Object.values(row).map((cell, cellIndex) => { - const strCell = JSON.stringify(cell) - const text = cellIndex === 1 ? JSON.parse(strCell) : strCell - return ( - // eslint-disable-next-line react/no-array-index-key - - - - - {text} - - -

{text}

-
-
-
-
- ) - }) - } -
- )) + const strCell = JSON.stringify(cell) + const text = cellIndex === 1 ? JSON.parse(strCell) : strCell + return ( + // eslint-disable-next-line react/no-array-index-key + + + + + {text} + + +

{text}

+
+
+
+
+ ) + }) + } +
+ )) }
diff --git a/app/graph/query.tsx b/app/graph/query.tsx index 1b4302a8..5971dddc 100644 --- a/app/graph/query.tsx +++ b/app/graph/query.tsx @@ -3,7 +3,7 @@ import { Label } from "@/components/ui/label"; import { cn } from "@/lib/utils"; import { useState } from "react"; import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger } from "@/components/ui/alert-dialog"; -import { Menu, Search, Trash2 } from "lucide-react"; +import { Menu, Play, Trash2 } from "lucide-react"; import { useToast } from "@/components/ui/use-toast"; import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger } from "@/components/ui/dropdown-menu"; import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@/components/ui/tooltip"; @@ -52,7 +52,7 @@ export function Query({ onSubmit, onQueryUpdate, onDeleteGraph, className = "" } return (
onSubmit(e)}> + onSubmit={onSubmit}>
@@ -77,10 +77,10 @@ export function Query({ onSubmit, onQueryUpdate, onDeleteGraph, className = "" } - + -

Query

+

Run Query

diff --git a/components/custom/navbar.tsx b/components/custom/navbar.tsx index 904429af..7fd7138f 100644 --- a/components/custom/navbar.tsx +++ b/components/custom/navbar.tsx @@ -26,7 +26,6 @@ export default function Navbar({ links, collapsed, onExpand }: { links: LinkDefi useEffect(() => { setMounted(true) }, []) - const setDarkMode = (val: boolean) => { if (val) { setTheme("dark") @@ -76,4 +75,4 @@ export default function Navbar({ links, collapsed, onExpand }: { links: LinkDefi ) -} +} \ No newline at end of file diff --git a/e2e/graph.spec.ts b/e2e/graph.spec.ts index 5d97bf5e..1327633c 100644 --- a/e2e/graph.spec.ts +++ b/e2e/graph.spec.ts @@ -1,4 +1,4 @@ -import { expect, test } from '@playwright/test'; +import { test } from '@playwright/test'; test.beforeEach(async ({ page }) => { await page.goto('http://localhost:3000/login');