A modern platform for visual, flexible, and extensible graph-based investigations. For cybersecurity analysts and investigators.
feat: large data
dextmorgn7cb6f6c123dd
diff --git a/flowsint-web/src/components/investigations/sketch/graph.tsx b/flowsint-web/src/components/investigations/sketch/graph.tsxindex c5378268..36d6005a 100644--- a/flowsint-web/src/components/investigations/sketch/graph.tsx+++ b/flowsint-web/src/components/investigations/sketch/graph.tsx@@ -227,14 +227,13 @@ const LayoutFlow = ({ refetch, theme }: LayoutFlowProps) => {const {currentNode,setCurrentNode,- resetNodeStyles,reloading,updateNode,highlightPath} = useFlowStore(stateSelector, shallow)const initialLayout = useCallback(() => {const timer = setTimeout(() => {- onLayout("TB", fitView)+ onLayout("force", fitView)fitView()}, 500)return () => clearTimeout(timer)@@ -244,7 +243,7 @@ const LayoutFlow = ({ refetch, theme }: LayoutFlowProps) => {}, [initialLayout])const handleRefetch = useCallback(() => {refetch()- onLayout("TB", fitView)+ onLayout("force", fitView)fitView()}, [refetch, onLayout, fitView])useEffect(() => {@@ -303,7 +302,7 @@ const LayoutFlow = ({ refetch, theme }: LayoutFlowProps) => {onNodeClick,onPaneClick: handlePaneClick,onNodeContextMenu: handleNodeContextMenu,- minZoom: 0.1,+ minZoom: 0.4,fitView: true,proOptions: { hideAttribution: true },edgeTypes,@@ -372,7 +371,7 @@ const LayoutFlow = ({ refetch, theme }: LayoutFlowProps) => {<ResizablePanelGroup autoSaveId="conditional" direction="vertical">{currentNode && <><ResizablePanel order={1} id="top" defaultSize={50}>- <ProfilePanel data={currentNode.data} type={currentNode.type} />+ <ProfilePanel data={currentNode.data} /></ResizablePanel><ResizableHandle /></>}diff --git a/flowsint-web/src/components/investigations/sketch/nodes-panel.tsx b/flowsint-web/src/components/investigations/sketch/nodes-panel.tsxindex 17652bb4..49a6ae91 100644--- a/flowsint-web/src/components/investigations/sketch/nodes-panel.tsx+++ b/flowsint-web/src/components/investigations/sketch/nodes-panel.tsx@@ -1,4 +1,4 @@-import React, { memo, useMemo } from 'react'+import React, { memo, useMemo, useState } from 'react'import { type Node } from '@xyflow/react'import { useFlowStore } from '@/store/flow-store'import { Button } from '@/components/ui/button'@@ -6,8 +6,9 @@ import { Avatar, AvatarFallback, AvatarImage } from '@/components/ui/avatar'import { Badge } from '@/components/ui/badge'import { TypeBadge } from '@/components/type-badge'import { Card, CardContent } from "@/components/ui/card"-import { AtSignIcon, CarIcon, Mail, User, UserIcon, Users } from "lucide-react"+import { AtSignIcon, CarIcon, Mail, Search, User, UserIcon, Users } from "lucide-react"import { usePlatformIcons } from '@/lib/hooks/use-platform-icons'+import { Input } from '@/components/ui/input'interface NodeProps {node: any,@@ -72,13 +73,44 @@ export function NodeRenderer({ node, setCurrentNode }: NodeProps) {const NodesPanel = ({ nodes }: { nodes: Node[] }) => {const { setCurrentNode } = useFlowStore()+ const [searchQuery, setSearchQuery] = useState("")++ // Filter nodes based on search query+ const filteredNodes = nodes?.filter((node) => {+ const searchText = searchQuery.toLowerCase()+ // Search in node name, title, label, or id - adjust based on your node structure+ return (+ //@ts-ignore+ node?.data?.label?.toLowerCase().includes(searchText) ||+ node.id.toLowerCase().includes(searchText)+ )+ })+return (<div className="overflow-auto h-full flex flex-col w-full !p-0 !m-0">- {nodes?.map((node: any) => (- <NodeRenderer node={node} setCurrentNode={setCurrentNode} key={node.id} />- ))}- </div>- )+ <div className="sticky top-0 p-2 bg-background z-10">+ <div className="flex items-center gap-2">+ <h3 className="text-sm font-medium">Nodes</h3>+ <Badge>{nodes?.length || 0}</Badge>+ <div className="relative grow">+ <Search className="absolute left-2.5 top-1.5 h-4 w-4 text-muted-foreground" />+ <Input+ type="text"+ placeholder="Search nodes..."+ className="pl-8 h-7"+ value={searchQuery}+ onChange={(e) => setSearchQuery(e.target.value)}+ />+ </div>+ </div>+ </div>++ {filteredNodes?.length === 0 ? (+ <div className="p-4 text-center text-muted-foreground">No nodes match your search</div>+ ) : (+ filteredNodes?.map((node: any) => <NodeRenderer node={node} setCurrentNode={setCurrentNode} key={node.id} />)+ )}+ </div>)}export default memo(NodesPanel)\ No newline at end of filediff --git a/flowsint-web/src/components/investigations/sketch/nodes/email.tsx b/flowsint-web/src/components/investigations/sketch/nodes/email.tsxindex 4e6f855f..7b005b18 100644--- a/flowsint-web/src/components/investigations/sketch/nodes/email.tsx+++ b/flowsint-web/src/components/investigations/sketch/nodes/email.tsx@@ -8,7 +8,7 @@ import { cn, typeColorMap } from '@/lib/utils';export default memo(({ data, selected }: any) => {return (- <BaseNode className={cn('p-.5 rounded-full', typeColorMap["email"])} selected={selected}>+ <BaseNode className={cn('p-.5 rounded-full', "bg-gradient-to-br from-emerald-50 to-emerald-100 border-emerald-200 shadow-sm dark:from-emerald-950 dark:to-emerald-900 dark:border-emerald-800 dark:shadow-emerald-900/30")} selected={selected}><div className="flex items-center gap-2 p-1"><Badge variant="secondary" className="h-6 w-6 p-0 rounded-full dark:bg-emerald-900 bg-emerald-200"><AtSignIcon className="h-4 w-4" />diff --git a/flowsint-web/src/components/investigations/sketch/nodes/person.tsx b/flowsint-web/src/components/investigations/sketch/nodes/person.tsxindex ae73cf7b..a9a63bfb 100644--- a/flowsint-web/src/components/investigations/sketch/nodes/person.tsx+++ b/flowsint-web/src/components/investigations/sketch/nodes/person.tsx@@ -4,11 +4,11 @@ import { CopyButton } from '@/components/copy';import { Avatar, AvatarImage } from '@/components/ui/avatar';import { BaseNode } from "@/components/ui/base-node";import { UserIcon } from 'lucide-react';-import { cn, typeColorMap } from '@/lib/utils';+import { cn } from '@/lib/utils';export default memo(({ data, selected }: any) => {return (- <BaseNode selected={selected} className={cn('p-1 rounded-full', typeColorMap["individual"])} >+ <BaseNode selected={selected} className={cn('p-1 rounded-full', "rounded-full bg-gradient-to-br from-slate-50 to-slate-100 border-slate-200 shadow-md dark:from-slate-800 dark:to-slate-900 dark:border-slate-700 dark:shadow-slate-900/30")} ><div className="flex gap-2 items-center rounded-full"><Avatar className="h-9 w-9 flex items-center justify-center dark:bg-slate-900 bg-slate-200"><AvatarImage src={data?.image_url} alt={data.full_name} />diff --git a/flowsint-web/src/components/investigations/sketch/nodes/social.tsx b/flowsint-web/src/components/investigations/sketch/nodes/social.tsxindex b6d88c3c..23156b8b 100644--- a/flowsint-web/src/components/investigations/sketch/nodes/social.tsx+++ b/flowsint-web/src/components/investigations/sketch/nodes/social.tsx@@ -15,7 +15,7 @@ export default memo(({ data, selected }: any) => {}}, [platformsIcons, data?.platform])return (- <BaseNode className={cn('p-.5 rounded-full', typeColorMap["social"])} selected={selected}>+ <BaseNode className={cn('p-.5 rounded-full', "bg-gradient-to-br from-purple-50 to-purple-100 border-purple-200 shadow-sm dark:from-purple-950 dark:to-purple-900 dark:border-purple-800 dark:shadow-purple-900/30")} selected={selected}><div className="flex items-center gap-2 p-1"><Badge variant="secondary" className="h-6 w-6 p-0 rounded-full dark:bg-purple-900 bg-purple-200">{platformIcon}diff --git a/flowsint-web/src/components/investigations/sketch/nodes/vehicle.tsx b/flowsint-web/src/components/investigations/sketch/nodes/vehicle.tsxindex 04d47ef2..36e2b0ac 100644--- a/flowsint-web/src/components/investigations/sketch/nodes/vehicle.tsx+++ b/flowsint-web/src/components/investigations/sketch/nodes/vehicle.tsx@@ -8,7 +8,7 @@ import { cn, typeColorMap } from '@/lib/utils';export default memo(({ data, selected }: any) => {return (- <BaseNode className={cn('p-.5 rounded-full', typeColorMap["vehicle"])} selected={selected}>+ <BaseNode className={cn('p-.5 rounded-full', "bg-orange-100 text-orange-800 hover:bg-orange-100/80 dark:bg-orange-900/30 dark:text-orange-300 dark:hover:bg-orange-900/40")} selected={selected}><div className="flex items-center gap-2 p-1"><Badge variant="secondary" className="h-6 w-6 p-0 rounded-full"><CarIcon className="h-4 w-4" />diff --git a/flowsint-web/src/components/investigations/sketch/profile-panel.tsx b/flowsint-web/src/components/investigations/sketch/profile-panel.tsxindex aac59fbf..958397ef 100644--- a/flowsint-web/src/components/investigations/sketch/profile-panel.tsx+++ b/flowsint-web/src/components/investigations/sketch/profile-panel.tsx@@ -11,7 +11,7 @@ import SearchEmail from "./search-email"import { memo } from "react"import { cn } from "@/lib/utils"-export default function ProfilePanel({ data, type }: { data: any, type: "individual" | "email" }) {+export default function ProfilePanel({ data, }: { data: any }) {const { project_id, investigation_id } = useParams()const { setCurrentNode } = useFlowStore()