Skip to content

A modern platform for visual, flexible, and extensible graph-based investigations. For cybersecurity analysts and investigators.

feat: open console on scan launch

dextmorgn04d39864172c
diff --git a/flowsint-app/public/icon.ico b/flowsint-app/public/icon.ico
new file mode 100644
index 00000000..b3c416d6
Binary files /dev/null and b/flowsint-app/public/icon.ico differ
diff --git a/flowsint-app/public/icon.png b/flowsint-app/public/icon.png
new file mode 100644
index 00000000..b3c416d6
Binary files /dev/null and b/flowsint-app/public/icon.png differ
diff --git a/flowsint-app/src/components/graphs/graph.tsx b/flowsint-app/src/components/graphs/graph.tsx
index 239041c5..22c088a4 100644
--- a/flowsint-app/src/components/graphs/graph.tsx
+++ b/flowsint-app/src/components/graphs/graph.tsx
@@ -9,11 +9,9 @@ import { type CosmosInputNode } from '@cosmograph/cosmos'
import { ResizablePanel, ResizablePanelGroup } from '../ui/resizable'
import EmptyState from './empty-state'
-// Lazy loading du timeline
const CosmographTimeline = lazy(() =>
import('@cosmograph/react').then((module) => ({ default: module.CosmographTimeline }))
)
-// Hook pour tracker l'état de chargement de Cosmograph
const useCosmographLoader = (nodes: any[], edges: any[]) => {
const [isCosmographReady, setIsCosmographReady] = useState(true)
const [loadingStage, setLoadingStage] = useState<'importing' | 'rendering' | 'ready'>('ready')
@@ -21,7 +19,6 @@ const useCosmographLoader = (nodes: any[], edges: any[]) => {
const dataVersionRef = useRef(0)
useEffect(() => {
- // Reset l'état quand les données changent
dataVersionRef.current += 1
setIsCosmographReady(false)
setLoadingStage('importing')
@@ -30,7 +27,6 @@ const useCosmographLoader = (nodes: any[], edges: any[]) => {
setLoadingStage('ready')
return
}
- // Skip simulation if no edges
if (edges.length === 0) {
setIsCosmographReady(true)
setLoadingStage('ready')
@@ -149,7 +145,6 @@ const GraphContent = memo(() => {
}
}, [cosmograph?.cosmograph, isCosmographReady])
- // Configuration des actions une seule fois
useEffect(() => {
if (cosmograph?.cosmograph && !actionsSetRef.current) {
const actions = {
@@ -217,7 +212,6 @@ const GraphContent = memo(() => {
})
GraphContent.displayName = 'GraphContent'
-// Timeline avec ses propres optimisations
const TimelinePanel = memo(() => {
const handleAnimationPlay = useCallback(() => {}, [])
@@ -244,7 +238,6 @@ const TimelinePanel = memo(() => {
})
TimelinePanel.displayName = 'TimelinePanel'
-// Provider wrapper mémorisé pour éviter les re-créations
const GraphProvider = memo(
({ nodes, edges, children }: { nodes: any[]; edges: any[]; children: React.ReactNode }) => {
return (
@@ -256,7 +249,6 @@ const GraphProvider = memo(
)
GraphProvider.displayName = 'GraphProvider'
-// Composant principal avec optimisations maximales
const Graph = memo(() => {
const nodes = useGraphStore((s) => s.filteredNodes)
const edges = useGraphStore((s) => s.filteredEdges)
diff --git a/flowsint-app/src/hooks/use-launch-flow.ts b/flowsint-app/src/hooks/use-launch-flow.ts
index 0ccaeecf..6afed828 100644
--- a/flowsint-app/src/hooks/use-launch-flow.ts
+++ b/flowsint-app/src/hooks/use-launch-flow.ts
@@ -3,16 +3,19 @@ import { useConfirm } from '@/components/use-confirm-dialog'
import { flowService } from '@/api/flow-service'
import { useMutation, useQueryClient } from '@tanstack/react-query'
import { queryKeys } from '@/api/query-keys'
+import { useLayoutStore } from '@/stores/layout-store'
export function useLaunchFlow(askUser: boolean = false) {
const { confirm } = useConfirm()
const queryClient = useQueryClient()
+ const openClonsole = useLayoutStore(s => s.openConsole)
// Launch flow mutation
const launchFlowMutation = useMutation({
mutationFn: ({ flowId, body }: { flowId: string; body: BodyInit }) =>
flowService.launch(flowId, body),
- onSuccess: (data, variables) => {
+ onSuccess: (_, variables) => {
+ openClonsole()
queryClient.invalidateQueries({
queryKey: queryKeys.flows.detail(variables.flowId)
})
diff --git a/flowsint-app/src/hooks/use-launch-transform.ts b/flowsint-app/src/hooks/use-launch-transform.ts
index 47a11bb7..50bf27b7 100644
--- a/flowsint-app/src/hooks/use-launch-transform.ts
+++ b/flowsint-app/src/hooks/use-launch-transform.ts
@@ -1,9 +1,12 @@
import { toast } from 'sonner'
import { useConfirm } from '@/components/use-confirm-dialog'
import { transformService } from '@/api/transform-service'
+import { useLayoutStore } from '@/stores/layout-store'
export function useLaunchTransform(askUser: boolean = false) {
const { confirm } = useConfirm()
+ const openClonsole = useLayoutStore(s => s.openConsole)
+
const launchTransform = async (
values: string[],
transformName: string,
@@ -26,6 +29,7 @@ export function useLaunchTransform(askUser: boolean = false) {
`Transform ${transformName} has been launched on ${sliced.join(', ')}${left > 0 ? ` and ${left} others` : ''}.`,
error: () => `An error occurred launching transform.`
})
+ openClonsole()
return
}
return {
diff --git a/flowsint-app/src/stores/layout-store.ts b/flowsint-app/src/stores/layout-store.ts
index 4b0ff86d..6985b49d 100644
--- a/flowsint-app/src/stores/layout-store.ts
+++ b/flowsint-app/src/stores/layout-store.ts
@@ -9,6 +9,7 @@ interface LayoutStore {
isOpenAnalysis: boolean
chatWidth: number
chatHeight: number
+ openConsole: () => void
toggleConsole: () => void
togglePanel: () => void
toggleChat: () => void
@@ -39,6 +40,7 @@ export const useLayoutStore = create<LayoutStore>()(
chatHeight: 600,
activeTab: 'entities',
activeTransformTab: 'transforms',
+ openConsole: () => set(() => ({ isOpenConsole: true })),
toggleConsole: () => set((state) => ({ isOpenConsole: !state.isOpenConsole })),
togglePanel: () => set((state) => ({ isOpenPanel: !state.isOpenPanel })),
toggleDetails: () => set((state) => ({ isOpenDetails: !state.isOpenDetails })),
diff --git a/flowsint-core/src/flowsint_core/core/vault.py b/flowsint-core/src/flowsint_core/core/vault.py
index c24ec8da..9d75bc5a 100644
--- a/flowsint-core/src/flowsint_core/core/vault.py
+++ b/flowsint-core/src/flowsint_core/core/vault.py
@@ -13,7 +13,6 @@ from cryptography.hazmat.primitives.ciphers.aead import AESGCM
from dotenv import load_dotenv
-# Charger les variables d'environnement
load_dotenv()