A modern platform for visual, flexible, and extensible graph-based investigations. For cybersecurity analysts and investigators.
feat: context menu on nodes
dextmorgn43148cdf3df4
diff --git a/flowsint-api/alembic/versions/6dfa83113ad7_change_content_colum_of_log_to_json.py b/flowsint-api/alembic/versions/6dfa83113ad7_change_content_colum_of_log_to_json.pynew file mode 100644index 00000000..5c102f30--- /dev/null+++ b/flowsint-api/alembic/versions/6dfa83113ad7_change_content_colum_of_log_to_json.py@@ -0,0 +1,90 @@+"""change content column of Log to JSON++Revision ID: 6dfa83113ad7+Revises: ba3d00e11612+Create Date: 2025-06-18 17:42:28.391884+"""+from typing import Sequence, Union++from alembic import op+import sqlalchemy as sa+from sqlalchemy.dialects import postgresql++# revision identifiers, used by Alembic.+revision: str = '6dfa83113ad7'+down_revision: Union[str, None] = 'ba3d00e11612'+branch_labels: Union[str, Sequence[str], None] = None+depends_on: Union[str, Sequence[str], None] = None+++def upgrade() -> None:+ """Upgrade schema."""+ # 1. Crée le nouveau type ENUM+ op.execute("""+ CREATE TYPE eventlevel AS ENUM (+ 'INFO', 'WARNING', 'FAILED', 'SUCCESS', 'DEBUG',+ 'PENDING', 'RUNNING', 'COMPLETED', 'GRAPH_APPEND'+ )+ """)++ # 2. Change 'logs.content' de TEXT à JSONB+ op.execute("""+ ALTER TABLE logs+ ALTER COLUMN content TYPE JSONB+ USING CASE+ WHEN content IS NULL THEN 'null'::jsonb+ ELSE content::jsonb+ END+ """)++ # 3. Supprime le DEFAULT sur logs.type+ op.execute("""+ ALTER TABLE logs ALTER COLUMN type DROP DEFAULT+ """)++ # 4. Change le type de logs.type vers le nouvel ENUM+ op.execute("""+ ALTER TABLE logs+ ALTER COLUMN type TYPE eventlevel+ USING type::eventlevel+ """)++ # 5. Réapplique le DEFAULT avec le bon type+ op.execute("""+ ALTER TABLE logs ALTER COLUMN type SET DEFAULT 'INFO'+ """)++ # 6. Change scans.status vers le même ENUM+ op.execute("""+ ALTER TABLE scans+ ALTER COLUMN status TYPE eventlevel+ USING status::text::eventlevel+ """)++++def downgrade() -> None:+ """Downgrade schema."""+ # 1. Revert 'scans.status' to old ENUM type+ op.execute("""+ ALTER TABLE scans+ ALTER COLUMN status TYPE scannerstatus+ USING status::text::scannerstatus+ """)++ # 2. Revert 'logs.type' back to VARCHAR+ op.execute("""+ ALTER TABLE logs+ ALTER COLUMN type TYPE VARCHAR+ USING type::text+ """)++ # 3. Revert 'logs.content' back to TEXT+ op.execute("""+ ALTER TABLE logs+ ALTER COLUMN content TYPE TEXT+ USING content::text+ """)++ # 4. Drop the new ENUM type+ op.execute("DROP TYPE eventlevel")diff --git a/flowsint-api/app/api/routes/logs.py b/flowsint-api/app/api/routes/events.pysimilarity index 75%rename from flowsint-api/app/api/routes/logs.pyrename to flowsint-api/app/api/routes/events.pyindex c6f6321a..021b2f2c 100644--- a/flowsint-api/app/api/routes/logs.py+++ b/flowsint-api/app/api/routes/events.py@@ -5,29 +5,23 @@ from app.core.postgre_db import get_dbfrom app.models.models import Log, Sketchfrom app.core.events import event_emitterfrom sse_starlette.sse import EventSourceResponse+from app.core.types import Eventfrom app.api.deps import get_current_userfrom app.models.models import Profile, Sketchimport jsonimport asynciofrom datetime import datetime, timedelta-from enum import Enum--class ScannerStatus(str, Enum):- PENDING = "pending"- RUNNING = "running"- COMPLETED = "completed"- FAILED = "failed"router = APIRouter()[email protected]("/sketch/{sketch_id}")[email protected]("/sketch/{sketch_id}/logs")def get_logs_by_sketch(sketch_id: str,limit: int = 100,since: datetime | None = None,db: Session = Depends(get_db),# current_user: Profile = Depends(get_current_user)-):+):"""Get historical logs for a specific sketch with optional filtering"""# Check if sketch existssketch = db.query(Sketch).filter(Sketch.id == sketch_id).first()@@ -45,23 +39,22 @@ def get_logs_by_sketch(logs = query.limit(limit).all()- results = [{- "id": str(log.id),- "sketch_id": str(log.sketch_id) if log.sketch_id else None,- "type": log.type,- "content": log.content.split("] ", 1)[1] if "] " in log.content else log.content, # Remove prefix if exists- "created_at": log.created_at.isoformat()- } for log in logs]-+ results = [Event(+ id=str(log.id),+ sketch_id=str(log.sketch_id) if log.sketch_id else None,+ type=log.type,+ payload=log.content+ ) for log in logs]+return results@router.get("/sketch/{sketch_id}/stream")-async def stream_logs(request: Request, sketch_id: str,+async def stream_events(request: Request, sketch_id: str,db: Session = Depends(get_db),# current_user: Profile = Depends(get_current_user)):- """Stream logs for a specific scan in real-time"""+ """Stream events for a specific scan in real-time"""# Check if sketch existssketch = db.query(Sketch).filter(Sketch.id == sketch_id).first()@@ -69,25 +62,20 @@ async def stream_logs(request: Request, sketch_id: str,raise HTTPException(status_code=404, detail=f"Sketch with id {sketch_id} not found")async def event_generator():- print("[EventEmitter] Start generator")channel = sketch_idawait event_emitter.subscribe(channel)try:# Initial connection messageyield "data: {\"event\": \"connected\", \"data\": \"Connected to log stream\"}\n\n"-while True:if await request.is_disconnected():- print(f"[EventEmitter] Client disconnected from sketch_id: {sketch_id}")breakdata = await event_emitter.get_message(channel)if data is None:await asyncio.sleep(0.1) # avoid tight loop on Nonecontinue-- print(f"[EventEmitter] Received data: {data}")-+# Handle different types of eventsif isinstance(data, dict) and data.get('type') == 'scanner_complete':# Send scanner completion event@@ -113,8 +101,12 @@ async def stream_logs(request: Request, sketch_id: str,})[email protected]("/sketch/{sketch_id}")-def delete_scan_logs(sketch_id:str, db: Session = Depends(get_db), current_user: Profile = Depends(get_current_user)):[email protected]("/sketch/{sketch_id}/logs")+def delete_scan_logs(+ sketch_id:str,+ db: Session = Depends(get_db),+ current_user: Profile = Depends(get_current_user)+ ):"""Delete all logs for a specific scan"""try:db.query(Log).filter(Log.sketch_id == sketch_id).delete()@@ -142,7 +134,7 @@ async def stream_status(request: Request, scan_id: str,await asyncio.sleep(0.1)continueprint(f"[EventEmitter] Received status data: {data}")- yield f"data: {json.dumps({'event': 'status_update', 'data': data})}\n\n"+ yield f"data: {data}\n\n"except asyncio.CancelledError:print(f"[EventEmitter] Client disconnected from status stream for scan_id: {scan_id}")@@ -157,21 +149,4 @@ async def stream_status(request: Request, scan_id: str,"Connection": "keep-alive","X-Accel-Buffering": "no"}- )-[email protected]("/status/scan/{scan_id}")-async def update_status(- scan_id: str,- status: ScannerStatus,- details: dict = None,- db: Session = Depends(get_db)-):- """Update the status of a scan"""- status_data = {- "status": status,- "timestamp": datetime.utcnow().isoformat(),- "details": details or {}- }-- await event_emitter.emit(f"scan_{scan_id}_status", status_data)- return {"message": "Status updated successfully"}\ No newline at end of file+ )\ No newline at end of filediff --git a/flowsint-api/app/api/routes/sketches.py b/flowsint-api/app/api/routes/sketches.pyindex 3b1eda0c..681c0d18 100644--- a/flowsint-api/app/api/routes/sketches.py+++ b/flowsint-api/app/api/routes/sketches.py@@ -1,5 +1,5 @@from fastapi import APIRouter, HTTPException, Depends, status-from pydantic import BaseModel+from pydantic import BaseModel, Field, validatorfrom typing import Dict, Any, Literalfrom fastapi import HTTPExceptionfrom pydantic import BaseModel, Field@@ -104,10 +104,12 @@ async def get_sketch_nodes(id: str, db: Session = Depends(get_db), current_user:"labels": record["labels"],"data": record["data"],"label": record["data"].get("label", "Node"),- "type": record["labels"][0].lower(),+ "type": "custom","caption": record["data"].get("label", "Node"),- "x": random.random() * 1000,- "y": random.random() * 1000,+ "position":{+ "x": random.random() * 1000,+ "y": random.random() * 1000,+ },"idx": idx}for idx, record in enumerate(nodes_result)@@ -116,41 +118,66 @@ async def get_sketch_nodes(id: str, db: Session = Depends(get_db), current_user:rels = [{"id": str(record["id"]),- "type": record["type"],- "from": str(record["source"]),- "to": str(record["target"]),+ "type": "straight",+ "source": str(record["source"]),+ "target": str(record["target"]),"data": record["data"],"caption": record["type"],+ "label": record["type"].lower(),}for record in rels_result]return {"nds": nodes, "rls": rels}+class NodeData(BaseModel):+ label: str = Field(default="Node", description="Label/name of the node")+ color: str = Field(default="Node", description="Color of the node")+ type: str = Field(default="Node", description="Type of the node")+ # Add any other specific data fields that might be common across nodesclass NodeInput(BaseModel):- type: str- data: Dict[str, Any] = Field(default_factory=dict)+ type: str = Field(..., description="Type of the node")+ data: NodeData = Field(default_factory=NodeData, description="Additional data for the node")++ @validator('type')+ def validate_type(cls, v):+ # Convert to lowercase and strip any whitespace+ v = v.lower().strip()+ if not v:+ raise ValueError('Type cannot be empty')+ return v++ class Config:+ json_schema_extra = {+ "example": {+ "type": "person",+ "data": {+ "label": "John Doe",+ "color": "#FF0000"+ }+ }+ }def dict_to_cypher_props(props: dict, prefix: str = "") -> str:return ", ".join(f"{key}: ${prefix}{key}" for key in props)@router.post("/{sketch_id}/nodes/add")def add_node(sketch_id: str, node: NodeInput, current_user: Profile = Depends(get_current_user)):-- node_type = getattr(node, "type", "unknown").lower()- node_data = getattr(node, "data", {})+ node_data = node.data.model_dump()+ print(node_data)+ node_type = node_data["type"]properties = {"type": node_type,"sketch_id": sketch_id,- "caption": node_data.get("label", "Node"),- "label": node_data.get("label", "Node"),- "color": node_data.get("color", "Node"),+ "caption": node_data["label"],+ "label": node_data["label"],+ "color": node_data["color"],"size": 40,}- if node_data and isinstance(node_data, dict):+ if node_data:flattened_data = flatten(node_data)properties.update(flattened_data)@@ -174,8 +201,9 @@ def add_node(sketch_id: str, node: NodeInput, current_user: Profile = Depends(genew_node = create_result[0]["node"]except (IndexError, KeyError) as e:print(f"Error extracting node_id: {e}, result: {create_result}")- new_node = None- new_node["data"]=node_data+ raise HTTPException(status_code=500, detail="Failed to extract node data from response")++ new_node["data"] = node_datareturn {"status": "node added",diff --git a/flowsint-api/app/api/schemas/log.py b/flowsint-api/app/api/schemas/log.pydeleted file mode 100644index 75625c70..00000000--- a/flowsint-api/app/api/schemas/log.py+++ /dev/null@@ -1,24 +0,0 @@-from uuid import UUID-from .base import ORMBase-from pydantic import UUID4, BaseModel-from typing import Optional-from datetime import datetime--class LogCreate(BaseModel):- content: str- sketch_id: UUID4- type: Optional[str] = "INFO"--class LogRead(ORMBase):- id: UUID4- content: str- created_at: datetime- sketch_id: UUID4- type: str--class LogSchema(BaseModel):- id: int- sketch_id: UUID- type: str- content: str- created_at: datetime\ No newline at end of filediff --git a/flowsint-api/app/core/celery.py b/flowsint-api/app/core/celery.pyindex e8f3abe8..48fb6b36 100644--- a/flowsint-api/app/core/celery.py+++ b/flowsint-api/app/core/celery.py@@ -6,7 +6,7 @@ celery = Celery(broker=settings.CELERY_BROKER_URL,backend=settings.CELERY_RESULT_BACKEND,include=[- "app.tasks.logging",+ "app.tasks.event","app.tasks.transform",])diff --git a/flowsint-api/app/core/enums.py b/flowsint-api/app/core/enums.pyindex 77798513..2a6a1c17 100644--- a/flowsint-api/app/core/enums.py+++ b/flowsint-api/app/core/enums.py@@ -1,7 +1,25 @@from enum import Enum-class ScannerStatus(str, Enum):- PENDING = "pending"- RUNNING = "running"- COMPLETED = "completed"- FAILED = "failed"\ No newline at end of file++class EventLevel(str, Enum):+ # Standard log levels+ INFO = "INFO"+ WARNING = "WARNING"+ FAILED = "FAILED"+ SUCCESS = "SUCCESS"+ DEBUG = "DEBUG"+ # Scanner-specific statuses+ PENDING = "PENDING"+ RUNNING = "RUNNING"+ COMPLETED = "COMPLETED"+ GRAPH_APPEND = "GRAPH_APPEND"++ @classmethod+ def from_lowercase(cls, value: str) -> "EventLevel":+ """Convert a lowercase string to the corresponding EventLevel enum value"""+ return cls[value.upper()]++ @property+ def lowercase(self) -> str:+ """Get the lowercase version of the enum value"""+ return self.value.lower()\ No newline at end of filediff --git a/flowsint-api/app/core/events.py b/flowsint-api/app/core/events.pyindex 11fcc73f..744fca85 100644--- a/flowsint-api/app/core/events.py+++ b/flowsint-api/app/core/events.py@@ -12,7 +12,6 @@ class EventEmitter:self.id = uuid.uuid4()self.redis = redis.from_url(os.getenv("REDIS_URI", "redis://localhost:6379/0"))self.pubsubs: Dict[str, redis.client.PubSub] = {}- print(f"[EventEmitter] Initialized with id {self.id}")async def subscribe(self, channel: str):"""Subscribe to Redis channel"""@@ -20,7 +19,6 @@ class EventEmitter:pubsub = self.redis.pubsub()await pubsub.subscribe(channel)self.pubsubs[channel] = pubsub- print(f"[EventEmitter] Subscribed to Redis channel {channel}")async def unsubscribe(self, channel: str):"""Unsubscribe from Redis channel"""@@ -28,12 +26,10 @@ class EventEmitter:await self.pubsubs[channel].unsubscribe(channel)await self.pubsubs[channel].close()del self.pubsubs[channel]- print(f"[EventEmitter] Unsubscribed from Redis channel {channel}")async def get_message(self, channel: str = None):"""Get the next message from Redis for a specific channel"""if channel not in self.pubsubs:- print(f"[EventEmitter] No subscription found for channel {channel}")return Nonemessage = await self.pubsubs[channel].get_message(ignore_subscribe_messages=True)@@ -41,22 +37,17 @@ class EventEmitter:await asyncio.sleep(0.1)return None- print(f"[EventEmitter] Raw message from Redis: {str(message)}")if message:data = message["data"]if isinstance(data, bytes):decoded = data.decode("utf-8")- print(f"[EventEmitter] Decoded message: {decoded}")return decoded- print(f"[EventEmitter] Non-bytes message: {str(data)}")return str(data)return Noneasync def emit(self, channel: str, data: any):"""Emit an event to a Redis channel"""- print(f"[EventEmitter] Emitting to channel {channel}: {data}")await self.redis.publish(channel, json.dumps(data))- print(f"[EventEmitter] Successfully emitted to channel {channel}")def _is_valid_uuid(self, uuid_str: str) -> bool:"""Validate if the string is a valid UUID"""diff --git a/flowsint-api/app/core/logger.py b/flowsint-api/app/core/logger.pyindex 5f063b8c..ebf6a175 100644--- a/flowsint-api/app/core/logger.py+++ b/flowsint-api/app/core/logger.py@@ -1,32 +1,22 @@from uuid import UUID-from typing import Literal, Union+from typing import Any, Dict, Unionfrom app.models.models import Log-from app.tasks.logging import emit_log_task+from app.tasks.event import emit_event_taskfrom app.core.postgre_db import get_db+from app.core.enums import EventLevelimport logginglogger = logging.getLogger(__name__)-LogLevel = Literal["info", "warn", "error", "success", "debug"]--LEVEL_MAP = {- "info": "INFO",- "warn": "WARN",- "error": "ERROR",- "success": "SUCCESS",- "debug": "DEBUG",-}--class Logger:@staticmethod- def _create_log(sketch_id: Union[str, UUID], type: str, content: str) -> Log:+ def _create_log(sketch_id: Union[str, UUID], level: EventLevel, content: str) -> Log:"""Create a log entry in the database"""db = next(get_db())try:log = Log(sketch_id=str(sketch_id),- type=type,+ type=level.value,content=content)db.add(log)@@ -37,46 +27,49 @@ class Logger:db.close()@staticmethod- def _format_message(type: str, message: str) -> str:- """Format the log message with type prefix"""- return f"[{type.upper()}] {message}"-- @staticmethod- def info(sketch_id: Union[str, UUID], message: str):+ def info(sketch_id: Union[str, UUID], message: Dict):"""Log an info message"""- formatted_message = Logger._format_message("INFO", message)- logger.info(formatted_message)- log = Logger._create_log(sketch_id, "INFO", formatted_message)- emit_log_task.delay(str(log.id), str(sketch_id), "INFO", formatted_message)+ log = Logger._create_log(sketch_id, EventLevel.INFO, message)+ emit_event_task.apply(args=[str(log.id), str(sketch_id), EventLevel.INFO, message])@staticmethod- def error(sketch_id: Union[str, UUID], message: str):+ def error(sketch_id: Union[str, UUID], message: Dict):"""Log an error message"""- formatted_message = Logger._format_message("ERROR", message)- logger.error(formatted_message)- log = Logger._create_log(sketch_id, "ERROR", formatted_message)- emit_log_task.delay(str(log.id), str(sketch_id), "ERROR", formatted_message)+ log = Logger._create_log(sketch_id, EventLevel.FAILED, message)+ emit_event_task.apply(args=[str(log.id), str(sketch_id), EventLevel.FAILED, message])@staticmethod- def warn(sketch_id: Union[str, UUID], message: str):+ def warn(sketch_id: Union[str, UUID], message: Dict):"""Log a warning message"""- formatted_message = Logger._format_message("WARNING", message)- logger.warn(formatted_message)- log = Logger._create_log(sketch_id, "WARNING", formatted_message)- emit_log_task.delay(str(log.id), str(sketch_id), "WARNING", formatted_message)+ log = Logger._create_log(sketch_id, EventLevel.WARNING, message)+ emit_event_task.apply(args=[str(log.id), str(sketch_id), EventLevel.WARNING, message])@staticmethod- def debug(sketch_id: Union[str, UUID], message: str):+ def debug(sketch_id: Union[str, UUID], message: Dict):"""Log a debug message"""- formatted_message = Logger._format_message("DEBUG", message)- logger.debug(formatted_message)- log = Logger._create_log(sketch_id, "DEBUG", formatted_message)- emit_log_task.delay(str(log.id), str(sketch_id), "DEBUG", formatted_message)+ log = Logger._create_log(sketch_id, EventLevel.DEBUG, message)+ emit_event_task.apply(args=[str(log.id), str(sketch_id), EventLevel.DEBUG, message])++ @staticmethod+ def graph_append(sketch_id: Union[str, UUID], message: Dict):+ """Log an insert event to the graph"""+ log = Logger._create_log(sketch_id, EventLevel.GRAPH_APPEND, message)+ emit_event_task.apply(args=[str(log.id), str(sketch_id), EventLevel.GRAPH_APPEND, message])@staticmethod- def success(sketch_id: Union[str, UUID], message: str):+ def success(sketch_id: Union[str, UUID], message: Dict):"""Log a success message"""- formatted_message = Logger._format_message("SUCCESS", message)- logger.info(formatted_message)- log = Logger._create_log(sketch_id, "SUCCESS", formatted_message)- emit_log_task.delay(str(log.id), str(sketch_id), "SUCCESS", formatted_message)+ log = Logger._create_log(sketch_id, EventLevel.SUCCESS, message)+ emit_event_task.apply(args=[str(log.id), str(sketch_id), EventLevel.SUCCESS, message])++ @staticmethod+ def completed(sketch_id: Union[str, UUID], message: Dict):+ """Log a completed message"""+ log = Logger._create_log(sketch_id, EventLevel.COMPLETED, message)+ emit_event_task.apply(args=[str(log.id), str(sketch_id), EventLevel.COMPLETED, message])++ @staticmethod+ def pending(sketch_id: Union[str, UUID], message: Dict):+ """Log a pending message"""+ log = Logger._create_log(sketch_id, EventLevel.PENDING, message)+ emit_event_task.apply(args=[str(log.id), str(sketch_id), EventLevel.PENDING, message])diff --git a/flowsint-api/app/core/types.py b/flowsint-api/app/core/types.pynew file mode 100644index 00000000..fea6172b--- /dev/null+++ b/flowsint-api/app/core/types.py@@ -0,0 +1,11 @@+from pydantic import BaseModel, Field+from typing import Dict, Any+from datetime import datetime+from app.core.enums import EventLevel++class Event(BaseModel):+ id: str = Field(..., description="Unique identifier for the event")+ sketch_id: str = Field(..., description="ID of the sketch")+ type: EventLevel = Field(..., description="Type of event")+ payload: Dict[str, Any] = Field(..., description="Payload of the event")+ created_at: datetime = Field(default_factory=datetime.now, description="Timestamp when the event was created")\ No newline at end of filediff --git a/flowsint-api/app/main.py b/flowsint-api/app/main.pyindex 0a6866b9..f2fe6f08 100644--- a/flowsint-api/app/main.py+++ b/flowsint-api/app/main.py@@ -1,6 +1,5 @@from fastapi import FastAPIfrom app.core.graph_db import Neo4jConnection-from app.core.events import init_eventsimport osfrom typing import Listfrom dotenv import load_dotenv@@ -10,7 +9,7 @@ from app.api.routes import authfrom app.api.routes import investigationsfrom app.api.routes import sketchesfrom app.api.routes import transforms-from app.api.routes import logs+from app.api.routes import eventsfrom app.api.routes import analysisfrom app.api.routes import chatfrom app.api.routes import scan@@ -53,7 +52,7 @@ app.include_router(auth.router, prefix="/api/auth", tags=["auth"])app.include_router(sketches.router, prefix="/api/sketches", tags=["sketches"])app.include_router(investigations.router, prefix="/api/investigations", tags=["investigations"])app.include_router(transforms.router, prefix="/api/transforms", tags=["transforms"])-app.include_router(logs.router, prefix="/api/logs", tags=["logs"])+app.include_router(events.router, prefix="/api/events", tags=["events"])app.include_router(analysis.router, prefix="/api/analyses", tags=["analyses"])app.include_router(chat.router, prefix="/api/chat", tags=["chat"])app.include_router(scan.router, prefix="/api/scans", tags=["scans"])\ No newline at end of filediff --git a/flowsint-api/app/models/models.py b/flowsint-api/app/models/models.pyindex 6ff8717d..bbe9be2b 100644--- a/flowsint-api/app/models/models.py+++ b/flowsint-api/app/models/models.py@@ -3,13 +3,13 @@ from datetime import datetimefrom sqlalchemy import (String, Text, DateTime, ForeignKey,- Index, func, text, JSON, Column, Integer, Enum as SQLEnum+ Index, func, JSON, Column, Enum as SQLEnum)-from sqlalchemy.dialects.postgresql import UUID as PGUUID, ARRAY+from sqlalchemy.dialects.postgresql import UUID as PGUUID, ARRAY, JSONBfrom sqlalchemy.orm import Mapped, mapped_column, relationshipfrom .base import Base-from app.core.enums import ScannerStatus+from app.core.enums import EventLevelclass Feedback(Base):@@ -60,10 +60,10 @@ class Log(Base):__tablename__ = "logs"id: Mapped[uuid.UUID] = mapped_column(PGUUID(as_uuid=True), primary_key=True, default=uuid.uuid4)- content = mapped_column(Text)+ content = mapped_column(JSONB, nullable=True)created_at = mapped_column(DateTime(timezone=True), server_default=func.now())sketch_id = mapped_column(PGUUID(as_uuid=True), ForeignKey("sketches.id", onupdate="CASCADE", ondelete="CASCADE"), nullable=True)- type = mapped_column(String, server_default="INFO")+ type = Column(SQLEnum(EventLevel), default=EventLevel.INFO)class Profile(Base):@@ -83,7 +83,7 @@ class Scan(Base):id: Mapped[uuid.UUID] = mapped_column(PGUUID(as_uuid=True), primary_key=True, default=uuid.uuid4)sketch_id: Mapped[uuid.UUID] = mapped_column(PGUUID(as_uuid=True), ForeignKey("sketches.id", onupdate="CASCADE", ondelete="CASCADE"), nullable=True)- status = Column(SQLEnum(ScannerStatus), default=ScannerStatus.PENDING)+ status = Column(SQLEnum(EventLevel), default=EventLevel.PENDING)started_at = Column(DateTime, default=datetime.utcnow)completed_at = Column(DateTime, nullable=True)error = Column(Text, nullable=True)diff --git a/flowsint-api/app/scanners/base.py b/flowsint-api/app/scanners/base.pyindex edc1f8e6..2e9bfd12 100644--- a/flowsint-api/app/scanners/base.py+++ b/flowsint-api/app/scanners/base.py@@ -46,16 +46,16 @@ class Scanner(ABC):def execute(self, values: List[str]) -> List[Dict[str, Any]]:if self.name() != "transform_orchestrator":- Logger.info(self.sketch_id, f"Scanner {self.name()} started.")+ Logger.info(self.sketch_id, {"message": f"Scanner {self.name()} started."})try:preprocessed = self.preprocess(values)results = self.scan(preprocessed)processed = self.postprocess(results, preprocessed)if self.name() != "transform_orchestrator":- Logger.success(self.sketch_id, f"Scanner {self.name()} finished.")+ Logger.success(self.sketch_id, {"message": f"Scanner {self.name()} finished."})return processedexcept Exception as e:if self.name() != "transform_orchestrator":- Logger.error(self.sketch_id, f"Scanner {self.name()} errored: '{str(e)}'.")+ Logger.error(self.sketch_id, {"message": f"Scanner {self.name()} errored: '{str(e)}'."})return []diff --git a/flowsint-api/app/scanners/crypto/wallet_to_nfts.py b/flowsint-api/app/scanners/crypto/wallet_to_nfts.pyindex 37ba6cb0..0b8a09b2 100644--- a/flowsint-api/app/scanners/crypto/wallet_to_nfts.py+++ b/flowsint-api/app/scanners/crypto/wallet_to_nfts.py@@ -6,7 +6,7 @@ import requestsfrom app.scanners.base import Scannerfrom app.types.wallet import Wallet, NFTfrom app.utils import resolve_type-+from app.core.logger import LoggerInputType: TypeAlias = List[Wallet]OutputType: TypeAlias = List[NFT]@@ -162,5 +162,7 @@ class WalletAddressToNFTs(Scanner):"token_id": nft.token_id,"sketch_id": self.sketch_id})+ Logger.graph_append(self.sketch_id, {"message": f"Found NFT for {nft.wallet.address}: {nft.contract_address} - {nft.token_id}"})+return results\ No newline at end of filediff --git a/flowsint-api/app/scanners/crypto/wallet_to_transactions.py b/flowsint-api/app/scanners/crypto/wallet_to_transactions.pyindex 16858ad3..12f23567 100644--- a/flowsint-api/app/scanners/crypto/wallet_to_transactions.py+++ b/flowsint-api/app/scanners/crypto/wallet_to_transactions.py@@ -1,12 +1,12 @@import os-import socketfrom typing import List, Dict, Any, TypeAlias, Unionfrom pydantic import TypeAdapterimport requests+from datetime import datetimefrom app.scanners.base import Scannerfrom app.types.wallet import Wallet, WalletTransactionfrom app.utils import resolve_type-+from app.core.logger import LoggerInputType: TypeAlias = List[Wallet]OutputType: TypeAlias = List[WalletTransaction]@@ -78,7 +78,7 @@ class WalletAddressToTransactions(Scanner):transactions = self._get_transactions(d.address)results.append(transactions)except Exception as e:- print(f"Error resolving transactions for {d.address}: {e}")+ Logger.error(self.sketch_id, {"message": f"Error resolving transactions for {d.address}: {e}"})return resultsdef _get_transactions(self, address: str) -> List[WalletTransaction]:@@ -91,7 +91,7 @@ class WalletAddressToTransactions(Scanner):"startblock": 0,"endblock": 99999999,"page": 1,- "offset": 10000,+ "offset": 100,"sort": "asc","apikey": ETHERSCAN_API_KEY}@@ -184,5 +184,6 @@ class WalletAddressToTransactions(Scanner):"contract_address": tx.contract_address,"sketch_id": self.sketch_id})+ Logger.graph_append(self.sketch_id, {"message": f"Transaction on {datetime.fromtimestamp(int(tx.timestamp)).strftime('%Y-%m-%d %H:%M:%S') if tx.timestamp else 'Unknown time'}: {tx.source.address} -> {tx.target.address}"})return results\ No newline at end of filediff --git a/flowsint-api/app/scanners/domains/domain_to_asn.py b/flowsint-api/app/scanners/domains/domain_to_asn.pyindex fa193cbd..8b1258ea 100644--- a/flowsint-api/app/scanners/domains/domain_to_asn.py+++ b/flowsint-api/app/scanners/domains/domain_to_asn.py@@ -74,7 +74,7 @@ class DomainToAsnScanner(Scanner):for domain in data:asn_data = self.__get_asn_from_asnmap(domain.domain)if asn_data:- Logger.info(self.sketch_id, f"Domain {domain.domain} has ASN {asn_data['as_number']}.")+ Logger.info(self.sketch_id, {"message": f"Domain {domain.domain} has ASN {asn_data['as_number']}."})asns.append(ASN(number=int(asn_data["as_number"].lstrip("AS")),name=asn_data["as_name"],@@ -82,7 +82,7 @@ class DomainToAsnScanner(Scanner):cidrs=[CIDR(network=cidr) for cidr in asn_data["as_range"]]))else:- Logger.info(self.sketch_id, f"No ASN found for domain {domain.domain}")+ Logger.info(self.sketch_id, {"message": f"No ASN found for domain {domain.domain}"})return asnsdef __get_asn_from_asnmap(self, domain: str) -> Dict[str, Any]:@@ -97,7 +97,7 @@ class DomainToAsnScanner(Scanner):return Nonereturn json.loads(result.stdout)except Exception as e:- Logger.error(self.sketch_id, f"asnmap exception for {domain}: {str(e)}")+ Logger.error(self.sketch_id, {"message": f"asnmap exception for {domain}: {str(e)}"})return Nonedef postprocess(self, results: OutputType, original_input: InputType) -> OutputType:@@ -106,6 +106,7 @@ class DomainToAsnScanner(Scanner):# Skip if no valid ASN was foundif result_asn.number == 0:continue+ Logger.graph_append(self.sketch_id, {"message": f"Domain {input_ip.domain} -> ASN {result_asn.number}"})query = """MERGE (domain:domain {domain: $domain})diff --git a/flowsint-api/app/scanners/domains/resolve.py b/flowsint-api/app/scanners/domains/resolve.pyindex edfbb23b..16739b93 100644--- a/flowsint-api/app/scanners/domains/resolve.py+++ b/flowsint-api/app/scanners/domains/resolve.py@@ -5,6 +5,9 @@ from app.scanners.base import Scannerfrom app.types.domain import Domainfrom app.types.ip import Ipfrom app.utils import is_valid_domain, resolve_type+import uuid+from app.types.transform import Node, Edge+from app.core.logger import LoggerInputType: TypeAlias = List[Domain]OutputType: TypeAlias = List[Ip]@@ -78,6 +81,10 @@ class ResolveScanner(Scanner):for domain_obj, ip_obj in zip(original_input, results):query = """MERGE (d:domain {domain: $domain})+ SET d.domain = $domain+ SET d.label = $domain+ SET d.caption = $caption+ SET d.type = "domain"SET d.sketch_id = $sketch_idMERGE (ip:ip {address: $ip})SET ip.sketch_id = $sketch_id@@ -95,5 +102,36 @@ class ResolveScanner(Scanner):"caption": ip_obj.address,"type": "ip"})+ nodes = [Node(+ id=str(uuid.uuid4()),+ data={+ "label": ip_obj.address,+ "caption": ip_obj.address,+ "type": "ip"+ },+ position={+ "x": 0,+ "y": 0,+ },+ type="ip"+ )]+ edges =[Edge(+ id=str(uuid.uuid4()),+ source="",+ target="",+ data={+ "label": "RESOLVES_TO",+ "caption": "RESOLVES_TO"+ },+ )]+ nodes=[node.model_dump_json() for node in nodes]+ edges=[edge.model_dump_json() for edge in edges]+ payload:Dict = {+ "message": f"IP found for domain {domain_obj.domain} -> {ip_obj.address}"+ # "nodes": nodes,+ # "edges": edges+ }+ Logger.graph_append(self.sketch_id, payload)+return results\ No newline at end of filediff --git a/flowsint-api/app/scanners/domains/subdomains.py b/flowsint-api/app/scanners/domains/subdomains.pyindex 75a37e6e..5aba2c91 100644--- a/flowsint-api/app/scanners/domains/subdomains.py+++ b/flowsint-api/app/scanners/domains/subdomains.py@@ -137,7 +137,7 @@ class SubdomainScanner(Scanner):continuefor subdomain in domain_obj.subdomains:output.append(Domain(domain=subdomain))- Logger.info(self.sketch_id, f"{domain_obj.domain} -> {subdomain}")+ Logger.info(self.sketch_id, {"message": f"{domain_obj.domain} -> {subdomain}"})self.neo4j_conn.query("""MERGE (sub:domain {domain: $subdomain})SET sub.sketch_id = $sketch_id,@@ -154,6 +154,6 @@ class SubdomainScanner(Scanner):"caption": subdomain,"type": "subdomain"})- Logger.success(self.sketch_id, f"{domain_obj.domain} -> {len(domain_obj.subdomains)} subdomain(s) found.")+ Logger.graph_append(self.sketch_id, {"message":f"{domain_obj.domain} -> {len(domain_obj.subdomains)} subdomain(s) found."})return outputdiff --git a/flowsint-api/app/scanners/domains/whois.py b/flowsint-api/app/scanners/domains/whois.pyindex df80c2a1..e4c75b2b 100644--- a/flowsint-api/app/scanners/domains/whois.py+++ b/flowsint-api/app/scanners/domains/whois.py@@ -7,6 +7,7 @@ from app.types.domain import Domain, Domainfrom app.types.whois import Whoisfrom app.types.email import Emailfrom pydantic import TypeAdapter+from app.core.logger import LoggerInputType: TypeAlias = List[Domain]OutputType: TypeAlias = List[Domain]@@ -98,6 +99,7 @@ class WhoisScanner(Scanner):if not self.neo4j_conn:continuewhois_obj = domain.whois+ Logger.graph_append(self.sketch_id, {"message": f"WHOIS for {domain.domain} -> registrar: {whois_obj.registrar} org: {whois_obj.org} city: {whois_obj.city} country: {whois_obj.country} creation_date: {whois_obj.creation_date} expiration_date: {whois_obj.expiration_date} email: {whois_obj.email.email}"})props = {"domain": domain.domain,diff --git a/flowsint-api/app/scanners/emails/holehe.py b/flowsint-api/app/scanners/emails/holehe.pyindex c6a7e893..2e55b701 100644--- a/flowsint-api/app/scanners/emails/holehe.py+++ b/flowsint-api/app/scanners/emails/holehe.py@@ -5,7 +5,7 @@ from app.types.social import Socialfrom pydantic import TypeAdapterfrom app.utils import is_valid_email, resolve_typeimport asyncio-+from app.core.logger import LoggerInputType: TypeAlias = List[Email]OutputType: TypeAlias = List[Social]@@ -134,7 +134,7 @@ class HoleheScanner(Scanner):return resultsfor profile in results:- self.logger.info(message=f"{profile.username} -> account found on {profile.platform}")+ Logger.graph_append(self.sketch_id, {"message":f"{profile.username} -> account found on {profile.platform}"})self.neo4j_conn.query("""MERGE (p:social_profile {profile_url: $profile_url})SET p.platform = $platform,diff --git a/flowsint-api/app/scanners/ips/asn_to_cidrs.py b/flowsint-api/app/scanners/ips/asn_to_cidrs.pyindex 14f4ea02..b8160c9c 100644--- a/flowsint-api/app/scanners/ips/asn_to_cidrs.py+++ b/flowsint-api/app/scanners/ips/asn_to_cidrs.py@@ -64,7 +64,7 @@ class AsnToCidrsScanner(Scanner):if asn_obj and is_valid_asn(str(asn_obj.number)):cleaned.append(asn_obj)except ValueError:- Logger.warn(self.sketch_id, f"Invalid ASN format: {item}")+ Logger.warn(self.sketch_id, {"message": f"Invalid ASN format: {item}"})continuereturn cleaned@@ -84,9 +84,9 @@ class AsnToCidrsScanner(Scanner):cidrs.append(cidr)asn_cidrs.append(cidr)except Exception as e:- Logger.error(self.sketch_id, f"Failed to parse CIDR {cidr_str}: {str(e)}")+ Logger.error(self.sketch_id, {"message": f"Failed to parse CIDR {cidr_str}: {str(e)}"})else:- Logger.warn(self.sketch_id, f"No CIDRs found for ASN {asn.number}")+ Logger.warn(self.sketch_id, {"message": f"No CIDRs found for ASN {asn.number}"})if asn_cidrs: # Only add to mapping if we found valid CIDRsself._asn_to_cidrs_map.append((asn, asn_cidrs))@@ -101,7 +101,7 @@ class AsnToCidrsScanner(Scanner):capture_output=True, text=True, timeout=60)if not result.stdout.strip():- Logger.info(self.sketch_id, f"No CIDRs found for {asn}.")+ Logger.info(self.sketch_id, {"message": f"No CIDRs found for {asn}."})return Nonetry:# Parse the JSON array@@ -129,11 +129,11 @@ class AsnToCidrsScanner(Scanner):return combined_data if combined_data["as_range"] else Noneexcept json.JSONDecodeError:- Logger.error(self.sketch_id, f"Failed to parse JSON from asnmap output: {result.stdout}")+ Logger.error(self.sketch_id, {"message": f"Failed to parse JSON from asnmap output: {result.stdout}"})return Noneexcept Exception as e:- Logger.error(self.sketch_id, f"asnmap exception for {asn}: {str(e)}")+ Logger.error(self.sketch_id, {"message": f"asnmap exception for {asn}: {str(e)}"})return Nonedef postprocess(self, results: OutputType, original_input: InputType) -> OutputType:@@ -177,6 +177,7 @@ class AsnToCidrsScanner(Scanner):for asn, cidr in zip(original_input, results):if str(cidr.network) == "0.0.0.0/0":continue # Skip default CIDR for unknown ASN+ Logger.graph_append(self.sketch_id, {"message": f"ASN {asn.number} -> {cidr.network}"})if self.neo4j_conn:query = """MERGE (asn:ASN {number: $asn_number})diff --git a/flowsint-api/app/scanners/ips/cidr_to_ips.py b/flowsint-api/app/scanners/ips/cidr_to_ips.pyindex b6e2d80f..50077cb5 100644--- a/flowsint-api/app/scanners/ips/cidr_to_ips.py+++ b/flowsint-api/app/scanners/ips/cidr_to_ips.py@@ -61,7 +61,7 @@ class CidrToIpsScanner(Scanner):if cidr_obj:cleaned.append(cidr_obj)except ValueError:- Logger.warn(self.sketch_id, f"Invalid CIDR format: {item}")+ Logger.warn(self.sketch_id, {"message": f"Invalid CIDR format: {item}"})continuereturn cleaned@@ -76,9 +76,9 @@ class CidrToIpsScanner(Scanner):ip = Ip(address=ip_str.strip())ips.append(ip)except Exception as e:- Logger.error(self.sketch_id, f"Failed to parse IP {ip_str}: {str(e)}")+ Logger.error(self.sketch_id, {"message": f"Failed to parse IP {ip_str}: {str(e)}"})else:- Logger.warn(self.sketch_id, f"No IPs found for CIDR {cidr.network}")+ Logger.warn(self.sketch_id, {"message": f"No IPs found for CIDR {cidr.network}"})return ipsdef __get_ips_from_cidr(self, cidr: str) -> List[str]:@@ -92,7 +92,7 @@ class CidrToIpsScanner(Scanner):timeout=60)if not result.stdout.strip():- Logger.info(self.sketch_id, f"No IPs found for {cidr}.")+ Logger.info(self.sketch_id, {"message": f"No IPs found for {cidr}."})return []# Split the output by newlines and filter out empty lines@@ -100,12 +100,13 @@ class CidrToIpsScanner(Scanner):return ip_addressesexcept Exception as e:- Logger.error(self.sketch_id, f"dnsx exception for {cidr}: {str(e)}")+ Logger.error(self.sketch_id, {"message": f"dnsx exception for {cidr}: {str(e)}"})return []def postprocess(self, results: OutputType, original_input: InputType) -> OutputType:# Create Neo4j relationships between CIDRs and their corresponding IPsfor cidr, ip in zip(original_input, results):+ Logger.graph_append(self.sketch_id, {"message": f"Found {len(results)} IPs for CIDR {cidr.network}"})if self.neo4j_conn:query = """MERGE (cidr:cidr {network: $cidr_network})diff --git a/flowsint-api/app/scanners/ips/geolocation.py b/flowsint-api/app/scanners/ips/geolocation.pyindex 8cc0e1d9..009fdbc6 100644--- a/flowsint-api/app/scanners/ips/geolocation.py+++ b/flowsint-api/app/scanners/ips/geolocation.py@@ -5,7 +5,7 @@ from pydantic import TypeAdapterfrom app.scanners.base import Scannerfrom app.types.ip import Ip, Ipfrom app.utils import resolve_type, is_valid_ip-+from app.core.logger import LoggerInputType: TypeAlias = List[Ip]OutputType: TypeAlias = List[Ip]@@ -82,6 +82,7 @@ class GeolocationScanner(Scanner):"""Update IP nodes in Neo4j with geolocation information."""if self.neo4j_conn:for ip in results:+ Logger.graph_append(self.sketch_id, {"message": f"Geolocated {ip.address} to {ip.city}, {ip.country} (lat: {ip.latitude}, lon: {ip.longitude})"})query = """MATCH (ip:ip {address: $ip_address})SET ip.latitude = $latitude,diff --git a/flowsint-api/app/scanners/ips/ip_to_asn.py b/flowsint-api/app/scanners/ips/ip_to_asn.pyindex f1b483e2..00dfb9d9 100644--- a/flowsint-api/app/scanners/ips/ip_to_asn.py+++ b/flowsint-api/app/scanners/ips/ip_to_asn.py@@ -75,7 +75,7 @@ class IpToAsnScanner(Scanner):for ip in data:asn_data = self.__get_asn_from_asnmap(ip.address)if asn_data:- Logger.info(self.sketch_id, f"IP {ip.address} has ASN {asn_data['as_number']}.")+ Logger.info(self.sketch_id, {"message": f"IP {ip.address} has ASN {asn_data['as_number']}."})asns.append(ASN(number=int(asn_data["as_number"].lstrip("AS")),name=asn_data["as_name"],@@ -83,7 +83,7 @@ class IpToAsnScanner(Scanner):cidrs=[CIDR(network=cidr) for cidr in asn_data["as_range"]]))else:- Logger.info(self.sketch_id, f"No ASN found for IP {ip.address}")+ Logger.info(self.sketch_id, {"message": f"No ASN found for IP {ip.address}"})return asnsdef __get_asn_from_asnmap(self, ip: str) -> Dict[str, Any]:@@ -96,7 +96,7 @@ class IpToAsnScanner(Scanner):capture_output=True, text=True, timeout=60)if not result.stdout.strip():- Logger.info(self.sketch_id, f"No ASN found for {ip}.")+ Logger.info(self.sketch_id, {"message": f"No ASN found for {ip}."})return Nonetry:# Parse the JSON array@@ -124,16 +124,17 @@ class IpToAsnScanner(Scanner):return combined_data if combined_data["as_number"] else Noneexcept json.JSONDecodeError:- Logger.error(self.sketch_id, f"Failed to parse JSON from asnmap output: {result.stdout}")+ Logger.error(self.sketch_id, {"message": f"Failed to parse JSON from asnmap output: {result.stdout}"})return Noneexcept Exception as e:- Logger.error(self.sketch_id, f"asnmap exception for {ip}: {str(e)}")+ Logger.error(self.sketch_id, {"message": f"asnmap exception for {ip}: {str(e)}"})return Nonedef postprocess(self, results: OutputType, original_input: InputType) -> OutputType:# Create Neo4j relationships between IP addresses and their corresponding ASNsfor input_ip, result_asn in zip(original_input, results):+ Logger.graph_append(self.sketch_id, {"message": f"IP {input_ip.address} -> ASN {result_asn.number}"})# Skip if no valid ASN was foundif result_asn.number == 0:continuediff --git a/flowsint-api/app/scanners/ips/reverse_resolve.py b/flowsint-api/app/scanners/ips/reverse_resolve.pyindex 7ff25c2c..301383f5 100644--- a/flowsint-api/app/scanners/ips/reverse_resolve.py+++ b/flowsint-api/app/scanners/ips/reverse_resolve.py@@ -80,7 +80,7 @@ class ReverseResolveScanner(Scanner):def postprocess(self, results: OutputType, original_input: InputType) -> OutputType:for ip_obj, domain_obj in zip(original_input, results):- Logger.success(self.sketch_id, message=f"Resolved {ip_obj.address} to {domain_obj.domain}")+ Logger.graph_append(self.sketch_id, {"message": f"Reverse resolved {ip_obj.address} -> {domain_obj.domain}"})query = """MERGE (ip:ip {address: $address})SET ip.sketch_id = $sketch_id,diff --git a/flowsint-api/app/scanners/orchestrator.py b/flowsint-api/app/scanners/orchestrator.pyindex 1d904653..81274cb8 100644--- a/flowsint-api/app/scanners/orchestrator.py+++ b/flowsint-api/app/scanners/orchestrator.py@@ -7,8 +7,8 @@ from app.scanners.base import Scannerfrom app.scanners.registry import ScannerRegistryfrom app.types.transform import FlowBranch, FlowStepfrom app.core.logger import Logger-from app.tasks.logging import emit_log_task-from app.api.routes.logs import ScannerStatus+from app.tasks.event import emit_event_task+from app.core.enums import EventLevelimport asyncioimport json@@ -146,17 +146,7 @@ class TransformOrchestrator(Scanner):"branches": [],"results": {}}-- # Update status to running- status_data = {- "status": ScannerStatus.RUNNING,- "timestamp": datetime.utcnow().isoformat(),- "details": {- "message": "Starting scan",- "total_steps": sum(len(branch.steps) for branch in self.transform_branches)- }- }- emit_log_task.delay(str(uuid.uuid4()), self.sketch_id, "INFO", json.dumps(status_data))+ Logger.pending(self.sketch_id, {"message": "Starting transform..."})# Global mapping of output references to actual valuesresults_mapping = {}@@ -186,7 +176,7 @@ class TransformOrchestrator(Scanner):scanner = self.scanners.get(node_id)if not scanner:- Logger.error(self.sketch_id, f"Scanner not found for node {node_id}")+ Logger.error(self.sketch_id, {"message": f"Scanner not found for node {node_id}"})continuescanner_name = scanner.name()@@ -199,18 +189,6 @@ class TransformOrchestrator(Scanner):try:# Update status for current stepcompleted_steps += 1- status_data = {- "status": ScannerStatus.RUNNING,- "timestamp": datetime.utcnow().isoformat(),- "details": {- "message": f"Running {scanner_name}",- "current_step": completed_steps,- "total_steps": total_steps,- "progress": (completed_steps / total_steps) * 100- }- }- emit_log_task.delay(str(uuid.uuid4()), self.sketch_id, "INFO", json.dumps(status_data))-if not scanner_inputs:step_result["error"] = "No inputs available"branch_results["steps"].append(step_result)@@ -220,7 +198,6 @@ class TransformOrchestrator(Scanner):cache_key = f"{node_id}:{str(scanner_inputs)}"if cache_key in scanner_results_cache:outputs = scanner_results_cache[cache_key]- Logger.info(self.sketch_id, f"Using cached results for {scanner_name}")else:# Execute the scanneroutputs = scanner.execute(scanner_inputs)@@ -235,62 +212,28 @@ class TransformOrchestrator(Scanner):# Update the global results mapping with the outputsself.update_results_mapping(outputs, step.outputs, results_mapping)-# Also store the raw outputs in the main resultsresults["results"][node_id] = outputsscanner_inputs = outputsexcept ValidationError as e:error_msg = f"Validation error: {str(e)}"- Logger.error(self.sketch_id, f"Validation error in {scanner_name}: {str(e)}")- step_result["error"] = error_msg+ Logger.error(self.sketch_id, {"message": error_msg})results["results"][node_id] = {"error": error_msg}-- # Update status to failed- status_data = {- "status": ScannerStatus.FAILED,- "timestamp": datetime.utcnow().isoformat(),- "details": {- "error": error_msg,- "failed_step": scanner_name- }- }- emit_log_task.delay(str(uuid.uuid4()), self.sketch_id, "ERROR", json.dumps(status_data))return resultsexcept Exception as e:error_msg = f"Error during scan: {str(e)}"- Logger.error(self.sketch_id, f"Error during scan {scanner_name}: {str(e)}")+ Logger.error(self.sketch_id, {"message":error_msg})step_result["error"] = error_msgresults["results"][node_id] = {"error": error_msg}-- # Update status to failed- status_data = {- "status": ScannerStatus.FAILED,- "timestamp": datetime.utcnow().isoformat(),- "details": {- "error": error_msg,- "failed_step": scanner_name- }- }- emit_log_task.delay(str(uuid.uuid4()), self.sketch_id, "ERROR", json.dumps(status_data))return resultsbranch_results["steps"].append(step_result)results["branches"].append(branch_results)- # Update status to completed- status_data = {- "status": ScannerStatus.COMPLETED,- "timestamp": datetime.utcnow().isoformat(),- "details": {- "message": "Scan completed successfully",- "total_steps": total_steps,- "completed_steps": completed_steps- }- }- emit_log_task.delay(str(uuid.uuid4()), self.sketch_id, "INFO", json.dumps(status_data))+ Logger.completed(self.sketch_id, {"message": "Transform completed successfully."})# Include the final reference mapping for debuggingresults["reference_mapping"] = results_mappingdiff --git a/flowsint-api/app/scanners/organizations/org_to_asn.py b/flowsint-api/app/scanners/organizations/org_to_asn.pyindex efe5cd3b..d24ed56f 100644--- a/flowsint-api/app/scanners/organizations/org_to_asn.py+++ b/flowsint-api/app/scanners/organizations/org_to_asn.py@@ -74,7 +74,6 @@ class OrgToAsnScanner(Scanner):for org in data:asn_data = self.__get_asn_from_asnmap(org.name)if asn_data:- Logger.info(self.sketch_id, f"ASN {asn_data['as_number']} found for org {org.name}.")asns.append(ASN(number=int(asn_data["as_number"].lstrip("AS")),name=asn_data["as_name"],@@ -82,7 +81,7 @@ class OrgToAsnScanner(Scanner):cidrs=[]))else:- Logger.info(self.sketch_id, f"No ASN found for org {org.name}")+ Logger.info(self.sketch_id, {"message": f"No ASN found for org {org.name}."})return asnsdef __get_asn_from_asnmap(self, name: str) -> Dict[str, Any]:@@ -95,7 +94,6 @@ class OrgToAsnScanner(Scanner):capture_output=True, text=True, timeout=60)if not result.stdout.strip():- Logger.info(self.sketch_id, f"No ASN found for {name}.")return Nonetry:# Parse the JSON array@@ -123,17 +121,13 @@ class OrgToAsnScanner(Scanner):return combined_data if combined_data["as_number"] else Noneexcept json.JSONDecodeError:- Logger.error(self.sketch_id, f"Failed to parse JSON from asnmap output: {result.stdout}")return Noneexcept Exception as e:- Logger.error(self.sketch_id, f"asnmap exception for {name}: {str(e)}")return Nonedef postprocess(self, results: OutputType, original_input: InputType) -> OutputType:# Create Neo4j relationships between organizations and their corresponding ASNs- Logger.info(self.sketch_id, f"Postprocessing {len(results)} ASNs for {len(original_input)} organizations")- Logger.info(self.sketch_id, f"RESULTS for ORGTOASN {str(results)}")for input_org, result_asn in zip(original_input, results):# Skip if no valid ASN was foundif result_asn.number == 0:@@ -167,5 +161,6 @@ class OrgToAsnScanner(Scanner):"asn_caption": f"AS{result_asn.number} - {result_asn.name}","sketch_id": self.sketch_id,})+ Logger.graph_append(self.sketch_id, {"message": f"Found for {input_org.name} -> ASN {result_asn.number}"})return results\ No newline at end of filediff --git a/flowsint-api/app/scanners/organizations/sirene.py b/flowsint-api/app/scanners/organizations/sirene.pyindex c3a5dc01..445c2251 100644--- a/flowsint-api/app/scanners/organizations/sirene.py+++ b/flowsint-api/app/scanners/organizations/sirene.py@@ -4,6 +4,9 @@ from pydantic import TypeAdapterfrom app.scanners.base import Scannerfrom app.types.organization import Organization, Organization, Identifierfrom app.utils import resolve_type+from app.core.logger import Logger++InputType: TypeAlias = List[Organization]OutputType: TypeAlias = List[Organization]@@ -136,8 +139,8 @@ class SireneScanner(Scanner):MERGE (o)-[:HAS_IDENTIFIER {sketch_id: $sketch_id}]->(i)""", {"type": identifier.type.lower(),- "label": f"{identifier.type}: {identifier.value}",- "caption": f"{identifier.type}: {identifier.value}",+ "label": f"{identifier.value}",+ "caption": f"{identifier.value}","value": identifier.value,"country": identifier.country,"issued_by": identifier.issued_by,@@ -145,6 +148,8 @@ class SireneScanner(Scanner):"org_name": org.name,"org_country": org.country,})+ Logger.graph_append(self.sketch_id, {"message": f"{org.name}: {identifier.type} {identifier.value} -> {org.name}"})+return resultsdiff --git a/flowsint-api/app/scanners/socials/maigret.py b/flowsint-api/app/scanners/socials/maigret.pyindex 7d3f5ebf..a5407c72 100644--- a/flowsint-api/app/scanners/socials/maigret.py+++ b/flowsint-api/app/scanners/socials/maigret.py@@ -7,6 +7,7 @@ from app.utils import is_valid_username, resolve_typefrom app.scanners.base import Scannerfrom app.types.social import Social, Socialfrom pydantic import TypeAdapter+from app.core.logger import LoggerInputType: TypeAlias = List[Social]OutputType: TypeAlias = List[Social]@@ -79,7 +80,7 @@ class MaigretScanner(Scanner):timeout=100)except Exception as e:- print(f"[ERROR] Maigret execution failed for {username}: {e}")+ print(f"[FAILED] Maigret execution failed for {username}: {e}")return output_filedef parse_maigret_output(self, username: str, output_file: Path) -> List[Social]:@@ -91,7 +92,7 @@ class MaigretScanner(Scanner):with open(output_file, "r") as f:raw_data = json.load(f)except Exception as e:- print(f"[ERROR] Failed to load output file for {username}: {e}")+ print(f"[FAILED] Failed to load output file for {username}: {e}")return resultsfor platform, profile in raw_data.items():@@ -147,7 +148,7 @@ class MaigretScanner(Scanner):return resultsfor profile in results:- self.logger.info(message=f"{profile.username} -> account found on {profile.platform}")+ Logger.graph_append(self.sketch_id, {"message": f"{profile.username} -> account found on {profile.platform}"})self.neo4j_conn.query("""MERGE (p:social_profile {profile_url: $profile_url})SET p.username = $username,diff --git a/flowsint-api/app/tasks/event.py b/flowsint-api/app/tasks/event.pynew file mode 100644index 00000000..f6889a98--- /dev/null+++ b/flowsint-api/app/tasks/event.py@@ -0,0 +1,26 @@+# tasks/logging.py+from typing import Dict+from app.core.celery import celery+import redis+import json+import logging+import os+from app.core.enums import EventLevel+from app.core.types import Event++logger = logging.getLogger(__name__)+[email protected](name="emit_event")+def emit_event_task(log_id: str, sketch_id: str, log_type: EventLevel, content: Dict):+ """Celery task to emit a log event"""+ try:+ event = Event(+ id=log_id,+ sketch_id=sketch_id,+ type=log_type,+ payload=content+ ).model_dump_json()+ redis_client = redis.from_url(os.getenv("REDIS_URI", "redis://127.0.0.1:6379/0"))+ redis_client.publish(sketch_id, event)+ except Exception as e:+ raisediff --git a/flowsint-api/app/tasks/logging.py b/flowsint-api/app/tasks/logging.pydeleted file mode 100644index 8c1d6bba..00000000--- a/flowsint-api/app/tasks/logging.py+++ /dev/null@@ -1,31 +0,0 @@-# tasks/logging.py-from app.core.celery import celery-import redis-import json-import logging-import os--logger = logging.getLogger(__name__)-[email protected](name="emit_log")-def emit_log_task(log_id: str, sketch_id: str, log_type: str, content: str):- """Celery task to emit a log event"""- try:- logger.debug(f"Emitting log event: {log_id} for sketch {sketch_id}")- log_data = {- "id": log_id,- "sketch_id": sketch_id,- "type": log_type,- "content": content- }- print('########################################################')- print(f"[EventEmitter] Publishing log event: {log_id} for sketch {sketch_id}")- print('########################################################')-- # Connect to Redis and publish directly- redis_client = redis.from_url(os.getenv("REDIS_URI", "redis://127.0.0.1:6379/0"))- redis_client.publish(sketch_id, json.dumps(log_data))- logger.debug(f"Successfully published log event: {log_id}")- except Exception as e:- logger.error(f"Error publishing log event: {str(e)}")- raisediff --git a/flowsint-api/app/tasks/transform.py b/flowsint-api/app/tasks/transform.pyindex 0b2d3306..97915a9e 100644--- a/flowsint-api/app/tasks/transform.py+++ b/flowsint-api/app/tasks/transform.py@@ -12,6 +12,7 @@ from app.types.transform import FlowBranchfrom app.models.models import Scanfrom sqlalchemy.orm import Sessionfrom app.core.logger import Logger+from app.core.enums import EventLevelload_dotenv()URI = os.getenv("NEO4J_URI_BOLT")@@ -35,7 +36,7 @@ def run_scan(self, transform_branches, values: List[str], sketch_id: str | None)scan = Scan(id=scan_id,- status="pending",+ status=EventLevel.PENDING,sketch_id=uuid.UUID(sketch_id) if sketch_id else None,)session.add(scan)@@ -52,7 +53,7 @@ def run_scan(self, transform_branches, values: List[str], sketch_id: str | None)# Use the synchronous scan method which internally handles the async operationsresults = scanner.scan(values=values)- scan.status = "completed"+ scan.status = EventLevel.COMPLETEDscan.results = scanner.results_to_json(results)session.commit()@@ -65,7 +66,7 @@ def run_scan(self, transform_branches, values: List[str], sketch_id: str | None)scan = session.query(Scan).filter(Scan.id == uuid.UUID(self.request.id)).first()if scan:- scan.status = "failed"+ scan.status = EventLevel.FAILEDscan.results = {"error": error_logs}session.commit()diff --git a/flowsint-api/app/types/social.py b/flowsint-api/app/types/social.pyindex 9e13480c..b493f64e 100644--- a/flowsint-api/app/types/social.py+++ b/flowsint-api/app/types/social.py@@ -3,7 +3,7 @@ from typing import Optionalclass Social(BaseModel):username: Optional[str] = Field(None, description="Username on the social platform")- profile_url: Optional[str] = Field(..., description="URL to the user's profile page")+ profile_url: Optional[str] = Field(None, description="URL to the user's profile page")platform: Optional[str] = Field(None, description="Name of the social media platform")profile_picture_url: Optional[str] = Field(None, description="URL to the user's profile picture")bio: Optional[str] = Field(None, description="User's biography or description")diff --git a/flowsint-api/app/types/transform.py b/flowsint-api/app/types/transform.pyindex 69b5617d..8d206170 100644--- a/flowsint-api/app/types/transform.py+++ b/flowsint-api/app/types/transform.py@@ -9,6 +9,7 @@ class Node(BaseModel):class Edge(BaseModel):id: str = Field(..., description="Unique identifier for the edge")+ data: Optional[Dict[str, Any]] = Field(None, description="Data payload associated with the edge")source: str = Field(..., description="ID of the source node")target: str = Field(..., description="ID of the target node")sourceHandle: Optional[str] = Field(None, description="Handle ID on the source node")diff --git a/flowsint-api/resume.cfg b/flowsint-api/resume.cfgindex 697ca637..bfb63921 100644--- a/flowsint-api/resume.cfg+++ b/flowsint-api/resume.cfg@@ -1,2 +1,2 @@-resume_from=2.18.100.189index=101+resume_from=8.39.215.189diff --git a/flowsint-api/tests/conftest.py b/flowsint-api/tests/conftest.pyindex 3066f52b..3202dfe2 100644--- a/flowsint-api/tests/conftest.py+++ b/flowsint-api/tests/conftest.py@@ -5,5 +5,5 @@ from tests.logger import TestLoggerdef mock_logger(monkeypatch):"""Automatically replace the production Logger with TestLogger for all tests."""monkeypatch.setattr("app.core.logger.Logger", TestLogger)- # Mock the emit_log_task to do nothing- monkeypatch.setattr("app.core.logger.emit_log_task.delay", lambda *args, **kwargs: None)\ No newline at end of file+ # Mock the emit_event_task to do nothing+ monkeypatch.setattr("app.core.logger.emit_event_task.delay", lambda *args, **kwargs: None)\ No newline at end of filediff --git a/flowsint-api/tests/logger.py b/flowsint-api/tests/logger.pyindex 178d065b..87242d03 100644--- a/flowsint-api/tests/logger.py+++ b/flowsint-api/tests/logger.py@@ -1,12 +1,12 @@from typing import Literal, Union, Anyfrom uuid import UUID-LogLevel = Literal["info", "warn", "error", "success", "debug"]+EventLevel = Literal["info", "warn", "error", "success", "debug"]LEVEL_MAP = {"info": "INFO","warn": "WARN",- "error": "ERROR",+ "error": "FAILED","success": "SUCCESS","debug": "DEBUG",}@@ -35,7 +35,7 @@ class TestLogger:@staticmethoddef error(sketch_id: Union[str, UUID], message: str):"""Log an error message"""- formatted_message = TestLogger._format_message("ERROR", message)+ formatted_message = TestLogger._format_message("FAILED", message)print(formatted_message)@staticmethoddiff --git a/flowsint-app/src/renderer/index.html b/flowsint-app/src/renderer/index.htmlindex 9ed61218..c41e6577 100644--- a/flowsint-app/src/renderer/index.html+++ b/flowsint-app/src/renderer/index.html@@ -9,6 +9,11 @@<meta charset="UTF-8" /><meta name="viewport" content="width=device-width, initial-scale=1.0" />+ <!-- Google Fonts - Oxanium -->+ <link rel="preconnect" href="https://fonts.googleapis.com">+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>+ <link href="https://fonts.googleapis.com/css2?family=Oxanium:wght@200;300;400;500;600;700;800&display=swap" rel="stylesheet">+<!-- Favicon --><link rel="icon" href="/icon.ico" /><link rel="apple-touch-icon" href="/icon.png" />diff --git a/flowsint-app/src/renderer/public/icons/asn.svg b/flowsint-app/src/renderer/public/icons/asn.svgnew file mode 100644index 00000000..956d0674--- /dev/null+++ b/flowsint-app/src/renderer/public/icons/asn.svg@@ -0,0 +1,23 @@+<?xml version="1.0" ?><svg id="Layer_1" style="enable-background:new 0 0 50 50;" version="1.1" viewBox="0 0 50 50" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><style type="text/css">+ .st0{fill:#F7D154;}+ .st1{fill:#F7D154;}+ .st2{fill:#FFFFFF;}+ .st3{fill:#F7D154;}+ .st4{fill:#F7D154;}+ .st5{fill:#F7D154;}+ .st6{fill:#F7D154;}+ .st7{fill:#F7D154;}+ .st8{enable-background:new ;}+ .st9{fill:#F7D154;}+ .st10{fill:url(#);}+ .st11{fill:#F7D154;}+ .st12{fill:#F7D154;}+ .st13{fill:#F7D154;}+ .st14{fill:#F7D154;}+ .st15{fill:#F7D154;}+ .st16{fill:#F7D154;}+ .st17{fill:#F7D154;}+ .st18{opacity:0.3;}+ .st19{opacity:0.3;fill:#F7D154;}+ .st20{opacity:0.2;}+</style><g><g><g><g><g><g class="st8"><g><path class="st6" d="M42.04718,35.13001l0.00002,6.98687c-0.00711,1.75883-1.65714,3.51505-4.95382,4.85718 c-6.63502,2.70121-17.42967,2.70127-24.10815,0.00008c-3.36115-1.35946-5.0396-3.14381-5.03239-4.9254l-0.00002-6.98687 c-0.00721,1.78158,1.67124,3.56593,5.03239,4.92539c6.67848,2.70119,17.47313,2.70113,24.10815-0.00008 C40.39005,38.64506,42.04007,36.88884,42.04718,35.13001z"/></g><ellipse class="st17" cx="24.99998" cy="35.0959" rx="6.91737" ry="17.04716" transform="matrix(0.00158 -1 1 0.00158 -10.13539 60.04037)"/><g><path class="st0" d="M41.6232,33.60848c0.40963,1.9175-1.17625,3.88958-4.77996,5.35665 c-6.49776,2.64524-17.06917,2.6458-23.60952,0c-3.64651-1.47479-5.26495-3.4601-4.8628-5.38697 c-1.21609,2.23506,0.31312,4.6697,4.6143,6.40913c6.67847,2.70148,17.47309,2.70093,24.10818,0 C41.34716,38.25558,42.84441,35.83527,41.6232,33.60848z"/></g></g></g><g><g class="st8"><g><path class="st3" d="M40.7129,25.83374l0.00002,6.44001c-0.00656,1.62117-1.52743,3.23993-4.56609,4.47701 c-6.1157,2.48979-16.06545,2.48984-22.22121,0.00007c-3.09808-1.25306-4.64515-2.89775-4.63851-4.53989L9.2871,25.77094 c-0.00665,1.64214,1.54043,3.28683,4.63851,4.53988c6.15575,2.48977,16.10551,2.48972,22.2212-0.00007 C39.18547,29.07367,40.70634,27.45491,40.7129,25.83374z"/></g><g><path class="st6" d="M42.04718,21.54089l0.00002,6.98687c-0.00711,1.75883-1.65714,3.51505-4.95382,4.85718 c-6.63502,2.70121-17.42967,2.70127-24.10815,0.00008c-3.36115-1.35946-5.0396-3.14381-5.03239-4.92539l-0.00002-6.98687 c-0.00721,1.78158,1.67124,3.56593,5.03239,4.92539c6.67848,2.70119,17.47313,2.70114,24.10815-0.00008 C40.39005,25.05594,42.04007,23.29972,42.04718,21.54089z"/></g><ellipse class="st17" cx="24.99998" cy="21.50677" rx="6.91737" ry="17.04716" transform="matrix(0.00158 -1 1 0.00158 3.45372 46.47273)"/><g><path class="st0" d="M41.6232,20.01936c0.40963,1.9175-1.17625,3.88958-4.77996,5.35665 c-6.49776,2.64525-17.06917,2.6458-23.60952,0c-3.64651-1.47479-5.26495-3.4601-4.8628-5.38697 c-1.21609,2.23506,0.31312,4.6697,4.6143,6.40913c6.67847,2.70148,17.47309,2.70093,24.10818,0 C41.34716,24.66645,42.84441,22.24615,41.6232,20.01936z"/></g></g></g><g><g class="st8"><g><path class="st3" d="M40.7129,12.24462l0.00002,6.44001c-0.00656,1.62117-1.52743,3.23993-4.56609,4.47701 c-6.1157,2.48979-16.06545,2.48984-22.22121,0.00007c-3.09808-1.25305-4.64515-2.89775-4.63851-4.53988L9.2871,12.18182 c-0.00665,1.64214,1.54043,3.28683,4.63851,4.53988c6.15575,2.48977,16.10551,2.48972,22.2212-0.00007 C39.18547,15.48455,40.70634,13.86579,40.7129,12.24462z"/></g><g><path class="st6" d="M42.04718,7.95177l0.00002,6.98687c-0.00711,1.75883-1.65714,3.51505-4.95382,4.85718 c-6.63502,2.70121-17.42967,2.70127-24.10815,0.00008c-3.36115-1.35946-5.0396-3.14381-5.03239-4.92539L7.95282,7.88363 c-0.00721,1.78158,1.67124,3.56594,5.03239,4.92539c6.67848,2.70119,17.47313,2.70113,24.10815-0.00008 C40.39005,11.46682,42.04007,9.7106,42.04718,7.95177z"/></g><ellipse class="st17" cx="24.99998" cy="7.91765" rx="6.91737" ry="17.04716" transform="matrix(0.00158 -1 1 0.00158 17.04282 32.90509)"/><g><path class="st0" d="M41.6232,6.43023c0.40963,1.9175-1.17625,3.88958-4.77996,5.35665 c-6.49776,2.64525-17.06917,2.6458-23.60952,0c-3.64651-1.47479-5.26495-3.4601-4.8628-5.38697 c-1.21609,2.23506,0.31312,4.6697,4.6143,6.40913c6.67847,2.70148,17.47309,2.70093,24.10818,0 C41.34716,11.07733,42.84441,8.65703,41.6232,6.43023z"/></g></g></g></g></g></g></g></svg>\ No newline at end of filediff --git a/flowsint-app/src/renderer/public/icons/cidr.svg b/flowsint-app/src/renderer/public/icons/cidr.svgnew file mode 100644index 00000000..93e48861--- /dev/null+++ b/flowsint-app/src/renderer/public/icons/cidr.svg@@ -0,0 +1,255 @@+<?xml version="1.0" ?><svg id="Layer_1" style="enable-background:new 0 0 50 50;" version="1.1" viewBox="0 0 50 50" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><style type="text/css">+ .st0{fill:none;}+ .st1{fill:#A2D4BF;}+ .st2{fill:#A2D4BF;}+ .st3{fill:#A2D4BF;}+ .st4{fill:#A2D4BF;}+ .st5{fill:#A2D4BF;}+ .st6{fill:#FFFFFF;}+ .st7{fill:#A2D4BF;}+ .st8{fill:#A2D4BF;}+ .st9{fill:#A2D4BF;}+ .st10{enable-background:new ;}+ .st11{fill:url(#SVGID_1_);}+ .st12{fill:url(#SVGID_2_);}+ .st13{fill:url(#);}+ .st14{fill:url(#SVGID_3_);}+ .st15{fill:url(#SVGID_4_);}+ .st16{fill:url(#SVGID_5_);}+ .st17{fill:url(#SVGID_6_);}+ .st18{fill:url(#SVGID_7_);}+ .st19{fill:#A2D4BF;}+ .st20{fill:#A2D4BF;}+ .st21{fill:#A2D4BF;}+ .st22{fill:url(#SVGID_8_);}+ .st23{fill:url(#SVGID_9_);}+ .st24{fill:url(#SVGID_10_);}+ .st25{fill:url(#SVGID_11_);}+ .st26{fill:url(#SVGID_12_);}+ .st27{fill:url(#SVGID_13_);}+ .st28{fill:url(#SVGID_14_);}+ .st29{fill:url(#SVGID_15_);}+ .st30{fill:url(#SVGID_16_);}+ .st31{fill:url(#SVGID_17_);}+ .st32{fill:url(#SVGID_18_);}+ .st33{fill:url(#SVGID_19_);}+ .st34{fill:url(#SVGID_20_);}+ .st35{fill:url(#SVGID_21_);}+ .st36{fill:url(#SVGID_22_);}+ .st37{fill:url(#SVGID_23_);}+ .st38{fill:url(#SVGID_24_);}+ .st39{fill:url(#SVGID_25_);}+ .st40{fill:url(#SVGID_26_);}+ .st41{fill:url(#SVGID_27_);}+ .st42{fill:url(#SVGID_28_);}+ .st43{fill:url(#SVGID_29_);}+ .st44{fill:url(#SVGID_30_);}+ .st45{fill:url(#SVGID_31_);}+ .st46{fill:url(#SVGID_32_);}+ .st47{fill:url(#SVGID_33_);}+ .st48{fill:url(#SVGID_34_);}+ .st49{fill:url(#SVGID_35_);}+ .st50{fill:url(#SVGID_36_);}+ .st51{fill:url(#SVGID_37_);}+ .st52{fill:url(#SVGID_38_);}+ .st53{fill:url(#SVGID_39_);}+ .st54{fill:url(#SVGID_40_);}+ .st55{fill:url(#SVGID_41_);}+ .st56{fill:url(#SVGID_42_);}+ .st57{fill:url(#SVGID_43_);}+ .st58{fill:url(#SVGID_44_);}+ .st59{fill:url(#SVGID_45_);}+ .st60{fill:url(#SVGID_46_);}+ .st61{fill:url(#SVGID_47_);}+ .st62{fill:url(#SVGID_48_);}+ .st63{fill:url(#SVGID_49_);}+ .st64{fill:url(#SVGID_50_);}+ .st65{fill:url(#SVGID_51_);}+ .st66{fill:url(#SVGID_52_);}+ .st67{fill:url(#SVGID_53_);}+ .st68{fill:url(#SVGID_54_);}+ .st69{fill:url(#SVGID_55_);}+ .st70{fill:url(#SVGID_56_);}+ .st71{fill:url(#SVGID_57_);}+ .st72{fill:url(#SVGID_58_);}+ .st73{fill:url(#SVGID_59_);}+ .st74{fill:url(#SVGID_60_);}+ .st75{fill:url(#SVGID_61_);}+ .st76{fill:url(#SVGID_62_);}+ .st77{fill:url(#SVGID_63_);}+ .st78{fill:url(#SVGID_64_);}+ .st79{fill:url(#SVGID_65_);}+ .st80{fill:url(#SVGID_66_);}+ .st81{fill:url(#SVGID_67_);}+ .st82{fill:url(#SVGID_68_);}+ .st83{fill:url(#SVGID_69_);}+ .st84{fill:url(#SVGID_70_);}+ .st85{fill:url(#SVGID_71_);}+ .st86{fill:url(#SVGID_72_);}+ .st87{fill:url(#SVGID_73_);}+ .st88{fill:url(#SVGID_74_);}+ .st89{fill:url(#SVGID_75_);}+ .st90{fill:url(#SVGID_76_);}+ .st91{fill:url(#SVGID_77_);}+ .st92{fill:url(#SVGID_78_);}+ .st93{fill:url(#SVGID_79_);}+ .st94{fill:url(#SVGID_80_);}+ .st95{fill:url(#SVGID_81_);}+ .st96{fill:url(#SVGID_82_);}+ .st97{fill:url(#SVGID_83_);}+ .st98{fill:url(#SVGID_84_);}+ .st99{fill:url(#SVGID_85_);}+ .st100{fill:url(#SVGID_86_);}+ .st101{fill:url(#SVGID_87_);}+ .st102{fill:url(#SVGID_88_);}+ .st103{fill:url(#SVGID_89_);}+ .st104{fill:url(#SVGID_90_);}+ .st105{fill:url(#SVGID_91_);}+ .st106{fill:url(#SVGID_92_);}+ .st107{fill:url(#SVGID_93_);}+ .st108{fill:url(#SVGID_94_);}+ .st109{fill:url(#SVGID_95_);}+ .st110{fill:url(#SVGID_96_);}+ .st111{fill:url(#SVGID_97_);}+ .st112{fill:url(#SVGID_98_);}+ .st113{fill:url(#SVGID_99_);}+ .st114{fill:#A2D4BF;}+ .st115{fill:url(#SVGID_100_);}+ .st116{fill:url(#SVGID_101_);}+ .st117{fill:url(#SVGID_102_);}+ .st118{fill:url(#SVGID_103_);}+ .st119{fill:url(#SVGID_104_);}+ .st120{fill:url(#SVGID_105_);}+ .st121{fill:url(#SVGID_106_);}+ .st122{fill:url(#SVGID_107_);}+ .st123{fill:url(#SVGID_108_);}+ .st124{fill:url(#SVGID_109_);}+ .st125{fill:url(#SVGID_110_);}+ .st126{fill:url(#SVGID_111_);}+ .st127{fill:url(#SVGID_112_);}+ .st128{fill:url(#SVGID_113_);}+ .st129{fill:url(#SVGID_114_);}+ .st130{fill:url(#SVGID_115_);}+ .st131{fill:#A2D4BF;}+ .st132{fill:#A2D4BF;}+ .st133{fill:#A2D4BF;}+ .st134{opacity:0.3;}+ .st135{fill:url(#SVGID_116_);}+ .st136{fill:url(#SVGID_117_);}+ .st137{fill:url(#SVGID_118_);}+ .st138{fill:url(#SVGID_119_);}+ .st139{fill:url(#SVGID_120_);}+ .st140{fill:url(#SVGID_121_);}+ .st141{fill:url(#SVGID_122_);}+ .st142{fill:url(#SVGID_123_);}+ .st143{fill:url(#SVGID_124_);}+ .st144{opacity:0.3;fill:#A2D4BF;}+ .st145{fill:url(#SVGID_125_);}+ .st146{fill:url(#SVGID_126_);}+ .st147{fill:url(#SVGID_127_);}+ .st148{fill:url(#SVGID_128_);}+ .st149{fill:url(#SVGID_129_);}+ .st150{fill:url(#SVGID_130_);}+ .st151{fill:url(#SVGID_131_);}+ .st152{fill:url(#SVGID_132_);}+ .st153{fill:url(#SVGID_133_);}+ .st154{fill:url(#SVGID_134_);}+ .st155{fill:url(#SVGID_135_);}+ .st156{fill:url(#SVGID_136_);}+ .st157{fill:url(#SVGID_137_);}+ .st158{fill:url(#SVGID_138_);}+ .st159{fill:url(#SVGID_139_);}+ .st160{fill:url(#SVGID_140_);}+ .st161{fill:url(#SVGID_141_);}+ .st162{fill:url(#SVGID_142_);}+ .st163{fill:url(#SVGID_143_);}+ .st164{fill:url(#SVGID_144_);}+ .st165{fill:url(#SVGID_145_);}+ .st166{fill:url(#SVGID_146_);}+ .st167{fill:url(#SVGID_147_);}+ .st168{fill:url(#SVGID_148_);}+ .st169{fill:url(#SVGID_149_);}+ .st170{fill:url(#SVGID_150_);}+ .st171{fill:url(#SVGID_151_);}+ .st172{fill:url(#SVGID_152_);}+ .st173{opacity:0.2;}+ .st174{fill:url(#SVGID_153_);}+ .st175{fill:url(#SVGID_154_);}+ .st176{fill:url(#SVGID_155_);}+ .st177{fill:url(#SVGID_156_);}+ .st178{fill:url(#SVGID_157_);}+ .st179{fill:url(#SVGID_158_);}+ .st180{fill:url(#SVGID_159_);}+ .st181{fill:url(#SVGID_160_);}+ .st182{fill:url(#SVGID_161_);}+ .st183{fill:url(#SVGID_162_);}+ .st184{fill:url(#SVGID_163_);}+ .st185{fill:url(#SVGID_164_);}+ .st186{fill:url(#SVGID_165_);}+ .st187{fill:url(#SVGID_166_);}+ .st188{fill:url(#SVGID_167_);}+ .st189{fill:url(#SVGID_168_);}+ .st190{fill:url(#SVGID_169_);}+ .st191{fill:url(#SVGID_170_);}+ .st192{fill:url(#SVGID_171_);}+ .st193{fill:url(#SVGID_172_);}+ .st194{fill:url(#SVGID_173_);}+ .st195{fill:url(#SVGID_174_);}+ .st196{fill:url(#SVGID_175_);}+ .st197{fill:url(#SVGID_176_);}+ .st198{fill:url(#SVGID_177_);}+ .st199{fill:url(#SVGID_178_);}+ .st200{fill:url(#SVGID_179_);}+ .st201{fill:url(#SVGID_180_);}+ .st202{fill:url(#SVGID_181_);}+ .st203{fill:url(#SVGID_182_);}+ .st204{fill:url(#SVGID_183_);}+ .st205{fill:url(#SVGID_184_);}+ .st206{fill:url(#SVGID_185_);}+ .st207{fill:url(#SVGID_186_);}+ .st208{fill:url(#SVGID_187_);}+ .st209{fill:url(#SVGID_188_);}+ .st210{fill:url(#SVGID_189_);}+ .st211{fill:url(#SVGID_190_);}+ .st212{fill:url(#SVGID_191_);}+ .st213{fill:url(#SVGID_192_);}+ .st214{fill:url(#SVGID_193_);}+ .st215{fill:url(#SVGID_194_);}+ .st216{fill:url(#SVGID_195_);}+ .st217{fill:url(#SVGID_196_);}+ .st218{fill:url(#SVGID_197_);}+ .st219{fill:url(#SVGID_198_);}+ .st220{fill:url(#SVGID_199_);}+ .st221{fill:url(#SVGID_200_);}+ .st222{fill:url(#SVGID_201_);}+ .st223{fill:url(#SVGID_202_);}+ .st224{fill:url(#SVGID_203_);}+ .st225{fill:url(#SVGID_204_);}+ .st226{fill:url(#SVGID_205_);}+ .st227{fill:url(#SVGID_206_);}+ .st228{fill:url(#SVGID_207_);}+ .st229{fill:url(#SVGID_208_);}+ .st230{fill:url(#SVGID_209_);}+ .st231{fill:url(#SVGID_210_);}+ .st232{fill:url(#SVGID_211_);}+ .st233{fill:url(#SVGID_212_);}+ .st234{fill:url(#SVGID_213_);}+ .st235{fill:url(#SVGID_214_);}+ .st236{fill:url(#SVGID_215_);}+ .st237{fill:url(#SVGID_216_);}+ .st238{fill:url(#SVGID_217_);}+ .st239{fill:url(#SVGID_218_);}+ .st240{fill:url(#SVGID_219_);}+ .st241{fill:url(#SVGID_220_);}+ .st242{fill:url(#SVGID_221_);}+ .st243{fill:url(#SVGID_222_);}+ .st244{fill:url(#SVGID_223_);}+ .st245{fill:url(#SVGID_224_);}+ .st246{fill:url(#SVGID_225_);}+ .st247{fill:url(#SVGID_226_);}+ .st248{fill:url(#SVGID_227_);}+ .st249{fill:url(#SVGID_228_);}+ .st250{fill:url(#SVGID_229_);}+ .st251{fill:url(#SVGID_230_);}+ .st252{fill:url(#SVGID_231_);}+</style><pattern height="32.25219" id="Unnamed_Pattern_11" patternUnits="userSpaceOnUse" style="overflow:visible;" viewBox="0 -32.25219 32.25219 32.25219" width="32.25219"><g><rect class="st0" height="32.25219" width="32.25219" y="-32.25219"/><g><rect class="st1" height="32.25219" width="32.25219" x="0" y="-32.25219"/></g></g></pattern><pattern height="32.25219" id="Unnamed_Pattern_12" patternUnits="userSpaceOnUse" style="overflow:visible;" viewBox="0 -32.25219 32.25219 32.25219" width="32.25219"><g><rect class="st0" height="32.25219" width="32.25219" y="-32.25219"/><g><rect class="st2" height="32.25219" width="32.25219" x="0" y="-32.25219"/></g></g></pattern><pattern height="32.25219" id="Unnamed_Pattern_17" patternUnits="userSpaceOnUse" style="overflow:visible;" viewBox="0 -32.25219 32.25219 32.25219" width="32.25219"><g><rect class="st0" height="32.25219" width="32.25219" y="-32.25219"/><g><rect class="st3" height="32.25219" width="32.25219" x="0" y="-32.25219"/></g></g></pattern><pattern height="32.25219" id="Unnamed_Pattern_8" patternUnits="userSpaceOnUse" style="overflow:visible;" viewBox="0 -32.25219 32.25219 32.25219" width="32.25219"><g><rect class="st0" height="32.25219" width="32.25219" y="-32.25219"/><g><rect class="st4" height="32.25219" width="32.25219" x="0" y="-32.25219"/></g></g></pattern><g><g><g><g><path class="st20" d="M41.13838,34.52532l-0.0111,5.13829c-0.00106,0.44381-0.2927,0.88655-0.87493,1.2247l-13.07856,7.60072 c-1.17239,0.68103-3.07918,0.68156-4.25896,0L9.75067,40.88884c-0.59386-0.34289-0.89025-0.79251-0.8892-1.24213l0.0111-5.13565 c0,0.44803,14.05282,8.83968,14.05282,8.83968c1.18032,0.68103,3.0871,0.68103,4.25949-0.00053 C27.18488,43.35021,41.13732,34.9686,41.13838,34.52532z"/><path class="st19" d="M21.76243,43.91474L10.8618,37.62093c-0.28178-0.16269-0.63402,0.04066-0.63402,0.36604v1.70024 c0,0.30202,0.16113,0.58109,0.42268,0.73209l10.90062,6.29336c0.28178,0.16269,0.63401-0.04067,0.63401-0.36605v-1.6998 C22.18509,44.34482,22.02398,44.06575,21.76243,43.91474z"/><g><g><g><pattern id="SVGID_1_" patternTransform="matrix(-0.01188 0 0 0.01188 -8135.60742 -7787.85449)" xlink:href="#Unnamed_Pattern_8"/><path class="st11" d="M27.83607,44.35159c-0.13846,0.07994-0.25039,0.2738-0.24994,0.43291l0.005,1.76465 c0.00045,0.15911,0.11311,0.2233,0.25157,0.14336c0.13847-0.07994,0.25039-0.2738,0.24994-0.43291l-0.005-1.76465 C28.08719,44.33585,27.97453,44.27165,27.83607,44.35159z"/></g><g><pattern id="SVGID_2_" patternTransform="matrix(-0.01188 0 0 0.01188 -8135.60742 -7788.7207)" xlink:href="#Unnamed_Pattern_11"/><path class="st12" d="M27.97476,46.19764l-0.005-1.76465c-0.00013-0.04741-0.01029-0.08631-0.02806-0.11556 c0.08586-0.00369,0.14562,0.06175,0.14595,0.17752l0.005,1.76465c0.00045,0.15911-0.11147,0.35297-0.24994,0.43291 c-0.09721,0.05612-0.18163,0.04112-0.22351-0.02781c0.03214-0.00138,0.06791-0.01238,0.10562-0.03416 C27.86329,46.55061,27.97521,46.35675,27.97476,46.19764z"/></g></g><g><g><pattern id="SVGID_3_" patternTransform="matrix(-0.01188 0 0 0.01188 -8135.57275 -7787.5957)" xlink:href="#Unnamed_Pattern_8"/><path class="st14" d="M38.60205,38.09484c-0.13846,0.07994-0.25039,0.2738-0.24994,0.43291l0.005,1.76465 c0.00045,0.15911,0.11311,0.2233,0.25157,0.14336c0.13847-0.07994,0.25039-0.2738,0.24994-0.43291l-0.005-1.76465 C38.85318,38.0791,38.74052,38.0149,38.60205,38.09484z"/></g><g><pattern id="SVGID_4_" patternTransform="matrix(-0.01188 0 0 0.01188 -8135.57275 -7788.75293)" xlink:href="#Unnamed_Pattern_11"/><path class="st15" d="M38.74075,39.9409l-0.005-1.76465c-0.00013-0.04741-0.0103-0.08631-0.02806-0.11556 c0.08586-0.00369,0.14562,0.06175,0.14595,0.17752l0.005,1.76465c0.00045,0.15911-0.11147,0.35297-0.24994,0.43291 c-0.09721,0.05612-0.18163,0.04112-0.22351-0.02781c0.03214-0.00138,0.06791-0.01238,0.10562-0.03416 C38.62928,40.29386,38.7412,40.1,38.74075,39.9409z"/></g></g><g><g><pattern id="SVGID_5_" patternTransform="matrix(-0.01188 0 0 0.01188 -8137.11084 -7786.70215)" xlink:href="#Unnamed_Pattern_8"/><path class="st16" d="M37.06406,38.98866c-0.13846,0.07994-0.25039,0.2738-0.24994,0.43291l0.005,1.76465 c0.00045,0.15911,0.11311,0.2233,0.25157,0.14336c0.13847-0.07994,0.25039-0.2738,0.24994-0.43291l-0.005-1.76465 C37.31518,38.97292,37.20252,38.90872,37.06406,38.98866z"/></g><g><pattern id="SVGID_6_" patternTransform="matrix(-0.01188 0 0 0.01188 -8137.11084 -7787.85938)" xlink:href="#Unnamed_Pattern_11"/><path class="st17" d="M37.20275,40.83472l-0.005-1.76465c-0.00013-0.04741-0.0103-0.08631-0.02806-0.11556 c0.08585-0.00369,0.14562,0.06175,0.14595,0.17752l0.005,1.76465c0.00045,0.15911-0.11147,0.35297-0.24994,0.43291 c-0.09721,0.05613-0.18163,0.04113-0.22351-0.0278c0.03214-0.00138,0.06791-0.01238,0.10562-0.03416 C37.09127,41.18768,37.2032,40.99382,37.20275,40.83472z"/></g></g><g><g><pattern id="SVGID_7_" patternTransform="matrix(-0.01188 0 0 0.01188 -8138.64893 -7785.80811)" xlink:href="#Unnamed_Pattern_8"/><path class="st18" d="M35.52606,39.88248c-0.13847,0.07994-0.25039,0.2738-0.24994,0.43291l0.005,1.76465 c0.00045,0.15911,0.11311,0.2233,0.25157,0.14336c0.13847-0.07994,0.25039-0.2738,0.24994-0.43291l-0.005-1.76465 C35.77718,39.86674,35.66452,39.80254,35.52606,39.88248z"/></g><g><pattern id="SVGID_8_" patternTransform="matrix(-0.01188 0 0 0.01188 -8138.64893 -7786.96533)" xlink:href="#Unnamed_Pattern_11"/><path class="st22" d="M35.66475,41.72854l-0.005-1.76465c-0.00013-0.04741-0.01029-0.08631-0.02806-0.11556 c0.08585-0.00369,0.14562,0.06175,0.14595,0.17752l0.005,1.76465c0.00045,0.1591-0.11147,0.35297-0.24994,0.43291 c-0.09721,0.05613-0.18163,0.04113-0.22351-0.0278c0.03214-0.00138,0.06791-0.01239,0.10562-0.03416 C35.55328,42.0815,35.6652,41.88765,35.66475,41.72854z"/></g></g><g><g><pattern id="SVGID_9_" patternTransform="matrix(-0.01188 0 0 0.01188 -8140.18701 -7784.91455)" xlink:href="#Unnamed_Pattern_8"/><path class="st23" d="M33.98806,40.77631c-0.13847,0.07994-0.25039,0.2738-0.24994,0.43291l0.005,1.76465 c0.00045,0.15911,0.11311,0.22331,0.25157,0.14336c0.13847-0.07994,0.25039-0.2738,0.24994-0.43291l-0.005-1.76465 C34.23918,40.76056,34.12653,40.69636,33.98806,40.77631z"/></g><g><pattern id="SVGID_10_" patternTransform="matrix(-0.01188 0 0 0.01188 -8140.18701 -7786.07178)" xlink:href="#Unnamed_Pattern_11"/><path class="st24" d="M34.12675,42.62236l-0.005-1.76465c-0.00013-0.04741-0.01029-0.08631-0.02806-0.11556 c0.08585-0.00369,0.14562,0.06175,0.14595,0.17752l0.005,1.76465c0.00045,0.15911-0.11147,0.35297-0.24994,0.43291 c-0.09721,0.05613-0.18163,0.04113-0.22351-0.0278c0.03214-0.00138,0.06791-0.01239,0.10562-0.03416 C34.01528,42.97533,34.1272,42.78147,34.12675,42.62236z"/></g></g><g><g><pattern id="SVGID_11_" patternTransform="matrix(-0.01188 0 0 0.01188 -8141.7251 -7784.02051)" xlink:href="#Unnamed_Pattern_8"/><path class="st25" d="M32.45006,41.67013c-0.13847,0.07994-0.25039,0.2738-0.24994,0.43291l0.005,1.76465 c0.00045,0.15911,0.11311,0.2233,0.25157,0.14336c0.13847-0.07994,0.25039-0.2738,0.24994-0.43291l-0.005-1.76465 C32.70118,41.65438,32.58853,41.59018,32.45006,41.67013z"/></g><g><pattern id="SVGID_12_" patternTransform="matrix(-0.01188 0 0 0.01188 -8141.7251 -7785.17773)" xlink:href="#Unnamed_Pattern_11"/><path class="st26" d="M32.58875,43.51618l-0.005-1.76465c-0.00013-0.04741-0.01029-0.08631-0.02806-0.11556 c0.08585-0.00369,0.14562,0.06175,0.14595,0.17752l0.005,1.76465c0.00045,0.15911-0.11147,0.35297-0.24994,0.43291 c-0.09721,0.05612-0.18163,0.04112-0.22351-0.0278c0.03214-0.00138,0.06791-0.01239,0.10563-0.03416 C32.47728,43.86914,32.5892,43.67529,32.58875,43.51618z"/></g></g><g><g><pattern id="SVGID_13_" patternTransform="matrix(-0.01188 0 0 0.01188 -8143.2627 -7783.12695)" xlink:href="#Unnamed_Pattern_8"/><path class="st27" d="M30.91206,42.56395c-0.13847,0.07994-0.25039,0.2738-0.24994,0.43291l0.005,1.76465 c0.00045,0.15911,0.11311,0.2233,0.25157,0.14336c0.13847-0.07994,0.25039-0.2738,0.24994-0.43291l-0.005-1.76465 C31.16318,42.54821,31.05053,42.484,30.91206,42.56395z"/></g><g><pattern id="SVGID_14_" patternTransform="matrix(-0.01188 0 0 0.01188 -8143.2627 -7784.28418)" xlink:href="#Unnamed_Pattern_11"/><path class="st28" d="M31.05075,44.41l-0.005-1.76465c-0.00013-0.04741-0.01029-0.08631-0.02806-0.11556 c0.08586-0.00369,0.14562,0.06175,0.14595,0.17752l0.005,1.76465c0.00045,0.15911-0.11147,0.35297-0.24994,0.43291 c-0.09721,0.05612-0.18163,0.04112-0.22351-0.0278c0.03214-0.00138,0.06791-0.01239,0.10562-0.03416 C30.93928,44.76297,31.0512,44.56911,31.05075,44.41z"/></g></g><g><g><pattern id="SVGID_15_" patternTransform="matrix(-0.01188 0 0 0.01188 -8144.80078 -7782.23291)" xlink:href="#Unnamed_Pattern_8"/><path class="st29" d="M29.37406,43.45777c-0.13846,0.07994-0.25039,0.2738-0.24994,0.43291l0.005,1.76465 c0.00045,0.15911,0.11311,0.2233,0.25157,0.14336c0.13847-0.07994,0.25039-0.2738,0.24994-0.43291l-0.005-1.76465 C29.62519,43.44202,29.51253,43.37783,29.37406,43.45777z"/></g><g><pattern id="SVGID_16_" patternTransform="matrix(-0.01188 0 0 0.01188 -8144.80078 -7783.39014)" xlink:href="#Unnamed_Pattern_11"/><path class="st30" d="M29.51276,45.30382l-0.005-1.76465c-0.00013-0.04741-0.01029-0.08631-0.02806-0.11556 c0.08586-0.00369,0.14562,0.06175,0.14595,0.17752l0.005,1.76465c0.00045,0.15911-0.11147,0.35297-0.24994,0.43291 c-0.09721,0.05612-0.18163,0.04112-0.22351-0.02781c0.03214-0.00138,0.06791-0.01238,0.10562-0.03416 C29.40128,45.65679,29.51321,45.46293,29.51276,45.30382z"/></g></g></g><path class="st19" d="M40.24947,33.28313c1.17997,0.68126,1.18618,1.78553,0.01388,2.4668l-13.07866,7.60049 c-1.1723,0.68127-3.07907,0.68147-4.25904,0.00022L9.76142,35.75027c-1.17997-0.68126-1.18585-1.78573-0.01355-2.467 l13.07866-7.60049c1.1723-0.68127,3.07874-0.68128,4.25871-0.00002L40.24947,33.28313z"/><g><path class="st20" d="M35.13433,33.97103c0.52195,0.30135,0.52435,0.78969,0.00579,1.09105l-9.15985,5.32312 c-0.51856,0.30135-1.36164,0.30156-1.88359,0.00021l-9.21977-5.32304c-0.52195-0.30135-0.5247-0.7899-0.00614-1.09125 l9.15985-5.32312c0.51856-0.30135,1.36199-0.30136,1.88395-0.00001L35.13433,33.97103z"/></g><g><g><pattern id="SVGID_17_" patternTransform="matrix(0.05283 0 0 0.05283 -7612.17334 -7469.59229)" xlink:href="#Unnamed_Pattern_12"/><path class="st31" d="M11.57185,39.0591c0.25806,0.14899,0.46618,0.50948,0.46534,0.806 c-0.00084,0.29653-0.21033,0.41629-0.46838,0.26731c-0.25806-0.14899-0.46652-0.51006-0.46568-0.80659 C11.10397,39.02929,11.3138,38.91011,11.57185,39.0591z"/></g><g><pattern id="SVGID_18_" patternTransform="matrix(0.05283 0 0 0.05283 -7612.17334 -7469.59229)" xlink:href="#Unnamed_Pattern_12"/><path class="st32" d="M13.07633,39.92771c0.25772,0.1488,0.46618,0.50948,0.46534,0.806 c-0.00084,0.29653-0.21066,0.4161-0.46839,0.2673c-0.25805-0.14899-0.46652-0.51006-0.46568-0.80658 C12.60846,39.8979,12.81828,39.77872,13.07633,39.92771z"/></g><g><pattern id="SVGID_19_" patternTransform="matrix(0.05283 0 0 0.05283 -7612.17334 -7469.59229)" xlink:href="#Unnamed_Pattern_12"/><path class="st33" d="M14.58082,40.79632c0.25772,0.1488,0.46618,0.50948,0.46534,0.806 c-0.00084,0.29653-0.21067,0.4161-0.46839,0.2673c-0.25806-0.14899-0.46652-0.51006-0.46568-0.80658 C14.11294,40.76652,14.32276,40.64733,14.58082,40.79632z"/></g></g></g></g><polygon class="st9" points="20.82406,44.29959 17.33488,42.28501 17.33488,43.60646 20.82406,45.62094 "/></g><g><g><pattern id="SVGID_20_" patternTransform="matrix(0.05026 0 0 0.05026 -7629.47119 -7494.01416)" xlink:href="#Unnamed_Pattern_17"/><path class="st34" d="M40.35224,28.48818l-0.01056,4.88799c-0.001,0.42218-0.27844,0.84337-0.83231,1.16504l-12.44147,7.23047 c-1.11528,0.64786-2.92918,0.64836-4.0515,0l-12.5229-7.22997c-0.56493-0.32619-0.84689-0.75391-0.84589-1.18163l0.01056-4.88548 c0,0.42621,0.28196,0.85342,0.84538,1.17861l12.5229,7.23047c1.12282,0.64786,2.93672,0.64786,4.052-0.0005l12.44148-7.22997 C40.0738,29.33105,40.35123,28.90987,40.35224,28.48818z"/><g><path class="st20" d="M41.13838,26.46805l-0.0111,5.13829c-0.00106,0.4438-0.2927,0.88655-0.87493,1.2247l-13.07856,7.60072 c-1.17239,0.68103-3.07918,0.68156-4.25896,0L9.75067,32.83156c-0.59386-0.34289-0.89025-0.79251-0.8892-1.24213l0.0111-5.13565 c0,0.44803,14.05282,8.83968,14.05282,8.83968c1.18032,0.68103,3.0871,0.68103,4.25949-0.00053 C27.18488,35.29294,41.13732,26.91133,41.13838,26.46805z"/><path class="st19" d="M21.76243,35.85747L10.8618,29.56366c-0.28178-0.16269-0.63402,0.04066-0.63402,0.36604v1.70024 c0,0.30202,0.16113,0.58109,0.42268,0.73209l10.90062,6.29336c0.28178,0.16269,0.63401-0.04067,0.63401-0.36605v-1.6998 C22.18509,36.28754,22.02398,36.00848,21.76243,35.85747z"/><g><g><g><pattern id="SVGID_21_" patternTransform="matrix(-0.01188 0 0 0.01188 -8135.60742 -7795.91211)" xlink:href="#Unnamed_Pattern_8"/><path class="st35" d="M27.83607,36.29432c-0.13846,0.07994-0.25039,0.2738-0.24994,0.43291l0.005,1.76465 c0.00045,0.15911,0.11311,0.2233,0.25157,0.14336c0.13847-0.07994,0.25039-0.2738,0.24994-0.43291l-0.005-1.76465 C28.08719,36.27857,27.97453,36.21437,27.83607,36.29432z"/></g><g><pattern id="SVGID_22_" patternTransform="matrix(-0.01188 0 0 0.01188 -8135.60742 -7796.77783)" xlink:href="#Unnamed_Pattern_11"/><path class="st36" d="M27.97476,38.14037l-0.005-1.76465c-0.00013-0.04741-0.01029-0.08631-0.02806-0.11556 c0.08586-0.00369,0.14562,0.06175,0.14595,0.17752l0.005,1.76465c0.00045,0.15911-0.11147,0.35297-0.24994,0.43291 c-0.09721,0.05612-0.18163,0.04112-0.22351-0.02781c0.03214-0.00138,0.06791-0.01238,0.10562-0.03416 C27.86329,38.49334,27.97521,38.29948,27.97476,38.14037z"/></g></g><g><g><pattern id="SVGID_23_" patternTransform="matrix(-0.01188 0 0 0.01188 -8135.57275 -7795.65332)" xlink:href="#Unnamed_Pattern_8"/><path class="st37" d="M38.60205,30.03757c-0.13846,0.07994-0.25039,0.2738-0.24994,0.43291l0.005,1.76465 c0.00045,0.15911,0.11311,0.2233,0.25157,0.14336c0.13847-0.07994,0.25039-0.2738,0.24994-0.43291l-0.005-1.76465 C38.85318,30.02183,38.74052,29.95763,38.60205,30.03757z"/></g><g><pattern id="SVGID_24_" patternTransform="matrix(-0.01188 0 0 0.01188 -8135.57275 -7796.81055)" xlink:href="#Unnamed_Pattern_11"/><path class="st38" d="M38.74075,31.88362l-0.005-1.76465c-0.00013-0.04741-0.0103-0.08631-0.02806-0.11556 c0.08586-0.00369,0.14562,0.06175,0.14595,0.17752l0.005,1.76465c0.00045,0.15911-0.11147,0.35297-0.24994,0.43291 c-0.09721,0.05612-0.18163,0.04112-0.22351-0.02781c0.03214-0.00138,0.06791-0.01238,0.10562-0.03416 C38.62928,32.23659,38.7412,32.04273,38.74075,31.88362z"/></g></g><g><g><pattern id="SVGID_25_" patternTransform="matrix(-0.01188 0 0 0.01188 -8137.11084 -7794.75928)" xlink:href="#Unnamed_Pattern_8"/><path class="st39" d="M37.06406,30.93139c-0.13846,0.07994-0.25039,0.2738-0.24994,0.43291l0.005,1.76465 c0.00045,0.15911,0.11311,0.2233,0.25157,0.14336c0.13847-0.07994,0.25039-0.2738,0.24994-0.43291l-0.005-1.76465 C37.31518,30.91565,37.20252,30.85145,37.06406,30.93139z"/></g><g><pattern id="SVGID_26_" patternTransform="matrix(-0.01188 0 0 0.01188 -8137.11084 -7795.9165)" xlink:href="#Unnamed_Pattern_11"/><path class="st40" d="M37.20275,32.77744l-0.005-1.76465c-0.00013-0.04741-0.0103-0.08631-0.02806-0.11556 c0.08585-0.00369,0.14562,0.06175,0.14595,0.17752l0.005,1.76465c0.00045,0.15911-0.11147,0.35297-0.24994,0.43291 c-0.09721,0.05612-0.18163,0.04112-0.22351-0.02781c0.03214-0.00138,0.06791-0.01238,0.10562-0.03416 C37.09127,33.13041,37.2032,32.93655,37.20275,32.77744z"/></g></g><g><g><pattern id="SVGID_27_" patternTransform="matrix(-0.01188 0 0 0.01188 -8138.64893 -7793.86523)" xlink:href="#Unnamed_Pattern_8"/><path class="st41" d="M35.52606,31.82521c-0.13847,0.07994-0.25039,0.2738-0.24994,0.43291l0.005,1.76465 c0.00045,0.15911,0.11311,0.2233,0.25157,0.14336c0.13847-0.07994,0.25039-0.2738,0.24994-0.43291l-0.005-1.76465 C35.77718,31.80947,35.66452,31.74527,35.52606,31.82521z"/></g><g><pattern id="SVGID_28_" patternTransform="matrix(-0.01188 0 0 0.01188 -8138.64893 -7795.02295)" xlink:href="#Unnamed_Pattern_11"/><path class="st42" d="M35.66475,33.67126l-0.005-1.76465c-0.00013-0.04741-0.01029-0.08631-0.02806-0.11556 c0.08585-0.00369,0.14562,0.06175,0.14595,0.17752l0.005,1.76465c0.00045,0.15911-0.11147,0.35297-0.24994,0.43291 c-0.09721,0.05613-0.18163,0.04113-0.22351-0.0278c0.03214-0.00138,0.06791-0.01239,0.10562-0.03416 C35.55328,34.02423,35.6652,33.83037,35.66475,33.67126z"/></g></g><g><g><pattern id="SVGID_29_" patternTransform="matrix(-0.01188 0 0 0.01188 -8140.18701 -7792.97168)" xlink:href="#Unnamed_Pattern_8"/><path class="st43" d="M33.98806,32.71903c-0.13847,0.07994-0.25039,0.2738-0.24994,0.43291l0.005,1.76465 c0.00045,0.15911,0.11311,0.22331,0.25157,0.14336c0.13847-0.07994,0.25039-0.2738,0.24994-0.43291l-0.005-1.76465 C34.23918,32.70329,34.12653,32.63909,33.98806,32.71903z"/></g><g><pattern id="SVGID_30_" patternTransform="matrix(-0.01188 0 0 0.01188 -8140.18701 -7794.12891)" xlink:href="#Unnamed_Pattern_11"/><path class="st44" d="M34.12675,34.56509l-0.005-1.76465c-0.00013-0.04741-0.01029-0.08631-0.02806-0.11556 c0.08585-0.00369,0.14562,0.06175,0.14595,0.17752l0.005,1.76465c0.00045,0.15911-0.11147,0.35297-0.24994,0.43291 c-0.09721,0.05613-0.18163,0.04113-0.22351-0.0278c0.03214-0.00138,0.06791-0.01239,0.10562-0.03416 C34.01528,34.91805,34.1272,34.72419,34.12675,34.56509z"/></g></g><g><g><pattern id="SVGID_31_" patternTransform="matrix(-0.01188 0 0 0.01188 -8141.7251 -7792.07764)" xlink:href="#Unnamed_Pattern_8"/><path class="st45" d="M32.45006,33.61285c-0.13847,0.07994-0.25039,0.2738-0.24994,0.43291l0.005,1.76465 c0.00045,0.15911,0.11311,0.22331,0.25157,0.14336s0.25039-0.2738,0.24994-0.43291l-0.005-1.76465 C32.70118,33.59711,32.58853,33.53291,32.45006,33.61285z"/></g><g><pattern id="SVGID_32_" patternTransform="matrix(-0.01188 0 0 0.01188 -8141.7251 -7793.23486)" xlink:href="#Unnamed_Pattern_11"/><path class="st46" d="M32.58875,35.4589l-0.005-1.76465c-0.00013-0.04741-0.01029-0.08631-0.02806-0.11556 c0.08585-0.00369,0.14562,0.06175,0.14595,0.17752l0.005,1.76465c0.00045,0.15911-0.11147,0.35297-0.24994,0.43291 c-0.09721,0.05612-0.18163,0.04113-0.22351-0.0278c0.03214-0.00138,0.06791-0.01239,0.10563-0.03416 C32.47728,35.81187,32.5892,35.61801,32.58875,35.4589z"/></g></g><g><g><pattern id="SVGID_33_" patternTransform="matrix(-0.01188 0 0 0.01188 -8143.2627 -7791.18408)" xlink:href="#Unnamed_Pattern_8"/><path class="st47" d="M30.91206,34.50668c-0.13847,0.07994-0.25039,0.2738-0.24994,0.43291l0.005,1.76465 c0.00045,0.15911,0.11311,0.2233,0.25157,0.14336c0.13847-0.07994,0.25039-0.2738,0.24994-0.43291l-0.005-1.76465 C31.16318,34.49093,31.05053,34.42673,30.91206,34.50668z"/></g><g><pattern id="SVGID_34_" patternTransform="matrix(-0.01188 0 0 0.01188 -8143.2627 -7792.34131)" xlink:href="#Unnamed_Pattern_11"/><path class="st48" d="M31.05075,36.35273l-0.005-1.76465c-0.00013-0.04741-0.01029-0.08631-0.02806-0.11556 c0.08586-0.00369,0.14562,0.06175,0.14595,0.17752l0.005,1.76465c0.00045,0.15911-0.11147,0.35297-0.24994,0.43291 c-0.09721,0.05612-0.18163,0.04112-0.22351-0.0278c0.03214-0.00138,0.06791-0.01239,0.10562-0.03416 C30.93928,36.70569,31.0512,36.51183,31.05075,36.35273z"/></g></g><g><g><pattern id="SVGID_35_" patternTransform="matrix(-0.01188 0 0 0.01188 -8144.80078 -7790.29004)" xlink:href="#Unnamed_Pattern_8"/><path class="st49" d="M29.37406,35.4005c-0.13846,0.07994-0.25039,0.2738-0.24994,0.43291l0.005,1.76465 c0.00045,0.15911,0.11311,0.2233,0.25157,0.14336c0.13847-0.07994,0.25039-0.2738,0.24994-0.43291l-0.005-1.76465 C29.62519,35.38475,29.51253,35.32055,29.37406,35.4005z"/></g><g><pattern id="SVGID_36_" patternTransform="matrix(-0.01188 0 0 0.01188 -8144.80078 -7791.44727)" xlink:href="#Unnamed_Pattern_11"/><path class="st50" d="M29.51276,37.24655l-0.005-1.76465c-0.00013-0.04741-0.01029-0.08631-0.02806-0.11556 c0.08586-0.00369,0.14562,0.06175,0.14595,0.17752l0.005,1.76465c0.00045,0.15911-0.11147,0.35297-0.24994,0.43291 c-0.09721,0.05612-0.18163,0.04112-0.22351-0.0278c0.03214-0.00138,0.06791-0.01239,0.10562-0.03416 C29.40128,37.59951,29.51321,37.40565,29.51276,37.24655z"/></g></g></g><path class="st19" d="M40.24947,25.22585c1.17997,0.68126,1.18618,1.78554,0.01388,2.4668l-13.07866,7.60049 c-1.1723,0.68127-3.07907,0.68147-4.25904,0.00022L9.76142,27.69299c-1.17997-0.68126-1.18585-1.78573-0.01355-2.467 l13.07866-7.60049c1.1723-0.68127,3.07874-0.68128,4.25871-0.00002L40.24947,25.22585z"/><g><path class="st20" d="M35.13433,25.91375c0.52195,0.30135,0.52435,0.78969,0.00579,1.09105l-9.15985,5.32312 c-0.51856,0.30135-1.36164,0.30156-1.88359,0.00021l-9.21977-5.32303c-0.52195-0.30135-0.5247-0.7899-0.00614-1.09125 l9.15985-5.32312c0.51856-0.30136,1.36199-0.30136,1.88395-0.00001L35.13433,25.91375z"/></g><g><g><pattern id="SVGID_37_" patternTransform="matrix(0.05283 0 0 0.05283 -7612.17334 -7477.6499)" xlink:href="#Unnamed_Pattern_12"/><path class="st51" d="M11.57185,31.00182c0.25806,0.14899,0.46618,0.50947,0.46534,0.806 c-0.00084,0.29653-0.21033,0.41629-0.46838,0.26731c-0.25806-0.14899-0.46652-0.51006-0.46568-0.80659 C11.10397,30.97202,11.3138,30.85283,11.57185,31.00182z"/></g><g><pattern id="SVGID_38_" patternTransform="matrix(0.05283 0 0 0.05283 -7612.17334 -7477.6499)" xlink:href="#Unnamed_Pattern_12"/><path class="st52" d="M13.07633,31.87043c0.25772,0.1488,0.46618,0.50948,0.46534,0.806 c-0.00084,0.29653-0.21066,0.4161-0.46839,0.2673c-0.25805-0.14899-0.46652-0.51006-0.46568-0.80658 C12.60846,31.84063,12.81828,31.72145,13.07633,31.87043z"/></g><g><pattern id="SVGID_39_" patternTransform="matrix(0.05283 0 0 0.05283 -7612.17334 -7477.6499)" xlink:href="#Unnamed_Pattern_12"/><path class="st53" d="M14.58082,32.73905c0.25772,0.1488,0.46618,0.50948,0.46534,0.806 c-0.00084,0.29653-0.21067,0.4161-0.46839,0.2673c-0.25806-0.14899-0.46652-0.51006-0.46568-0.80658 C14.11294,32.70924,14.32276,32.59006,14.58082,32.73905z"/></g></g></g></g><polygon class="st9" points="20.82406,36.24232 17.33488,34.22774 17.33488,35.54919 20.82406,37.56367 "/></g><g><g><pattern id="SVGID_40_" patternTransform="matrix(0.05026 0 0 0.05026 -7629.47119 -7502.07129)" xlink:href="#Unnamed_Pattern_17"/><path class="st54" d="M40.35224,20.43091l-0.01056,4.88799c-0.001,0.42219-0.27844,0.84337-0.83231,1.16504l-12.44147,7.23047 c-1.11528,0.64786-2.92918,0.64836-4.0515,0l-12.5229-7.22997c-0.56493-0.32619-0.84689-0.75391-0.84589-1.18162l0.01056-4.88548 c0,0.42621,0.28196,0.85342,0.84538,1.17861l12.5229,7.23047c1.12282,0.64786,2.93672,0.64786,4.052-0.0005l12.44148-7.22997 C40.0738,21.27378,40.35123,20.85259,40.35224,20.43091z"/><g><path class="st20" d="M41.13838,18.41078l-0.0111,5.13829c-0.00106,0.4438-0.2927,0.88655-0.87493,1.2247l-13.07856,7.60072 c-1.17239,0.68103-3.07918,0.68156-4.25896,0L9.75067,24.77429c-0.59386-0.34289-0.89025-0.79251-0.8892-1.24213l0.0111-5.13565 c0,0.44803,14.05282,8.83968,14.05282,8.83968c1.18032,0.68103,3.0871,0.68103,4.25949-0.00053 C27.18488,27.23566,41.13732,18.85405,41.13838,18.41078z"/><path class="st19" d="M21.76243,27.80019l-10.90063-6.2938c-0.28178-0.16269-0.63402,0.04066-0.63402,0.36604v1.70024 c0,0.30202,0.16113,0.58109,0.42268,0.73209l10.90062,6.29336c0.28178,0.16269,0.63401-0.04067,0.63401-0.36605v-1.6998 C22.18509,28.23027,22.02398,27.9512,21.76243,27.80019z"/><g><g><g><pattern id="SVGID_41_" patternTransform="matrix(-0.01188 0 0 0.01188 -8135.60742 -7803.96924)" xlink:href="#Unnamed_Pattern_8"/><path class="st55" d="M27.83607,28.23704c-0.13846,0.07994-0.25039,0.2738-0.24994,0.43291l0.005,1.76465 c0.00045,0.15911,0.11311,0.2233,0.25157,0.14336s0.25039-0.2738,0.24994-0.43291l-0.005-1.76465 C28.08719,28.2213,27.97453,28.1571,27.83607,28.23704z"/></g><g><pattern id="SVGID_42_" patternTransform="matrix(-0.01188 0 0 0.01188 -8135.60742 -7804.83545)" xlink:href="#Unnamed_Pattern_11"/><path class="st56" d="M27.97476,30.0831l-0.005-1.76465c-0.00013-0.04741-0.01029-0.08631-0.02806-0.11556 c0.08586-0.00369,0.14562,0.06175,0.14595,0.17752l0.005,1.76465c0.00045,0.15911-0.11147,0.35297-0.24994,0.43291 c-0.09721,0.05612-0.18163,0.04112-0.22351-0.0278c0.03214-0.00138,0.06791-0.01239,0.10562-0.03416 C27.86329,30.43606,27.97521,30.2422,27.97476,30.0831z"/></g></g><g><g><pattern id="SVGID_43_" patternTransform="matrix(-0.01188 0 0 0.01188 -8135.57275 -7803.71045)" xlink:href="#Unnamed_Pattern_8"/><path class="st57" d="M38.60205,21.9803c-0.13846,0.07994-0.25039,0.2738-0.24994,0.43291l0.005,1.76465 c0.00045,0.15911,0.11311,0.2233,0.25157,0.14336s0.25039-0.2738,0.24994-0.43291l-0.005-1.76465 C38.85318,21.96455,38.74052,21.90035,38.60205,21.9803z"/></g><g><pattern id="SVGID_44_" patternTransform="matrix(-0.01188 0 0 0.01188 -8135.57275 -7804.86768)" xlink:href="#Unnamed_Pattern_11"/><path class="st58" d="M38.74075,23.82635l-0.005-1.76465c-0.00013-0.04741-0.0103-0.08631-0.02806-0.11556 c0.08586-0.00369,0.14562,0.06175,0.14595,0.17752l0.005,1.76465c0.00045,0.15911-0.11147,0.35297-0.24994,0.43291 c-0.09721,0.05612-0.18163,0.04112-0.22351-0.0278c0.03214-0.00138,0.06791-0.01238,0.10562-0.03416 C38.62928,24.17931,38.7412,23.98545,38.74075,23.82635z"/></g></g><g><g><pattern id="SVGID_45_" patternTransform="matrix(-0.01188 0 0 0.01188 -8137.11084 -7802.81641)" xlink:href="#Unnamed_Pattern_8"/><path class="st59" d="M37.06406,22.87412c-0.13846,0.07994-0.25039,0.2738-0.24994,0.43291l0.005,1.76465 c0.00045,0.15911,0.11311,0.2233,0.25157,0.14336s0.25039-0.2738,0.24994-0.43291l-0.005-1.76465 C37.31518,22.85837,37.20252,22.79417,37.06406,22.87412z"/></g><g><pattern id="SVGID_46_" patternTransform="matrix(-0.01188 0 0 0.01188 -8137.11084 -7803.97363)" xlink:href="#Unnamed_Pattern_11"/><path class="st60" d="M37.20275,24.72017l-0.005-1.76465c-0.00013-0.04741-0.0103-0.08631-0.02806-0.11556 c0.08585-0.00369,0.14562,0.06175,0.14595,0.17752l0.005,1.76465c0.00045,0.15911-0.11147,0.35297-0.24994,0.43291 c-0.09721,0.05612-0.18163,0.04112-0.22351-0.0278c0.03214-0.00138,0.06791-0.01239,0.10562-0.03416 C37.09127,25.07314,37.2032,24.87928,37.20275,24.72017z"/></g></g><g><g><pattern id="SVGID_47_" patternTransform="matrix(-0.01188 0 0 0.01188 -8138.64893 -7801.92285)" xlink:href="#Unnamed_Pattern_8"/><path class="st61" d="M35.52606,23.76794c-0.13847,0.07994-0.25039,0.2738-0.24994,0.43291l0.005,1.76465 c0.00045,0.15911,0.11311,0.22331,0.25157,0.14336s0.25039-0.2738,0.24994-0.43291l-0.005-1.76465 C35.77718,23.75219,35.66452,23.68799,35.52606,23.76794z"/></g><g><pattern id="SVGID_48_" patternTransform="matrix(-0.01188 0 0 0.01188 -8138.64893 -7803.08008)" xlink:href="#Unnamed_Pattern_11"/><path class="st62" d="M35.66475,25.61399l-0.005-1.76465c-0.00013-0.04741-0.01029-0.08631-0.02806-0.11556 c0.08585-0.00369,0.14562,0.06175,0.14595,0.17752l0.005,1.76465c0.00045,0.15911-0.11147,0.35297-0.24994,0.43291 c-0.09721,0.05612-0.18163,0.04112-0.22351-0.0278c0.03214-0.00138,0.06791-0.01238,0.10562-0.03416 C35.55328,25.96696,35.6652,25.7731,35.66475,25.61399z"/></g></g><g><g><pattern id="SVGID_49_" patternTransform="matrix(-0.01188 0 0 0.01188 -8140.18701 -7801.02881)" xlink:href="#Unnamed_Pattern_8"/><path class="st63" d="M33.98806,24.66176c-0.13847,0.07994-0.25039,0.2738-0.24994,0.43291l0.005,1.76465 c0.00045,0.15911,0.11311,0.2233,0.25157,0.14336c0.13847-0.07994,0.25039-0.2738,0.24994-0.43291l-0.005-1.76465 C34.23918,24.64602,34.12653,24.58182,33.98806,24.66176z"/></g><g><pattern id="SVGID_50_" patternTransform="matrix(-0.01188 0 0 0.01188 -8140.18701 -7802.18604)" xlink:href="#Unnamed_Pattern_11"/><path class="st64" d="M34.12675,26.50781l-0.005-1.76465c-0.00013-0.04741-0.01029-0.08631-0.02806-0.11556 c0.08585-0.00369,0.14562,0.06175,0.14595,0.17752l0.005,1.76465c0.00045,0.15911-0.11147,0.35297-0.24994,0.43291 c-0.09721,0.05612-0.18163,0.04112-0.22351-0.0278c0.03214-0.00138,0.06791-0.01238,0.10562-0.03416 C34.01528,26.86078,34.1272,26.66692,34.12675,26.50781z"/></g></g><g><g><pattern id="SVGID_51_" patternTransform="matrix(-0.01188 0 0 0.01188 -8141.7251 -7800.13525)" xlink:href="#Unnamed_Pattern_8"/><path class="st65" d="M32.45006,25.55558c-0.13847,0.07994-0.25039,0.2738-0.24994,0.43291l0.005,1.76465 c0.00045,0.15911,0.11311,0.2233,0.25157,0.14336s0.25039-0.2738,0.24994-0.43291l-0.005-1.76465 C32.70118,25.53984,32.58853,25.47564,32.45006,25.55558z"/></g><g><pattern id="SVGID_52_" patternTransform="matrix(-0.01188 0 0 0.01188 -8141.7251 -7801.29248)" xlink:href="#Unnamed_Pattern_11"/><path class="st66" d="M32.58875,27.40163l-0.005-1.76465c-0.00013-0.04741-0.01029-0.08631-0.02806-0.11556 c0.08585-0.00369,0.14562,0.06175,0.14595,0.17752l0.005,1.76465c0.00045,0.15911-0.11147,0.35297-0.24994,0.43291 c-0.09721,0.05612-0.18163,0.04112-0.22351-0.0278c0.03214-0.00138,0.06791-0.01239,0.10563-0.03416 C32.47728,27.7546,32.5892,27.56074,32.58875,27.40163z"/></g></g><g><g><pattern id="SVGID_53_" patternTransform="matrix(-0.01188 0 0 0.01188 -8143.2627 -7799.24121)" xlink:href="#Unnamed_Pattern_8"/><path class="st67" d="M30.91206,26.4494c-0.13847,0.07994-0.25039,0.2738-0.24994,0.43291l0.005,1.76465 c0.00045,0.15911,0.11311,0.22331,0.25157,0.14336c0.13847-0.07994,0.25039-0.2738,0.24994-0.43291l-0.005-1.76465 C31.16318,26.43366,31.05053,26.36946,30.91206,26.4494z"/></g><g><pattern id="SVGID_54_" patternTransform="matrix(-0.01188 0 0 0.01188 -8143.2627 -7800.39844)" xlink:href="#Unnamed_Pattern_11"/><path class="st68" d="M31.05075,28.29545l-0.005-1.76465c-0.00013-0.04741-0.01029-0.08631-0.02806-0.11556 c0.08586-0.00369,0.14562,0.06175,0.14595,0.17752l0.005,1.76465c0.00045,0.15911-0.11147,0.35297-0.24994,0.43291 c-0.09721,0.05612-0.18163,0.04112-0.22351-0.0278c0.03214-0.00138,0.06791-0.01239,0.10562-0.03416 C30.93928,28.64842,31.0512,28.45456,31.05075,28.29545z"/></g></g><g><g><pattern id="SVGID_55_" patternTransform="matrix(-0.01188 0 0 0.01188 -8144.80078 -7798.34766)" xlink:href="#Unnamed_Pattern_8"/><path class="st69" d="M29.37406,27.34322c-0.13846,0.07994-0.25039,0.2738-0.24994,0.43291l0.005,1.76465 c0.00045,0.15911,0.11311,0.22331,0.25157,0.14336c0.13847-0.07994,0.25039-0.2738,0.24994-0.43291l-0.005-1.76465 C29.62519,27.32748,29.51253,27.26328,29.37406,27.34322z"/></g><g><pattern id="SVGID_56_" patternTransform="matrix(-0.01188 0 0 0.01188 -8144.80078 -7799.50488)" xlink:href="#Unnamed_Pattern_11"/><path class="st70" d="M29.51276,29.18927l-0.005-1.76465c-0.00013-0.04741-0.01029-0.08631-0.02806-0.11556 c0.08586-0.00369,0.14562,0.06175,0.14595,0.17752l0.005,1.76465c0.00045,0.15911-0.11147,0.35297-0.24994,0.43291 c-0.09721,0.05612-0.18163,0.04112-0.22351-0.0278c0.03214-0.00138,0.06791-0.01238,0.10562-0.03416 C29.40128,29.54224,29.51321,29.34838,29.51276,29.18927z"/></g></g></g><path class="st19" d="M40.24947,17.16858c1.17997,0.68126,1.18618,1.78554,0.01388,2.4668l-13.07866,7.60049 c-1.1723,0.68127-3.07907,0.68147-4.25904,0.00021L9.76142,19.63572c-1.17997-0.68126-1.18585-1.78573-0.01355-2.467 l13.07866-7.60049c1.1723-0.68127,3.07874-0.68128,4.25871-0.00002L40.24947,17.16858z"/><g><path class="st20" d="M35.13433,17.85648c0.52195,0.30135,0.52435,0.78969,0.00579,1.09105l-9.15985,5.32312 c-0.51856,0.30136-1.36164,0.30156-1.88359,0.00021l-9.21977-5.32304c-0.52195-0.30135-0.5247-0.7899-0.00614-1.09125 l9.15985-5.32312c0.51856-0.30135,1.36199-0.30136,1.88395-0.00001L35.13433,17.85648z"/></g><g><g><pattern id="SVGID_57_" patternTransform="matrix(0.05283 0 0 0.05283 -7612.17334 -7485.70703)" xlink:href="#Unnamed_Pattern_12"/><path class="st71" d="M11.57185,22.94455c0.25806,0.14899,0.46618,0.50947,0.46534,0.806 c-0.00084,0.29653-0.21033,0.41629-0.46838,0.26731c-0.25806-0.14899-0.46652-0.51006-0.46568-0.80659 C11.10397,22.91474,11.3138,22.79556,11.57185,22.94455z"/></g><g><pattern id="SVGID_58_" patternTransform="matrix(0.05283 0 0 0.05283 -7612.17334 -7485.70703)" xlink:href="#Unnamed_Pattern_12"/><path class="st72" d="M13.07633,23.81316c0.25772,0.1488,0.46618,0.50948,0.46534,0.806 c-0.00084,0.29653-0.21066,0.4161-0.46839,0.2673c-0.25805-0.14898-0.46652-0.51006-0.46568-0.80658 C12.60846,23.78336,12.81828,23.66418,13.07633,23.81316z"/></g><g><pattern id="SVGID_59_" patternTransform="matrix(0.05283 0 0 0.05283 -7612.17334 -7485.70703)" xlink:href="#Unnamed_Pattern_12"/><path class="st73" d="M14.58082,24.68177c0.25772,0.14879,0.46618,0.50948,0.46534,0.806 c-0.00084,0.29653-0.21067,0.4161-0.46839,0.2673c-0.25806-0.14899-0.46652-0.51006-0.46568-0.80658 C14.11294,24.65197,14.32276,24.53279,14.58082,24.68177z"/></g></g></g></g><polygon class="st9" points="20.82406,28.18505 17.33488,26.17046 17.33488,27.49191 20.82406,29.5064 "/></g><g><g><pattern id="SVGID_60_" patternTransform="matrix(0.05026 0 0 0.05026 -7629.47119 -7510.12842)" xlink:href="#Unnamed_Pattern_17"/><path class="st74" d="M40.35224,12.37363l-0.01056,4.88799c-0.001,0.42219-0.27844,0.84337-0.83231,1.16504l-12.44147,7.23047 c-1.11528,0.64786-2.92918,0.64836-4.0515,0l-12.5229-7.22997c-0.56493-0.32619-0.84689-0.75391-0.84589-1.18162l0.01056-4.88548 c0,0.42621,0.28196,0.85342,0.84538,1.17861l12.5229,7.23047c1.12282,0.64786,2.93672,0.64786,4.052-0.0005l12.44148-7.22997 C40.0738,13.2165,40.35123,12.79532,40.35224,12.37363z"/><g><path class="st20" d="M41.13838,10.3535l-0.0111,5.13829c-0.00106,0.4438-0.2927,0.88655-0.87493,1.2247l-13.07856,7.60072 c-1.17239,0.68103-3.07918,0.68156-4.25896,0L9.75067,16.71702c-0.59386-0.34289-0.89025-0.79251-0.8892-1.24213l0.0111-5.13565 c0,0.44803,14.05282,8.83968,14.05282,8.83968c1.18032,0.68103,3.0871,0.68103,4.25949-0.00053 C27.18488,19.17839,41.13732,10.79678,41.13838,10.3535z"/><path class="st19" d="M21.76243,19.74292L10.8618,13.44911c-0.28178-0.16269-0.63402,0.04066-0.63402,0.36604v1.70024 c0,0.30202,0.16113,0.58109,0.42268,0.73209l10.90062,6.29336c0.28178,0.16269,0.63401-0.04067,0.63401-0.36605V20.475 C22.18509,20.173,22.02398,19.89393,21.76243,19.74292z"/><g><g><g><pattern id="SVGID_61_" patternTransform="matrix(-0.01188 0 0 0.01188 -8135.60742 -7812.02637)" xlink:href="#Unnamed_Pattern_8"/><path class="st75" d="M27.83607,20.17977c-0.13846,0.07994-0.25039,0.2738-0.24994,0.43291l0.005,1.76465 c0.00045,0.15911,0.11311,0.2233,0.25157,0.14336s0.25039-0.2738,0.24994-0.43291l-0.005-1.76465 C28.08719,20.16403,27.97453,20.09983,27.83607,20.17977z"/></g><g><pattern id="SVGID_62_" patternTransform="matrix(-0.01188 0 0 0.01188 -8135.60742 -7812.89258)" xlink:href="#Unnamed_Pattern_11"/><path class="st76" d="M27.97476,22.02582l-0.005-1.76465c-0.00013-0.04741-0.01029-0.08631-0.02806-0.11556 c0.08586-0.00369,0.14562,0.06175,0.14595,0.17752l0.005,1.76465c0.00045,0.15911-0.11147,0.35297-0.24994,0.43291 c-0.09721,0.05612-0.18163,0.04112-0.22351-0.0278c0.03214-0.00138,0.06791-0.01238,0.10562-0.03416 C27.86329,22.37879,27.97521,22.18493,27.97476,22.02582z"/></g></g><g><g><pattern id="SVGID_63_" patternTransform="matrix(-0.01188 0 0 0.01188 -8135.57275 -7811.76758)" xlink:href="#Unnamed_Pattern_8"/><path class="st77" d="M38.60205,13.92302c-0.13846,0.07994-0.25039,0.2738-0.24994,0.43291l0.005,1.76465 c0.00045,0.15911,0.11311,0.22331,0.25157,0.14336c0.13847-0.07994,0.25039-0.2738,0.24994-0.43291l-0.005-1.76465 C38.85318,13.90728,38.74052,13.84308,38.60205,13.92302z"/></g><g><pattern id="SVGID_64_" patternTransform="matrix(-0.01188 0 0 0.01188 -8135.57275 -7812.9248)" xlink:href="#Unnamed_Pattern_11"/><path class="st78" d="M38.74075,15.76907l-0.005-1.76465c-0.00013-0.04741-0.0103-0.08631-0.02806-0.11556 c0.08586-0.00369,0.14562,0.06175,0.14595,0.17752l0.005,1.76465c0.00045,0.15911-0.11147,0.35297-0.24994,0.43291 c-0.09721,0.05612-0.18163,0.04112-0.22351-0.0278c0.03214-0.00138,0.06791-0.01238,0.10562-0.03416 C38.62928,16.12204,38.7412,15.92818,38.74075,15.76907z"/></g></g><g><g><pattern id="SVGID_65_" patternTransform="matrix(-0.01188 0 0 0.01188 -8137.11084 -7810.87402)" xlink:href="#Unnamed_Pattern_8"/><path class="st79" d="M37.06406,14.81684c-0.13846,0.07994-0.25039,0.2738-0.24994,0.43291l0.005,1.76465 c0.00045,0.15911,0.11311,0.2233,0.25157,0.14336s0.25039-0.2738,0.24994-0.43291l-0.005-1.76465 C37.31518,14.8011,37.20252,14.7369,37.06406,14.81684z"/></g><g><pattern id="SVGID_66_" patternTransform="matrix(-0.01188 0 0 0.01188 -8137.11084 -7812.03125)" xlink:href="#Unnamed_Pattern_11"/><path class="st80" d="M37.20275,16.6629l-0.005-1.76465c-0.00013-0.04741-0.0103-0.08631-0.02806-0.11556 c0.08585-0.00369,0.14562,0.06175,0.14595,0.17752l0.005,1.76465c0.00045,0.15911-0.11147,0.35297-0.24994,0.43291 c-0.09721,0.05612-0.18163,0.04112-0.22351-0.0278c0.03214-0.00138,0.06791-0.01239,0.10562-0.03416 C37.09127,17.01586,37.2032,16.822,37.20275,16.6629z"/></g></g><g><g><pattern id="SVGID_67_" patternTransform="matrix(-0.01188 0 0 0.01188 -8138.64893 -7809.97998)" xlink:href="#Unnamed_Pattern_8"/><path class="st81" d="M35.52606,15.71066c-0.13847,0.07994-0.25039,0.2738-0.24994,0.43291l0.005,1.76465 c0.00045,0.15911,0.11311,0.22331,0.25157,0.14336s0.25039-0.2738,0.24994-0.43291l-0.005-1.76465 C35.77718,15.69492,35.66452,15.63072,35.52606,15.71066z"/></g><g><pattern id="SVGID_68_" patternTransform="matrix(-0.01188 0 0 0.01188 -8138.64893 -7811.13721)" xlink:href="#Unnamed_Pattern_11"/><path class="st82" d="M35.66475,17.55672l-0.005-1.76465c-0.00013-0.04741-0.01029-0.08631-0.02806-0.11556 c0.08585-0.00369,0.14562,0.06175,0.14595,0.17752l0.005,1.76465c0.00045,0.15911-0.11147,0.35297-0.24994,0.43291 c-0.09721,0.05612-0.18163,0.04112-0.22351-0.0278c0.03214-0.00138,0.06791-0.01239,0.10562-0.03416 C35.55328,17.90968,35.6652,17.71582,35.66475,17.55672z"/></g></g><g><g><pattern id="SVGID_69_" patternTransform="matrix(-0.01188 0 0 0.01188 -8140.18701 -7809.08643)" xlink:href="#Unnamed_Pattern_8"/><path class="st83" d="M33.98806,16.60448c-0.13847,0.07994-0.25039,0.2738-0.24994,0.43291l0.005,1.76465 c0.00045,0.15911,0.11311,0.22331,0.25157,0.14336c0.13847-0.07994,0.25039-0.2738,0.24994-0.43291l-0.005-1.76465 C34.23918,16.58874,34.12653,16.52454,33.98806,16.60448z"/></g><g><pattern id="SVGID_70_" patternTransform="matrix(-0.01188 0 0 0.01188 -8140.18701 -7810.24365)" xlink:href="#Unnamed_Pattern_11"/><path class="st84" d="M34.12675,18.45054l-0.005-1.76465c-0.00013-0.04741-0.01029-0.08631-0.02806-0.11556 c0.08585-0.00369,0.14562,0.06175,0.14595,0.17752l0.005,1.76465c0.00045,0.15911-0.11147,0.35297-0.24994,0.43291 c-0.09721,0.05612-0.18163,0.04112-0.22351-0.0278c0.03214-0.00138,0.06791-0.01238,0.10562-0.03416 C34.01528,18.8035,34.1272,18.60964,34.12675,18.45054z"/></g></g><g><g><pattern id="SVGID_71_" patternTransform="matrix(-0.01188 0 0 0.01188 -8141.7251 -7808.19238)" xlink:href="#Unnamed_Pattern_8"/><path class="st85" d="M32.45006,17.49831c-0.13847,0.07994-0.25039,0.2738-0.24994,0.43291l0.005,1.76465 c0.00045,0.15911,0.11311,0.2233,0.25157,0.14336s0.25039-0.2738,0.24994-0.43291l-0.005-1.76465 C32.70118,17.48256,32.58853,17.41836,32.45006,17.49831z"/></g><g><pattern id="SVGID_72_" patternTransform="matrix(-0.01188 0 0 0.01188 -8141.7251 -7809.34961)" xlink:href="#Unnamed_Pattern_11"/><path class="st86" d="M32.58875,19.34436l-0.005-1.76465c-0.00013-0.04741-0.01029-0.08631-0.02806-0.11556 c0.08585-0.00369,0.14562,0.06175,0.14595,0.17752l0.005,1.76465c0.00045,0.15911-0.11147,0.35297-0.24994,0.43291 c-0.09721,0.05612-0.18163,0.04112-0.22351-0.0278c0.03214-0.00138,0.06791-0.01238,0.10563-0.03416 C32.47728,19.69732,32.5892,19.50347,32.58875,19.34436z"/></g></g><g><g><pattern id="SVGID_73_" patternTransform="matrix(-0.01188 0 0 0.01188 -8143.2627 -7807.29834)" xlink:href="#Unnamed_Pattern_8"/><path class="st87" d="M30.91206,18.39213c-0.13847,0.07994-0.25039,0.2738-0.24994,0.43291l0.005,1.76465 c0.00045,0.15911,0.11311,0.22331,0.25157,0.14336c0.13847-0.07994,0.25039-0.2738,0.24994-0.43291l-0.005-1.76465 C31.16318,18.37638,31.05053,18.31219,30.91206,18.39213z"/></g><g><pattern id="SVGID_74_" patternTransform="matrix(-0.01188 0 0 0.01188 -8143.2627 -7808.45557)" xlink:href="#Unnamed_Pattern_11"/><path class="st88" d="M31.05075,20.23818l-0.005-1.76465c-0.00013-0.04741-0.01029-0.08631-0.02806-0.11556 c0.08586-0.00369,0.14562,0.06175,0.14595,0.17752l0.005,1.76465c0.00045,0.15911-0.11147,0.35297-0.24994,0.43291 c-0.09721,0.05612-0.18163,0.04112-0.22351-0.0278c0.03214-0.00138,0.06791-0.01239,0.10562-0.03416 C30.93928,20.59115,31.0512,20.39729,31.05075,20.23818z"/></g></g><g><g><pattern id="SVGID_75_" patternTransform="matrix(-0.01188 0 0 0.01188 -8144.80078 -7806.40479)" xlink:href="#Unnamed_Pattern_8"/><path class="st89" d="M29.37406,19.28595c-0.13846,0.07994-0.25039,0.2738-0.24994,0.43291l0.005,1.76465 c0.00045,0.15911,0.11311,0.22331,0.25157,0.14336c0.13847-0.07994,0.25039-0.2738,0.24994-0.43291l-0.005-1.76465 C29.62519,19.2702,29.51253,19.20601,29.37406,19.28595z"/></g><g><pattern id="SVGID_76_" patternTransform="matrix(-0.01188 0 0 0.01188 -8144.80078 -7807.56201)" xlink:href="#Unnamed_Pattern_11"/><path class="st90" d="M29.51276,21.132l-0.005-1.76465c-0.00013-0.04741-0.01029-0.08631-0.02806-0.11556 c0.08586-0.00369,0.14562,0.06175,0.14595,0.17752l0.005,1.76465c0.00045,0.15911-0.11147,0.35297-0.24994,0.43291 c-0.09721,0.05612-0.18163,0.04112-0.22351-0.0278c0.03214-0.00138,0.06791-0.01238,0.10562-0.03416 C29.40128,21.48497,29.51321,21.29111,29.51276,21.132z"/></g></g></g><path class="st19" d="M40.24947,9.11131c1.17997,0.68126,1.18618,1.78553,0.01388,2.4668L27.18469,19.1786 c-1.1723,0.68127-3.07907,0.68147-4.25904,0.00022L9.76142,11.57844c-1.17997-0.68126-1.18585-1.78573-0.01355-2.467 l13.07866-7.60049c1.1723-0.68127,3.07874-0.68128,4.25871-0.00002L40.24947,9.11131z"/><g><path class="st20" d="M35.13433,9.7992c0.52195,0.30135,0.52435,0.78969,0.00579,1.09105l-9.15985,5.32312 c-0.51856,0.30136-1.36164,0.30156-1.88359,0.00021l-9.21977-5.32304c-0.52195-0.30135-0.5247-0.7899-0.00614-1.09125 l9.15985-5.32312c0.51856-0.30135,1.36199-0.30136,1.88395-0.00001L35.13433,9.7992z"/></g><g><g><pattern id="SVGID_77_" patternTransform="matrix(0.05283 0 0 0.05283 -7612.17334 -7493.76416)" xlink:href="#Unnamed_Pattern_12"/><path class="st91" d="M11.57185,14.88728c0.25806,0.14899,0.46618,0.50947,0.46534,0.806 c-0.00084,0.29653-0.21033,0.4163-0.46838,0.26731c-0.25806-0.14899-0.46652-0.51006-0.46568-0.80659 C11.10397,14.85747,11.3138,14.73829,11.57185,14.88728z"/></g><g><pattern id="SVGID_78_" patternTransform="matrix(0.05283 0 0 0.05283 -7612.17334 -7493.76416)" xlink:href="#Unnamed_Pattern_12"/><path class="st92" d="M13.07633,15.75589c0.25772,0.1488,0.46618,0.50948,0.46534,0.806 c-0.00084,0.29653-0.21066,0.4161-0.46839,0.2673c-0.25805-0.14898-0.46652-0.51006-0.46568-0.80658 C12.60846,15.72608,12.81828,15.6069,13.07633,15.75589z"/></g><g><pattern id="SVGID_79_" patternTransform="matrix(0.05283 0 0 0.05283 -7612.17334 -7493.76416)" xlink:href="#Unnamed_Pattern_12"/><path class="st93" d="M14.58082,16.6245c0.25772,0.14879,0.46618,0.50948,0.46534,0.806 c-0.00084,0.29653-0.21067,0.4161-0.46839,0.2673c-0.25806-0.14899-0.46652-0.51006-0.46568-0.80658 C14.11294,16.5947,14.32276,16.47551,14.58082,16.6245z"/></g></g></g></g><polygon class="st9" points="20.82406,20.12777 17.33488,18.11319 17.33488,19.43464 20.82406,21.44913 "/></g></g></svg>\ No newline at end of filediff --git a/flowsint-app/src/renderer/public/icons/domain.svg b/flowsint-app/src/renderer/public/icons/domain.svgindex 73565442..f15f51c3 100644--- a/flowsint-app/src/renderer/public/icons/domain.svg+++ b/flowsint-app/src/renderer/public/icons/domain.svg@@ -1 +1 @@-<?xml version="1.0" ?><!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'><svg style="enable-background:new 0 0 512 512;" version="1.1" viewBox="0 0 512 512" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g><g id="_x32_0-Search"><g><path d="M243,418.801v2.936c-12.422-15.898-22.92-33-31.39-51.012h5.044c4.848,0,8.586-4.319,7.827-9.107 c-0.5-3.154-0.876-6.349-1.124-9.579c-0.316-4.126-3.751-7.314-7.89-7.314h-14.435c-8.386-24.162-13.333-49.602-14.564-75.725 H243l0,0c0,2.327,2.949,3.317,4.357,1.463c6.617-8.71,14.397-16.489,23.106-23.106c1.853-1.408,0.864-4.357-1.463-4.357h0 v-75.725h41.968c5.905,17.012,10.099,34.659,12.496,52.73c0.323,2.436,2.565,4.137,5.005,3.843 c5.473-0.658,10.905-0.929,16.356-0.832c2.773,0.049,4.936-2.351,4.584-5.101c-2.208-17.28-5.913-34.211-11.055-50.64h82.22 c12.35,22.817,20.085,48.478,21.965,75.725h-24.221c-2.869,0-4.125,3.625-1.865,5.392c6.382,4.99,12.248,10.611,17.501,16.771 c2.061,2.417,5.054,3.838,8.231,3.838h0.355c-0.068,0.987-0.147,1.972-0.233,2.954c-0.207,2.346,0.344,4.699,1.609,6.686 c5.543,8.709,9.99,18.178,13.151,28.214c0.918,2.915,5.087,2.83,5.816-0.139C466.875,290.454,469,273.47,469,256 c0-117.504-95.638-212.996-212.993-213c-0.005,0-0.009,0-0.014,0C138.538,43.004,43,138.598,43,256 c0,117.441,95.577,213,213,213c17.244,0,34.011-2.069,50.075-5.959c3.163-0.766,3.307-5.163,0.208-6.157 c-22.988-7.371-42.973-21.509-57.6-40.062C246.812,414.45,243,415.779,243,418.801z M403.569,141.275H328.85 c-10.45-24.849-24.351-48.251-41.445-69.624C334.376,79.628,375.438,105.173,403.569,141.275z M269,90.264 c12.422,15.898,22.92,33,31.39,51.012H269V90.264z M243,243h-56.532c1.231-26.122,6.178-51.563,14.564-75.725H243V243z M243,141.275h-31.39c8.47-18.012,18.968-35.113,31.39-51.012V141.275z M224.595,71.651 C207.5,93.025,193.6,116.427,183.15,141.275h-74.718C136.562,105.173,177.624,79.628,224.595,71.651z M91.425,167.275h82.22 c-7.607,24.308-12.075,49.713-13.193,75.725H69.459C71.34,215.753,79.074,190.092,91.425,167.275z M91.425,344.725 C79.074,321.908,71.34,296.247,69.459,269h90.993c1.117,26.012,5.586,51.417,13.193,75.725H91.425z M108.431,370.725h74.718 c10.45,24.849,24.351,48.251,41.446,69.624C177.624,432.372,136.562,406.827,108.431,370.725z" style="fill:#2175AA;"/><path d="M467.361,448.976l-45.452-45.452c50.243-65.298,3.515-160.53-79.122-160.53 c-55.026,0-99.793,44.767-99.793,99.792c0,82.725,95.32,129.299,160.53,79.122l45.452,45.452c5.075,5.076,13.308,5.077,18.385,0 C472.438,462.284,472.438,454.053,467.361,448.976z M268.994,342.787c0-40.689,33.104-73.792,73.793-73.792 s73.792,33.103,73.792,73.792s-33.103,73.792-73.792,73.792S268.994,383.476,268.994,342.787z" style="fill:#2175AA;"/></g></g><g id="_x31_9-Web_Page"/><g id="_x31_8-Wifi"/><g id="_x31_7-Hotspot"/><g id="_x31_6-Satelite"/><g id="_x31_5-Receiver"/><g id="_x31_4-Receiver"/><g id="_x31_3-Receiver"/><g id="_x31_2-Ethernet"/><g id="_x31_1-Code"/><g id="_x31_0-Homegroup"/><g id="_x30_9-Sharing_Option"/><g id="_x30_8-Data"/><g id="_x30_7-Connectivity"/><g id="_x30_6-Computer"/><g id="_x30_5-Laptop"/><g id="_x30_4-Mobile"/><g id="_x30_3-Network"/><g id="_x30_2-Click"/><g id="_x30_1-Website"/></g></svg>\ No newline at end of file+<?xml version="1.0" ?><svg height="20px" version="1.1" viewBox="0 0 20 20" width="20px" xmlns="http://www.w3.org/2000/svg" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns" xmlns:xlink="http://www.w3.org/1999/xlink"><title/><desc/><defs/><g fill="none" fill-rule="evenodd" id="Page-1" stroke="none" stroke-width="1"><g fill="#A6D0BF" id="Core" transform="translate(-296.000000, -296.000000)"><g id="language" transform="translate(296.000000, 296.000000)"><path d="M10,0 C4.5,0 0,4.5 0,10 C0,15.5 4.5,20 10,20 C15.5,20 20,15.5 20,10 C20,4.5 15.5,0 10,0 L10,0 Z M16.9,6 L14,6 C13.7,4.7 13.2,3.6 12.6,2.4 C14.4,3.1 16,4.3 16.9,6 L16.9,6 Z M10,2 C10.8,3.2 11.5,4.5 11.9,6 L8.1,6 C8.5,4.6 9.2,3.2 10,2 L10,2 Z M2.3,12 C2.1,11.4 2,10.7 2,10 C2,9.3 2.1,8.6 2.3,8 L5.7,8 C5.6,8.7 5.6,9.3 5.6,10 C5.6,10.7 5.7,11.3 5.7,12 L2.3,12 L2.3,12 Z M3.1,14 L6,14 C6.3,15.3 6.8,16.4 7.4,17.6 C5.6,16.9 4,15.7 3.1,14 L3.1,14 Z M6,6 L3.1,6 C4.1,4.3 5.6,3.1 7.4,2.4 C6.8,3.6 6.3,4.7 6,6 L6,6 Z M10,18 C9.2,16.8 8.5,15.5 8.1,14 L11.9,14 C11.5,15.4 10.8,16.8 10,18 L10,18 Z M12.3,12 L7.7,12 C7.6,11.3 7.5,10.7 7.5,10 C7.5,9.3 7.6,8.7 7.7,8 L12.4,8 C12.5,8.7 12.6,9.3 12.6,10 C12.6,10.7 12.4,11.3 12.3,12 L12.3,12 Z M12.6,17.6 C13.2,16.5 13.7,15.3 14,14 L16.9,14 C16,15.7 14.4,16.9 12.6,17.6 L12.6,17.6 Z M14.4,12 C14.5,11.3 14.5,10.7 14.5,10 C14.5,9.3 14.4,8.7 14.4,8 L17.8,8 C18,8.6 18.1,9.3 18.1,10 C18.1,10.7 18,11.4 17.8,12 L14.4,12 L14.4,12 Z" id="Shape"/></g></g></g></svg>\ No newline at end of filediff --git a/flowsint-app/src/renderer/public/icons/email.svg b/flowsint-app/src/renderer/public/icons/email.svgnew file mode 100644index 00000000..24497939--- /dev/null+++ b/flowsint-app/src/renderer/public/icons/email.svg@@ -0,0 +1 @@+<?xml version="1.0" ?><svg height="72" viewBox="0 0 72 72" width="72" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><path d="M36,72 L36,72 C55.882251,72 72,55.882251 72,36 L72,36 C72,16.117749 55.882251,-3.65231026e-15 36,0 L36,0 C16.117749,3.65231026e-15 -2.4348735e-15,16.117749 0,36 L0,36 C2.4348735e-15,55.882251 16.117749,72 36,72 Z" fill="#C4B9ED"/><path d="M18,26.1623226 L18,46.5476129 C18,47.6566452 18.8117419,48.5554839 19.9300645,48.5554839 L51.7447742,48.5554839 C52.8619355,48.5554839 53.6748387,47.6461935 53.6748387,46.5476129 L53.6748387,26.1623226 C53.6748387,24.9452903 52.947871,24 51.7447742,24 L19.9300645,24 C18.6805161,24 18,24.9685161 18,26.1623226 M20.9334194,27.9379355 C20.9334194,27.4467097 21.2307097,27.1656774 21.7056774,27.1656774 C21.9994839,27.1656774 33.560129,34.4910968 34.2603871,34.9207742 L36.0696774,36.0460645 C36.6433548,35.6616774 37.2193548,35.3330323 37.8139355,34.9347097 C39.0274839,34.1589677 49.8251613,27.1656774 50.1224516,27.1656774 C50.5985806,27.1656774 50.8947097,27.4467097 50.8947097,27.9379355 C50.8947097,28.4581935 49.8925161,28.9749677 49.239871,29.3732903 C45.1393548,31.8723871 41.04,34.5967742 36.980129,37.1887742 C36.7432258,37.3490323 36.2845161,37.6916129 35.9407742,37.6393548 C35.5575484,37.580129 23.7936774,30.0224516 21.6534194,28.7636129 C21.3317419,28.5743226 20.9334194,28.4012903 20.9334194,27.9379355" fill="#FFF"/></g></svg>\ No newline at end of filediff --git a/flowsint-app/src/renderer/public/icons/individual.svg b/flowsint-app/src/renderer/public/icons/individual.svgnew file mode 100644index 00000000..533d34eb--- /dev/null+++ b/flowsint-app/src/renderer/public/icons/individual.svg@@ -0,0 +1 @@+<?xml version="1.0" ?><svg style="enable-background:new 0 0 24 24;" version="1.1" viewBox="0 0 24 24" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="info"/><g id="icons"><path fill="#A9CCF4" d="M12,0C5.4,0,0,5.4,0,12c0,6.6,5.4,12,12,12s12-5.4,12-12C24,5.4,18.6,0,12,0z M12,4c2.2,0,4,2.2,4,5s-1.8,5-4,5 s-4-2.2-4-5S9.8,4,12,4z M18.6,19.5C16.9,21,14.5,22,12,22s-4.9-1-6.6-2.5c-0.4-0.4-0.5-1-0.1-1.4c1.1-1.3,2.6-2.2,4.2-2.7 c0.8,0.4,1.6,0.6,2.5,0.6s1.7-0.2,2.5-0.6c1.7,0.5,3.1,1.4,4.2,2.7C19.1,18.5,19.1,19.1,18.6,19.5z" id="user2"/></g></svg>\ No newline at end of filediff --git a/flowsint-app/src/renderer/public/icons/ip.svg b/flowsint-app/src/renderer/public/icons/ip.svgindex d4c8214e..e47b6390 100644--- a/flowsint-app/src/renderer/public/icons/ip.svg+++ b/flowsint-app/src/renderer/public/icons/ip.svg@@ -1 +1 @@-<?xml version="1.0" ?><!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'><svg enable-background="new 0 0 50 50" id="Layer_1" version="1.1" viewBox="0 0 50 50" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g><g><g><circle cx="23.53131" cy="24.50526" fill="#E7E3E6" r="23.27273"/></g><g><g><path d="M23.53148,48.50535c-13.23343,0-24-10.76657-24-24s10.76657-24,24-24s24,10.76657,24,24 S36.76491,48.50535,23.53148,48.50535z M23.53148,1.9599c-12.43182,0-22.54545,10.11364-22.54545,22.54545 S11.09966,47.0508,23.53148,47.0508s22.54546-10.11364,22.54546-22.54545S35.9633,1.9599,23.53148,1.9599z" fill="#D2D2D2"/></g><g><path d="M23.53148,48.50535c-7.79072,0-14.12879-10.76657-14.12879-24s6.33807-24,14.12879-24 c7.79025,0,14.12831,10.76657,14.12831,24S31.32173,48.50535,23.53148,48.50535z M23.53148,1.9599 c-6.98864,0-12.67424,10.11364-12.67424,22.54545S16.54285,47.0508,23.53148,47.0508 c6.98816,0,12.67377-10.11364,12.67377-22.54545S30.51965,1.9599,23.53148,1.9599z" fill="#D2D2D2"/></g><g><rect fill="#D2D2D2" height="46.54546" width="1.45455" x="22.80422" y="1.23262"/></g><g><path d="M23.53148,38.63366c-13.23343,0-24-6.33807-24-14.12831c0-7.79072,10.76657-14.12879,24-14.12879 s24,6.33807,24,14.12879C47.53148,32.2956,36.76491,38.63366,23.53148,38.63366z M23.53148,11.83111 c-12.43182,0-22.54545,5.68561-22.54545,12.67424c0,6.98816,10.11364,12.67377,22.54545,12.67377 s22.54546-5.68561,22.54546-12.67377C46.07694,17.51671,35.9633,11.83111,23.53148,11.83111z" fill="#D2D2D2"/></g><g><rect fill="#D2D2D2" height="1.45455" width="46.54546" x="0.25877" y="23.77808"/></g></g></g><circle cx="11.87878" cy="12.23212" fill="#85BD57" r="3.48329"/><circle cx="35.21399" cy="13.26819" fill="#EC6E62" r="3.48329"/><circle cx="11.87878" cy="35.74246" fill="#FFC966" r="3.48329"/><circle cx="37.36362" cy="36.3898" fill="#53B1E2" r="13.10485"/><g><g><path d="M31.24161,30.97248h1.8282v10.83464h-1.8282V30.97248z" fill="#FFFFFF"/><path d="M43.36961,31.91769c0.75348,0.6307,1.1319,1.60199,1.1319,2.91469 c0,1.31186-0.38515,2.27306-1.15545,2.88274c-0.7703,0.60968-1.95097,0.9141-3.54203,0.9141h-1.92238v3.17791h-1.8282V30.97248 h3.72031C41.41695,30.97248,42.61445,31.28783,43.36961,31.91769z M42.07457,36.3898 c0.36665-0.38767,0.55165-0.9553,0.55165-1.70542c0-0.74844-0.23378-1.27822-0.69798-1.58853 c-0.46588-0.30946-1.19413-0.46504-2.18644-0.46504h-1.86015v4.34008h2.12421 C41.01835,36.97089,41.70792,36.77747,42.07457,36.3898z" fill="#FFFFFF"/></g></g></g></svg>\ No newline at end of file+<?xml version="1.0" ?><svg height="24" id="svg8" version="1.1" viewBox="0 0 6.3499998 6.3499998" width="24" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg"><defs id="defs2"/><path d="m 3.1757812,0.26367184 c -1.1658682,6e-8 -2.1171876,0.95131916 -2.1171874,2.11718746 0,0.7849302 0.4969305,1.652624 0.9707031,2.3632813 0.4737725,0.7106571 0.9472656,1.2499999 0.9472656,1.2499999 a 0.26460981,0.26460981 0 0 0 0.3847656,0.013671 c 0,0 0.4797541,-0.4783338 0.9570312,-1.1601563 0.4772771,-0.6818225 0.9726562,-1.5701539 0.9726562,-2.4667968 0,-1.1658672 -0.949366,-2.11718646 -2.1152343,-2.11718656 z m 0,0.52929688 c 0.8798855,0 1.5859378,0.70800518 1.5859378,1.58789058 0,0.690856 -0.4281893,1.5229726 -0.8769533,2.1640625 C 3.534083,5.0458955 3.3198241,5.2510111 3.1835938,5.3945312 3.0487931,5.2346961 2.8256176,4.986472 2.46875,4.4511718 2.0164815,3.7727706 1.5878907,2.9188448 1.5878906,2.3808593 1.5878905,1.5009739 2.2958959,0.79296877 3.1757812,0.79296872 Z" id="path1992" style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#F0C19E;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.5291667;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:markers fill stroke;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"/><path d="m 3.1757812,1.3222655 c -0.5813668,10e-8 -1.0585937,0.4772269 -1.0585937,1.0585938 0,0.5813669 0.4772269,1.0585937 1.0585937,1.0585937 0.581367,0 1.0566407,-0.4772268 1.0566407,-1.0585937 0,-0.5813669 -0.4752737,-1.0585938 -1.0566407,-1.0585938 z m 0,0.5292969 c 0.295384,0 0.529297,0.2339129 0.529297,0.5292969 0,0.295384 -0.233913,0.5292969 -0.529297,0.5292969 -0.2953839,0 -0.5292968,-0.233913 -0.5292968,-0.5292969 0,-0.295384 0.2339129,-0.5292969 0.5292968,-0.5292969 z" id="path1995" style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#F0C19E;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.5291667;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:markers fill stroke;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"/></svg>\ No newline at end of filediff --git a/flowsint-app/src/renderer/public/icons/organization.svg b/flowsint-app/src/renderer/public/icons/organization.svgnew file mode 100644index 00000000..bc4ca3a9--- /dev/null+++ b/flowsint-app/src/renderer/public/icons/organization.svg@@ -0,0 +1 @@+<?xml version="1.0" ?><svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title/><g id="office"><path fill="#D1C0AF" d="M12.5,13h-1a1,1,0,0,0,0,2h1A1,1,0,0,0,12.5,13Z"/><path fill="#D1C0AF" d="M12.5,9h-1a1,1,0,0,0,0,2h1A1,1,0,0,0,12.5,9Z"/><path fill="#D1C0AF" d="M12.5,5h-1a1,1,0,0,0,0,2h1A1,1,0,0,0,12.5,5Z"/><path fill="#D1C0AF" d="M8.5,13h-1a1,1,0,0,0,0,2h1A1,1,0,0,0,8.5,13Z"/><path fill="#D1C0AF" d="M8.5,9h-1a1,1,0,0,0,0,2h1A1,1,0,0,0,8.5,9Z"/><path fill="#D1C0AF" d="M8.5,5h-1a1,1,0,0,0,0,2h1A1,1,0,0,0,8.5,5Z"/><path fill="#D1C0AF" d="M16.5,13h-1a1,1,0,0,0,0,2h1A1,1,0,0,0,16.5,13Z"/><path fill="#D1C0AF" d="M16.5,9h-1a1,1,0,0,0,0,2h1A1,1,0,0,0,16.5,9Z"/><path fill="#D1C0AF" d="M16.5,5h-1a1,1,0,0,0,0,2h1A1,1,0,0,0,16.5,5Z"/><path fill="#D1C0AF" d="M22,21H21V2a1,1,0,0,0-1-1H4A1,1,0,0,0,3,2V21H2a1,1,0,0,0,0,2H22A1,1,0,0,0,22,21ZM10,21V19h4v2Zm6,0V18a1,1,0,0,0-1-1H9a1,1,0,0,0-1,1v3H5V3H19V21Z"/></g></svg>\ No newline at end of filediff --git a/flowsint-app/src/renderer/public/icons/siren.svg b/flowsint-app/src/renderer/public/icons/siren.svgnew file mode 100644index 00000000..f0ea709e--- /dev/null+++ b/flowsint-app/src/renderer/public/icons/siren.svg@@ -0,0 +1 @@+<?xml version="1.0" ?><svg height="24" version="1.1" width="24" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><g transform="translate(0 -1028.4)"><path d="m22 12a10 10 0 1 1 -20 0 10 10 0 1 1 20 0z" fill="#9FAAB8" transform="translate(0 1029.4)"/><path d="m22 12a10 10 0 1 1 -20 0 10 10 0 1 1 20 0z" fill="#9FAAB8" transform="translate(0 1028.4)"/><path d="m11 1035.4v2h2v-2h-2zm-1 4-1 1h2v6h-2v1h1 4 1v-1h-2v-7h-3z" fill="#9FAAB8"/><path d="m11 6v2h2v-2h-2zm-1 4l-1 1h2v6h-2v1h1 4 1v-1h-2v-7h-3z" fill="#ecf0f1" transform="translate(0 1028.4)"/></g></svg>\ No newline at end of filediff --git a/flowsint-app/src/renderer/public/icons/siret.svg b/flowsint-app/src/renderer/public/icons/siret.svgnew file mode 100644index 00000000..d867dfca--- /dev/null+++ b/flowsint-app/src/renderer/public/icons/siret.svg@@ -0,0 +1 @@+<?xml version="1.0" ?><svg height="24" version="1.1" width="24" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><g transform="translate(0 -1028.4)"><path d="m22 12a10 10 0 1 1 -20 0 10 10 0 1 1 20 0z" fill="#ADB9C6" transform="translate(0 1029.4)"/><path d="m22 12a10 10 0 1 1 -20 0 10 10 0 1 1 20 0z" fill="#ADB9C6" transform="translate(0 1028.4)"/><path d="m11 1035.4v2h2v-2h-2zm-1 4-1 1h2v6h-2v1h1 4 1v-1h-2v-7h-3z" fill="#ADB9C6"/><path d="m11 6v2h2v-2h-2zm-1 4l-1 1h2v6h-2v1h1 4 1v-1h-2v-7h-3z" fill="#ecf0f1" transform="translate(0 1028.4)"/></g></svg>\ No newline at end of filediff --git a/flowsint-app/src/renderer/public/icons/subdomain.svg b/flowsint-app/src/renderer/public/icons/subdomain.svgnew file mode 100644index 00000000..ca4b9260--- /dev/null+++ b/flowsint-app/src/renderer/public/icons/subdomain.svg@@ -0,0 +1 @@+<?xml version="1.0" ?><svg height="20px" version="1.1" viewBox="0 0 20 20" width="20px" xmlns="http://www.w3.org/2000/svg" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns" xmlns:xlink="http://www.w3.org/1999/xlink"><title/><desc/><defs/><g fill="none" fill-rule="evenodd" id="Page-1" stroke="none" stroke-width="1"><g fill="#9DCBE4" id="Core" transform="translate(-296.000000, -296.000000)"><g id="language" transform="translate(296.000000, 296.000000)"><path d="M10,0 C4.5,0 0,4.5 0,10 C0,15.5 4.5,20 10,20 C15.5,20 20,15.5 20,10 C20,4.5 15.5,0 10,0 L10,0 Z M16.9,6 L14,6 C13.7,4.7 13.2,3.6 12.6,2.4 C14.4,3.1 16,4.3 16.9,6 L16.9,6 Z M10,2 C10.8,3.2 11.5,4.5 11.9,6 L8.1,6 C8.5,4.6 9.2,3.2 10,2 L10,2 Z M2.3,12 C2.1,11.4 2,10.7 2,10 C2,9.3 2.1,8.6 2.3,8 L5.7,8 C5.6,8.7 5.6,9.3 5.6,10 C5.6,10.7 5.7,11.3 5.7,12 L2.3,12 L2.3,12 Z M3.1,14 L6,14 C6.3,15.3 6.8,16.4 7.4,17.6 C5.6,16.9 4,15.7 3.1,14 L3.1,14 Z M6,6 L3.1,6 C4.1,4.3 5.6,3.1 7.4,2.4 C6.8,3.6 6.3,4.7 6,6 L6,6 Z M10,18 C9.2,16.8 8.5,15.5 8.1,14 L11.9,14 C11.5,15.4 10.8,16.8 10,18 L10,18 Z M12.3,12 L7.7,12 C7.6,11.3 7.5,10.7 7.5,10 C7.5,9.3 7.6,8.7 7.7,8 L12.4,8 C12.5,8.7 12.6,9.3 12.6,10 C12.6,10.7 12.4,11.3 12.3,12 L12.3,12 Z M12.6,17.6 C13.2,16.5 13.7,15.3 14,14 L16.9,14 C16,15.7 14.4,16.9 12.6,17.6 L12.6,17.6 Z M14.4,12 C14.5,11.3 14.5,10.7 14.5,10 C14.5,9.3 14.4,8.7 14.4,8 L17.8,8 C18,8.6 18.1,9.3 18.1,10 C18.1,10.7 18,11.4 17.8,12 L14.4,12 L14.4,12 Z" id="Shape"/></g></g></g></svg>\ No newline at end of filediff --git a/flowsint-app/src/renderer/public/icons/username.svg b/flowsint-app/src/renderer/public/icons/username.svgnew file mode 100644index 00000000..8256617b--- /dev/null+++ b/flowsint-app/src/renderer/public/icons/username.svg@@ -0,0 +1 @@+<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="#C7BEE4" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-user-check-icon lucide-user-check"><path d="m16 11 2 2 4-4"/><path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"/><circle cx="9" cy="7" r="4"/></svg>\ No newline at end of filediff --git a/flowsint-app/src/renderer/public/icons/wallet.svg b/flowsint-app/src/renderer/public/icons/wallet.svgindex a7b7f3d5..0ea60348 100644--- a/flowsint-app/src/renderer/public/icons/wallet.svg+++ b/flowsint-app/src/renderer/public/icons/wallet.svg@@ -1 +1 @@-<?xml version="1.0" ?><svg data-name="Layer 1" id="Layer_1" viewBox="0 0 128 128" xmlns="http://www.w3.org/2000/svg"><title/><path d="M68.56,52.68c-2.82-.7-5.39-1.31-5.39-1.31l-2.1,8.73s2.89.74,5.59,1.35a5.07,5.07,0,0,0,6.26-3.77C73.4,55.32,71.25,53.34,68.56,52.68Z"/><path d="M64,23.75A40.25,40.25,0,1,0,104.24,64,40.24,40.24,0,0,0,64,23.75ZM80.27,70.17c1.65,5.56-3.42,14.14-13.66,11.68l-2-.48-1.78,7.37-4.33-1,1.77-7.37-3.86-.93-1.77,7.37-4.34-1,1.78-7.37-9.52-2.29,2.36-4.93,3.73.9A1.43,1.43,0,0,0,50.4,71l5-20.82a1.29,1.29,0,0,0-.95-1.56l-4-1,1.17-4.85,8.55,2.06,1.7-7,4.33,1.05-1.69,7,3.86.93,1.69-7,4.34,1-1.7,7c6,2.16,8.41,5.56,8.51,10a6.59,6.59,0,0,1-5.53,7S79.26,66.76,80.27,70.17Z"/><path d="M66.66,66.15l-6.75-1.64-2.23,9.68s3.57.92,6.36,1.54c3.78.83,6.66-.3,7.37-3.41S69.52,66.83,66.66,66.15Z"/><path d="M99.23,90.47a44,44,0,0,1-29.9,17.26l-11.85,6.84A51.86,51.86,0,0,0,64,115a51,51,0,0,0,47.08-31.38Z"/><path d="M106.65,52.9a44.53,44.53,0,0,1,.95,4.76L114,54c-.32-1.57-.71-3.12-1.16-4.64Z"/><path d="M103.13,43.75a44.53,44.53,0,0,1,2,4.39l6.07-3.51q-.92-2.24-2-4.36Z"/><path d="M80.78,23.25a45.13,45.13,0,0,1,5.08,2.5l6.8-3.93A49.39,49.39,0,0,0,88.08,19Z"/><path d="M20.34,58.15,13,62.36c0,.55,0,1.09,0,1.64,0,1.25.06,2.49.15,3.72l6.79-3.92A43.94,43.94,0,0,1,20.34,58.15Z"/><path d="M66.86,20a44.9,44.9,0,0,1,7.67,1.17l8.11-4.68a50.26,50.26,0,0,0-6.23-2Z"/><path d="M108.06,64a46,46,0,0,1-.27,4.86L115,64.7c0-.23,0-.46,0-.7,0-1.63-.08-3.24-.23-4.83L108,63.06C108,63.37,108.06,63.68,108.06,64Z"/><path d="M33.08,95.38,26.88,99c1.1,1.16,2.24,2.27,3.44,3.32l6.4-3.69A46.39,46.39,0,0,1,33.08,95.38Z"/><path d="M94.21,31.94l6.24-3.6Q98.74,26.6,96.88,25l-6.44,3.72A44.12,44.12,0,0,1,94.21,31.94Z"/><path d="M97.67,35.59a43.66,43.66,0,0,1,3,3.94l6-3.47c-.91-1.38-1.87-2.71-2.9-4Z"/><path d="M114.56,70.6l-7.93,4.58a43,43,0,0,1-2.38,6.73l9.17-5.29A50,50,0,0,0,114.56,70.6Z"/><path d="M46.31,104.35a43.37,43.37,0,0,1-5.16-2.67l-6.71,3.87a50.37,50.37,0,0,0,4.67,3Z"/><path d="M59.38,107.82a43.7,43.7,0,0,1-7-1.32l-8,4.6a50.54,50.54,0,0,0,5.82,2Z"/><path d="M30.52,35.38A44,44,0,0,1,56,20.68l12.89-7.44Q66.46,13,64,13A51,51,0,0,0,17.6,42.83Z"/><path d="M21.12,74.14a46.32,46.32,0,0,1-.86-4.87L13.81,73a47.36,47.36,0,0,0,1.08,4.75Z"/><path d="M13.57,56.41l8.12-4.69a43.91,43.91,0,0,1,2.79-7.21L15,50A50.21,50.21,0,0,0,13.57,56.41Z"/><path d="M29.72,91.67a45.06,45.06,0,0,1-2.82-3.91l-6,3.47q1.29,2,2.76,3.94Z"/><path d="M24.49,83.5A42.42,42.42,0,0,1,22.55,79l-6.08,3.52a48.69,48.69,0,0,0,2,4.49Z"/></svg>\ No newline at end of file+<?xml version="1.0" ?><svg data-name="Layer 1" id="Layer_1" viewBox="0 0 128 128" xmlns="http://www.w3.org/2000/svg"><title/><path fill="#F7D154" d="M68.56,52.68c-2.82-.7-5.39-1.31-5.39-1.31l-2.1,8.73s2.89.74,5.59,1.35a5.07,5.07,0,0,0,6.26-3.77C73.4,55.32,71.25,53.34,68.56,52.68Z"/><path fill="#F7D154" d="M64,23.75A40.25,40.25,0,1,0,104.24,64,40.24,40.24,0,0,0,64,23.75ZM80.27,70.17c1.65,5.56-3.42,14.14-13.66,11.68l-2-.48-1.78,7.37-4.33-1,1.77-7.37-3.86-.93-1.77,7.37-4.34-1,1.78-7.37-9.52-2.29,2.36-4.93,3.73.9A1.43,1.43,0,0,0,50.4,71l5-20.82a1.29,1.29,0,0,0-.95-1.56l-4-1,1.17-4.85,8.55,2.06,1.7-7,4.33,1.05-1.69,7,3.86.93,1.69-7,4.34,1-1.7,7c6,2.16,8.41,5.56,8.51,10a6.59,6.59,0,0,1-5.53,7S79.26,66.76,80.27,70.17Z"/><path fill="#F7D154" d="M66.66,66.15l-6.75-1.64-2.23,9.68s3.57.92,6.36,1.54c3.78.83,6.66-.3,7.37-3.41S69.52,66.83,66.66,66.15Z"/><path fill="#F7D154" d="M99.23,90.47a44,44,0,0,1-29.9,17.26l-11.85,6.84A51.86,51.86,0,0,0,64,115a51,51,0,0,0,47.08-31.38Z"/><path fill="#F7D154" d="M106.65,52.9a44.53,44.53,0,0,1,.95,4.76L114,54c-.32-1.57-.71-3.12-1.16-4.64Z"/><path fill="#F7D154" d="M103.13,43.75a44.53,44.53,0,0,1,2,4.39l6.07-3.51q-.92-2.24-2-4.36Z"/><path fill="#F7D154" d="M80.78,23.25a45.13,45.13,0,0,1,5.08,2.5l6.8-3.93A49.39,49.39,0,0,0,88.08,19Z"/><path fill="#F7D154" d="M20.34,58.15,13,62.36c0,.55,0,1.09,0,1.64,0,1.25.06,2.49.15,3.72l6.79-3.92A43.94,43.94,0,0,1,20.34,58.15Z"/><path fill="#F7D154" d="M66.86,20a44.9,44.9,0,0,1,7.67,1.17l8.11-4.68a50.26,50.26,0,0,0-6.23-2Z"/><path fill="#F7D154" d="M108.06,64a46,46,0,0,1-.27,4.86L115,64.7c0-.23,0-.46,0-.7,0-1.63-.08-3.24-.23-4.83L108,63.06C108,63.37,108.06,63.68,108.06,64Z"/><path fill="#F7D154" d="M33.08,95.38,26.88,99c1.1,1.16,2.24,2.27,3.44,3.32l6.4-3.69A46.39,46.39,0,0,1,33.08,95.38Z"/><path fill="#F7D154" d="M94.21,31.94l6.24-3.6Q98.74,26.6,96.88,25l-6.44,3.72A44.12,44.12,0,0,1,94.21,31.94Z"/><path fill="#F7D154" d="M97.67,35.59a43.66,43.66,0,0,1,3,3.94l6-3.47c-.91-1.38-1.87-2.71-2.9-4Z"/><path fill="#F7D154" d="M114.56,70.6l-7.93,4.58a43,43,0,0,1-2.38,6.73l9.17-5.29A50,50,0,0,0,114.56,70.6Z"/><path fill="#F7D154" d="M46.31,104.35a43.37,43.37,0,0,1-5.16-2.67l-6.71,3.87a50.37,50.37,0,0,0,4.67,3Z"/><path fill="#F7D154" d="M59.38,107.82a43.7,43.7,0,0,1-7-1.32l-8,4.6a50.54,50.54,0,0,0,5.82,2Z"/><path fill="#F7D154" d="M30.52,35.38A44,44,0,0,1,56,20.68l12.89-7.44Q66.46,13,64,13A51,51,0,0,0,17.6,42.83Z"/><path fill="#F7D154" d="M21.12,74.14a46.32,46.32,0,0,1-.86-4.87L13.81,73a47.36,47.36,0,0,0,1.08,4.75Z"/><path fill="#F7D154" d="M13.57,56.41l8.12-4.69a43.91,43.91,0,0,1,2.79-7.21L15,50A50.21,50.21,0,0,0,13.57,56.41Z"/><path fill="#F7D154" d="M29.72,91.67a45.06,45.06,0,0,1-2.82-3.91l-6,3.47q1.29,2,2.76,3.94Z"/><path fill="#F7D154" d="M24.49,83.5A42.42,42.42,0,0,1,22.55,79l-6.08,3.52a48.69,48.69,0,0,0,2,4.49Z"/></svg>\ No newline at end of filediff --git a/flowsint-app/src/renderer/public/icons/website.svg b/flowsint-app/src/renderer/public/icons/website.svgnew file mode 100644index 00000000..f3f85403--- /dev/null+++ b/flowsint-app/src/renderer/public/icons/website.svg@@ -0,0 +1,23 @@+<?xml version="1.0" ?><svg id="Layer_1" style="enable-background:new 0 0 50 50;" version="1.1" viewBox="0 0 50 50" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><style type="text/css">+ .st0{fill:#E7B8D2;}+ .st1{fill:#E7B8D2;}+ .st2{fill:#FFFFFF;}+ .st3{fill:#E7B8D2;}+ .st4{fill:#E7B8D2;}+ .st5{fill:#E7B8D2;}+ .st6{fill:#E7B8D2;}+ .st7{fill:#E7B8D2;}+ .st8{enable-background:new ;}+ .st9{fill:#E7B8D2;}+ .st10{fill:url(#);}+ .st11{fill:#E7B8D2;}+ .st12{fill:#E7B8D2;}+ .st13{fill:#E7B8D2;}+ .st14{fill:#E7B8D2;}+ .st15{fill:#E7B8D2;}+ .st16{fill:#E7B8D2;}+ .st17{fill:#E7B8D2;}+ .st18{opacity:0.3;}+ .st19{opacity:0.3;fill:#E7B8D2;}+ .st20{opacity:0.2;}+</style><g><g><path class="st7" d="M41.03586,1.08364c-0.22511-0.13083-0.53674-0.11255-0.88039,0.08585L8.15094,19.64732 c-0.68569,0.39588-1.23857,1.3535-1.23633,2.1382l0.06643,25.39545c0.00109,0.38943,0.13872,0.6637,0.36087,0.79283 l1.62189,0.94253c-0.22218-0.1291-0.35978-0.40337-0.3609-0.79284L8.53646,22.72805 c-0.00221-0.78471,0.55067-1.74232,1.23636-2.1382L41.77736,2.11202c0.34365-0.19841,0.65528-0.21666,0.88039-0.08585 L41.03586,1.08364z"/><g><path class="st4" d="M41.77735,2.11203c0.68291-0.39428,1.2394-0.07715,1.24162,0.70756l0.06642,25.39545 c0.00222,0.78472-0.55066,1.74233-1.23356,2.13661L9.84731,48.82948c-0.68569,0.39589-1.24218,0.07876-1.24441-0.70596 L8.53648,22.72807c-0.00222-0.78472,0.55065-1.74233,1.23635-2.13822L41.77735,2.11203z"/></g><g><g><polygon class="st2" points="41.48254,6.74696 41.53741,28.75269 10.15168,46.87325 10.0968,24.86752 "/></g></g><g><g><path class="st13" d="M36.77227,6.72606c0.35073-0.20249,0.63628-0.03976,0.63742,0.36325 c0.00114,0.40301-0.28256,0.89228-0.63329,1.09478c-0.34889,0.20143-0.63444,0.04081-0.63558-0.3622 C36.13968,7.41888,36.42338,6.9275,36.77227,6.72606z"/></g><g><path class="st13" d="M40.84512,4.37507c0.35073-0.20249,0.63628-0.03976,0.63742,0.36325 c0.00114,0.40301-0.28256,0.89228-0.63329,1.09478c-0.34889,0.20143-0.63444,0.04081-0.63558-0.3622 C40.21253,5.06789,40.49622,4.5765,40.84512,4.37507z"/></g><g><path class="st13" d="M38.80869,5.55033c0.35073-0.20249,0.63628-0.03976,0.63742,0.36325 c0.00114,0.40301-0.28256,0.89228-0.63329,1.09478c-0.35073,0.20249-0.63444,0.04081-0.63558-0.3622 C38.17611,6.24315,38.45797,5.75283,38.80869,5.55033z"/></g></g></g><g><g><path class="st13" d="M29.15597,27.54902l9.14851-5.28189c0.34112-0.19694,0.65051-0.21527,0.87414-0.08529l1.22299,0.71072 c-0.22363-0.12996-0.533-0.11166-0.87414,0.08529l-9.14848,5.28189c-0.6786,0.39179-1.22799,1.34336-1.22577,2.12631 l0.02981,10.50913c0.00109,0.38935,0.1384,0.66301,0.35962,0.79158l-1.22299-0.71075 c-0.22125-0.12855-0.35854-0.40223-0.35965-0.79158l-0.02979-10.50913C27.928,28.89238,28.47739,27.94079,29.15597,27.54902z"/><g><path class="st0" d="M30.37898,28.25976c-0.67859,0.39178-1.22798,1.34336-1.22576,2.12629l0.02979,10.50914 c0.00222,0.78294,0.5552,1.09806,1.23379,0.70628l9.14849-5.28188c0.67859-0.39179,1.22797-1.34336,1.22575-2.12629 l-0.02979-10.50914c-0.00222-0.78293-0.55519-1.09806-1.23379-0.70627L30.37898,28.25976z"/></g><g><g><path class="st1" d="M39.6567,25.51173l0.0748-0.04318l0.02306,8.13488l-0.0748,0.04318 c-0.63704,0.36779-1.1533,1.26198-1.15122,1.994l0.00025,0.08911l-7.07948,4.08733l-0.00025-0.08911 c-0.00208-0.73202-0.52171-1.02813-1.15876-0.66032l-0.07754,0.04477l-0.02306-8.13488l0.07753-0.04476 c0.63705-0.3678,1.15331-1.262,1.15124-1.99401l-0.00025-0.08911l7.07948-4.08734l0.00025,0.08911 C38.50003,25.58339,39.01967,25.87952,39.6567,25.51173z M39.60173,33.51951l-0.02208-7.78797 c-0.65933,0.33604-1.19286,0.032-1.23378-0.70309l-6.77759,3.91304c-0.03662,0.77985-0.56391,1.69636-1.223,2.12151 l0.02208,7.78797c0.65933-0.33923,1.19008-0.03358,1.231,0.70151l6.77759-3.91304 C38.41258,34.85958,38.94265,33.94147,39.60173,33.51951"/></g><g><polygon class="st1" points="35.70823,33.39024 35.70981,33.80465 31.24497,36.38242 31.24339,35.96802 "/></g><g><polygon class="st1" points="38.70396,29.30164 38.70554,29.71604 31.23829,34.02726 31.23671,33.61285 "/></g><g><polygon class="st1" points="38.7073,30.47922 38.70888,30.89362 31.24163,35.20484 31.24005,34.79044 "/></g><g><polygon class="st11" points="38.54985,26.73585 38.55231,27.60471 31.37587,31.74803 31.37341,30.87917 "/></g></g></g><g><g><g class="st8"><g><polygon class="st11" points="35.45541,41.45153 35.7286,42.18804 35.98616,42.3377 35.71298,41.60122 "/><polygon class="st11" points="36.72927,39.37043 36.4717,39.22075 37.22649,41.32322 37.48404,41.4729 "/><polygon class="st11" points="37.13496,37.41726 35.79807,38.18911 34.71463,42.28473 34.97217,42.43439 36.05562,38.3388 37.39253,37.56694 "/></g><g><polygon class="st9" points="37.39252,37.56694 38.49058,40.40305 37.74982,40.42524 37.48404,41.47291 36.72926,39.37043 35.98615,42.33772 35.71297,41.60121 34.97218,42.43439 36.05562,38.3388 "/></g></g></g><g><g class="st8"><g><path class="st7" d="M34.3113,38.3304c0,0.59265,0.20918,1.01096,0.54828,1.20745l0.44684,0.25988 c-0.3391-0.19649-0.54826-0.61482-0.54826-1.20745c-0.00317-1.19793,0.83664-2.65575,1.87931-3.25788 c0.5229-0.30107,0.99827-0.32961,1.34055-0.12994l-0.44684-0.25988c-0.34227-0.19964-0.81765-0.17113-1.34056,0.12995 C35.14796,35.67466,34.30813,37.13247,34.3113,38.3304z"/></g><g><ellipse class="st4" cx="36.64311" cy="37.49996" rx="2.65829" ry="1.53976" transform="matrix(0.50245 -0.8646 0.8646 0.50245 -14.19097 50.33978)"/></g><g><polygon class="st2" points="36.72935,36.23273 37.05263,36.7936 37.77025,36.49839 37.221,37.43443 37.52775,38.13334 36.79332,38.04338 36.09522,38.87015 36.21601,37.97896 35.69514,37.69646 36.41208,37.16342 "/></g></g></g></g></g><path class="st11" d="M37.72798,13.10737c-0.00161-0.56551-0.40443-0.80254-0.90308-0.51462L13.16276,26.25409 c-0.49215,0.28415-0.89874,0.98844-0.89719,1.55401l0.00644,3.28377c0.00161,0.5655,0.41093,0.79883,0.90308,0.51462 l23.66215-13.66134c0.49865-0.28786,0.8988-0.98844,0.89719-1.55401L37.72798,13.10737z M13.1739,31.1898 c-0.29789,0.17197-0.53827,0.03498-0.53926-0.3073l-0.00644-3.28377c-0.00099-0.34227,0.23784-0.75593,0.53579-0.92796 L32.9276,15.26025l0.0099,4.51897L13.1739,31.1898z"/><g><path class="st2" d="M36.14058,16.08666l0.90928,0.51665l-0.42388,0.7342l-0.90821-0.51851 c-0.17317,0.21329-0.36695,0.38186-0.56084,0.4938c-0.28985,0.16735-0.57987,0.20803-0.80103,0.08199 c-0.44294-0.25241-0.44529-1.07928-0.00522-1.84151c0.22003-0.3811,0.50994-0.67552,0.80022-0.84311 c0.29028-0.16759,0.58091-0.20835,0.80238-0.08215C36.32346,14.83774,36.3848,15.44747,36.14058,16.08666z M35.71422,16.33033 c0.30632-0.53057,0.30469-1.10502-0.00363-1.28073c-0.15416-0.08785-0.35623-0.05961-0.55803,0.0569 c-0.20181,0.11652-0.40338,0.32131-0.55653,0.58659c-0.30632,0.53057-0.30469,1.10502,0.00363,1.28073 c0.15416,0.08785,0.35622,0.05962,0.55803-0.0569C35.35949,16.80041,35.56106,16.5956,35.71422,16.33033"/></g><g><g><polygon class="st6" points="17.91143,39.04858 17.90199,35.72433 13.15454,38.46529 13.16398,41.78953 "/></g><g><polygon class="st11" points="24.43196,35.28393 24.42252,31.95969 19.67507,34.70064 19.68451,38.02488 "/></g></g></g></svg>\ No newline at end of filediff --git a/flowsint-app/src/renderer/src/api/auth-service.ts b/flowsint-app/src/renderer/src/api/auth-service.tsindex e63227a9..531efcea 100644--- a/flowsint-app/src/renderer/src/api/auth-service.ts+++ b/flowsint-app/src/renderer/src/api/auth-service.ts@@ -1,6 +1,6 @@import { useAuthStore } from '@/stores/auth-store';import { fetchWithAuth } from './api';-import { useBoundStore } from '@/stores/useBoundStore';+import { useBoundStore } from '@/stores/use-bound-store';interface RegisterData {username: string;diff --git a/flowsint-app/src/renderer/src/api/log-service.ts b/flowsint-app/src/renderer/src/api/log-service.tsindex 69deb2fc..7daeef0e 100644--- a/flowsint-app/src/renderer/src/api/log-service.ts+++ b/flowsint-app/src/renderer/src/api/log-service.ts@@ -3,12 +3,12 @@ import { fetchWithAuth } from './api';export const logService = {get: async (sketch_id: string): Promise<any> => {- return fetchWithAuth(`/api/logs/sketch/${sketch_id}`, {+ return fetchWithAuth(`/api/events/sketch/${sketch_id}/logs`, {method: 'GET',});},delete: async (sketch_id: string): Promise<any> => {- return fetchWithAuth(`/api/logs/sketch/${sketch_id}`, {+ return fetchWithAuth(`/api/events/sketch/${sketch_id}/logs`, {method: 'DELETE',});},diff --git a/flowsint-app/src/renderer/src/components/analyses/README.md b/flowsint-app/src/renderer/src/components/analyses/README.mdnew file mode 100644index 00000000..2bf0f862--- /dev/null+++ b/flowsint-app/src/renderer/src/components/analyses/README.md@@ -0,0 +1,141 @@+# Analysis Components Architecture++This directory contains the refactored analysis components that provide reusable functionality for editing analyses.++## Components++### `AnalysisEditor` (Core Component)+The main reusable component that contains all analysis editing logic.++**Props:**+- `analysis: Analysis | null` - The current analysis to edit+- `investigationId: string` - The investigation ID+- `onAnalysisUpdate?: (analysis: Analysis) => void` - Callback when analysis is updated+- `onAnalysisDelete?: (analysisId: string) => void` - Callback when analysis is deleted+- `onAnalysisCreate?: (investigationId: string) => void` - Callback when new analysis is created+- `onAnalysisSelect?: (analysisId: string) => void` - Callback when analysis is selected from dropdown+- `showHeader?: boolean` - Whether to show the header (default: true)+- `showActions?: boolean` - Whether to show action buttons (default: true)+- `showAnalysisSelector?: boolean` - Whether to show analysis dropdown selector (default: false)+- `showNavigation?: boolean` - Whether to show navigation button (default: false)+- `className?: string` - Additional CSS classes+- `isLoading?: boolean` - Loading state+- `isRefetching?: boolean` - Refetching state+- `analyses?: Analysis[]` - List of analyses for selector dropdown+- `currentAnalysisId?: string | null` - Current analysis ID for selector++**Features:**+- Rich text editing with TipTap+- AI prompt integration with context+- Save/delete/create operations+- Keyboard shortcuts (Ctrl+S to save, Ctrl+E for AI prompt)+- Title editing+- Analysis selector dropdown+- Navigation controls+- External link to full page+- Context-aware AI prompts++### `AnalysisPanel` (Panel Component)+A panel component that uses `AnalysisEditor` with analysis selection functionality.++**Features:**+- Analysis selector dropdown+- Integration with analysis panel store+- Navigation to full-page view+- All original action buttons (Save, AI Chat, New Analysis, Delete, Open in Page)++### `AnalysisPage` (Full Page Component)+A full-page component that uses `AnalysisEditor` for dedicated analysis editing.++**Features:**+- Full-page layout+- Navigation controls+- All editing functionality++## Usage Examples++### Using AnalysisEditor as a disposable component:++```tsx+import { AnalysisEditor } from "@/components/analyses/analysis-editor"++// Basic usage+<AnalysisEditor+ analysis={currentAnalysis}+ investigationId={investigationId}+ onAnalysisUpdate={handleUpdate}+ onAnalysisDelete={handleDelete}+ onAnalysisCreate={handleCreate}+/>++// With analysis selector+<AnalysisEditor+ analysis={currentAnalysis}+ investigationId={investigationId}+ onAnalysisUpdate={handleUpdate}+ onAnalysisDelete={handleDelete}+ onAnalysisCreate={handleCreate}+ onAnalysisSelect={handleSelect}+ showAnalysisSelector={true}+ showNavigation={true}+ analyses={analyses}+ currentAnalysisId={currentAnalysisId}+/>++// Minimal usage without header+<AnalysisEditor+ analysis={analysis}+ investigationId={investigationId}+ showHeader={false}+ showActions={false}+ className="border rounded-lg"+/>+```++### Using AnalysisPanel in a layout:++```tsx+import AnalysisPanel from "@/components/analyses/notes-panel"++// In a layout component+<AnalysisPanel />+```++### Using AnalysisPage in a route:++```tsx+import { AnalysisPage } from "@/components/analyses/analysis-page"++// In a route component+<AnalysisPage />+```++## Action Buttons++The `AnalysisEditor` includes all the original action buttons:++- **Save** (💾) - Save the current analysis+- **AI Chat** (✨) - Open AI prompt panel+- **New Analysis** (➕) - Create a new analysis+- **Delete** (🗑️) - Delete the current analysis+- **Open in Page** (🔗) - Open analysis in full page view++## Architecture Benefits++1. **Reusability**: The core `AnalysisEditor` can be used in any context+2. **Separation of Concerns**: UI logic is separated from routing logic+3. **Minimal Code Rewriting**: Existing functionality is preserved+4. **Flexibility**: Components can be customized via props+5. **Consistency**: All analysis editing uses the same core component+6. **Complete Functionality**: All original features are maintained++## Migration Notes++The existing `AnalysisPanel` has been refactored to use the new `AnalysisEditor` component. All original functionality including:+- Analysis selector dropdown+- All action buttons (Save, AI Chat, New Analysis, Delete, Open in Page)+- Navigation controls+- AI prompt integration+- Keyboard shortcuts++Everything works exactly as before, but the code is now more modular and reusable.\ No newline at end of filediff --git a/flowsint-app/src/renderer/src/components/analyses/analyses-list.tsx b/flowsint-app/src/renderer/src/components/analyses/analyses-list.tsxindex db5b4fb1..da522885 100644--- a/flowsint-app/src/renderer/src/components/analyses/analyses-list.tsx+++ b/flowsint-app/src/renderer/src/components/analyses/analyses-list.tsx@@ -1,43 +1,59 @@import { useQuery } from "@tanstack/react-query"import { Button } from "../ui/button"-import { PlusIcon, Waypoints } from "lucide-react"+import { PlusIcon, Waypoints, FileText } from "lucide-react"import { Input } from "../ui/input"-import { useParams } from "@tanstack/react-router"+import { useParams, Link, useNavigate } from "@tanstack/react-router"import { SkeletonList } from "../shared/skeleton-list"-import NewSketch from "../sketches/new-sketch"import { useState, useMemo } from "react"import { Analysis } from "@/types"import { analysisService } from "@/api/analysis-service"import { useAnalysisPanelStore } from "@/stores/analysis-panel-store"import { cn } from "@/lib/utils"+import { useMutation, useQueryClient } from "@tanstack/react-query"+import { toast } from "sonner"+import { formatDistanceToNow } from "date-fns"const AnalysisItem = ({ analysis, active }: { analysis: Analysis, active: boolean }) => {return (- <div className={cn("p-2 flex items-center gap-2 border-b shrink-0", active && "bg-primary/10")}>- <div className="flex items-center gap-2">- <div className="w-10 h-10 bg-muted rounded-full" />- <div className="flex flex-col">- <p className="text-sm font-medium">{analysis.title}</p>- <p className="text-xs text-muted-foreground">{analysis.last_updated_at}</p>+ <Link+ to="/dashboard/investigations/$investigationId/$type/$id"+ params={{+ investigationId: analysis.investigation_id || "",+ type: "analysis",+ id: analysis.id+ }}+ className={cn("p-2 flex items-center gap-2 border-b shrink-0 hover:bg-muted/50 transition-colors", active && "bg-primary/10")}+ >+ <div className="flex items-center gap-2 w-full">+ <div className="w-10 h-10 bg-muted rounded-full flex items-center justify-center">+ <FileText className="h-5 w-5 text-muted-foreground" />+ </div>+ <div className="flex flex-col flex-1 min-w-0">+ <p className="text-sm font-medium truncate">{analysis.title}</p>+ <p className="text-xs text-muted-foreground">+ {analysis.last_updated_at ? formatDistanceToNow(new Date(analysis.last_updated_at), { addSuffix: true }) : ""}+ </p></div></div>- </div>+ </Link>)}const AnalysisList = () => {- const { investigationId, id } = useParams({ strict: false })+ const { investigationId, id, type } = useParams({ strict: false })+ const queryClient = useQueryClient()+ const navigate = useNavigate()+// Fetch all analyses for this investigation- const currentAnalysisId = useAnalysisPanelStore(s => s.currentAnalysisId)const { data: analyses, error, isLoading } = useQuery<Analysis[]>({queryKey: ["analyses", investigationId],- queryFn: () => analysisService.getById(id),+ queryFn: () => analysisService.getByInvestigationId(investigationId || ""),enabled: !!investigationId,})const [searchQuery, setSearchQuery] = useState("")- const filteredAnalysis = useMemo(() => {+ const filteredAnalyses = useMemo(() => {if (!analyses) return []if (!searchQuery.trim()) return analyses@@ -47,19 +63,43 @@ const AnalysisList = () => {)}, [analyses, searchQuery])+ const createAnalysisMutation = useMutation({+ mutationFn: async () => {+ const newAnalysis: Partial<Analysis> = {+ title: "Untitled Analysis",+ investigation_id: investigationId,+ content: {},+ }+ return analysisService.create(JSON.stringify(newAnalysis))+ },+ onSuccess: async (data) => {+ queryClient.invalidateQueries({ queryKey: ["analyses", investigationId] })+ toast.success("New analysis created")+ investigationId && navigate({ to: "/dashboard/investigations/$investigationId/$type/$id", params: { investigationId, type: "analysis", id: data.id } })+ },+ onError: (error) => {+ toast.error("Failed to create analysis: " + (error instanceof Error ? error.message : "Unknown error"))+ }+ })+if (error) return <div>Error: {(error as Error).message}</div>return (<div className="w-full h-full bg-card flex flex-col overflow-hidden">- <div className="p-2 flex items-center gap-2 border-b shrink-0">- <NewSketch noDropDown>- <Button variant="ghost" size="icon" className="h-7 w-7">- <PlusIcon className="h-4 w-4" />- </Button>- </NewSketch>+ <div className="p-2 flex items-center h-11 gap-2 border-b shrink-0">+ <Button+ variant="ghost"+ size="icon"+ className="h-7 w-7"+ onClick={() => createAnalysisMutation.mutate()}+ disabled={createAnalysisMutation.isPending}+ title="Create new analysis"+ >+ <PlusIcon className="h-4 w-4" />+ </Button><Inputtype="search"className="!border border-border h-7"- placeholder="Search..."+ placeholder="Search analyses..."value={searchQuery}onChange={(e) => setSearchQuery(e.target.value)}/>@@ -70,11 +110,11 @@ const AnalysisList = () => {<div className="p-2"><SkeletonList rowCount={7} /></div>- ) : filteredAnalysis.length > 0 ? (+ ) : filteredAnalyses.length > 0 ? (<ul>- {filteredAnalysis.map((analysis: Analysis) => (+ {filteredAnalyses.map((analysis: Analysis) => (<AnalysisItem- active={currentAnalysisId === analysis.id}+ active={type === "analysis" && id === analysis.id}key={analysis.id}analysis={analysis}/>@@ -82,24 +122,27 @@ const AnalysisList = () => {</ul>) : (<div className="p-6 flex flex-col items-center text-center gap-3 text-muted-foreground">- <Waypoints className="h-10 w-10 text-yellow-500" />+ <FileText className="h-10 w-10 text-yellow-500" /><div className="space-y-1"><h3 className="text-sm font-semibold text-foreground">- {searchQuery ? "No matching sketches" : "No sketches yet"}+ {searchQuery ? "No matching analyses" : "No analyses yet"}</h3><p className="text-xs opacity-70 max-w-xs">{searchQuery? "Try adjusting your search query to find what you're looking for."- : "This investigation doesn't contain any sketch. Sketches let you organize and visualize your data as graphs."+ : "This investigation doesn't contain any analysis. Analyses let you organize and document your findings."}</p></div>- <NewSketch noDropDown>- <Button size="sm" variant="outline">- <PlusIcon className="w-4 h-4 mr-2" />- Create your first sketch- </Button>- </NewSketch>+ <Button+ size="sm"+ variant="outline"+ onClick={() => createAnalysisMutation.mutate()}+ disabled={createAnalysisMutation.isPending}+ >+ <PlusIcon className="w-4 h-4 mr-2" />+ Create your first analysis+ </Button></div>)}</div>diff --git a/flowsint-app/src/renderer/src/components/analyses/analysis-editor.tsx b/flowsint-app/src/renderer/src/components/analyses/analysis-editor.tsxnew file mode 100644index 00000000..8a446cae--- /dev/null+++ b/flowsint-app/src/renderer/src/components/analyses/analysis-editor.tsx@@ -0,0 +1,480 @@+import { useState, useEffect } from "react"+import { useMutation, useQueryClient } from "@tanstack/react-query"+import { MinimalTiptapEditor } from "@/components/analyses/editor"+import { analysisService } from "@/api/analysis-service"+import type { Analysis } from "@/types"+import { Button } from "@/components/ui/button"+import { Skeleton } from "@/components/ui/skeleton"+import { PlusIcon, Trash2, Save, Sparkles, XIcon, ChevronDown, ChevronsRight, ExternalLink } from "lucide-react"+import { toast } from "sonner"+import { useKeyboardShortcut } from "@/hooks/use-keyboard-shortcut"+import { useConfirm } from "../use-confirm-dialog"+import { useChat } from "@/hooks/use-chat"+import { Textarea } from "@/components/ui/textarea"+import { Editor } from "@tiptap/core"+import { Link, useParams } from "@tanstack/react-router"+import { useLayoutStore } from "@/stores/layout-store"+import {+ Popover,+ PopoverContent,+ PopoverTrigger,+} from "@/components/ui/popover"++interface AnalysisEditorProps {+ // Core data+ analysis: Analysis | null+ investigationId: string++ // Callbacks+ onAnalysisUpdate?: (analysis: Analysis) => void+ onAnalysisDelete?: (analysisId: string) => void+ onAnalysisCreate?: (investigationId: string) => void+ onAnalysisSelect?: (analysisId: string) => void++ // UI customization+ showHeader?: boolean+ showActions?: boolean+ showAnalysisSelector?: boolean+ showNavigation?: boolean+ className?: string++ // Loading states+ isLoading?: boolean+ isRefetching?: boolean++ // Analysis list for selector+ analyses?: Analysis[]+ currentAnalysisId?: string | null+}++export const AnalysisEditor = ({+ analysis,+ investigationId,+ onAnalysisUpdate,+ onAnalysisDelete,+ onAnalysisCreate,+ onAnalysisSelect,+ showHeader = true,+ showActions = true,+ showAnalysisSelector = false,+ showNavigation = false,+ className = "",+ isLoading = false,+ analyses = [],+ currentAnalysisId+}: AnalysisEditorProps) => {+ const { confirm } = useConfirm()+ const toggleChat = useLayoutStore(s => s.toggleChat)+ const { investigationId: routeInvestigationId, type } = useParams({ strict: false }) as { investigationId: string, type: string }+ const queryClient = useQueryClient()++ // State for editor+ const [editorValue, setEditorValue] = useState<any>("")+ const [titleValue, setTitleValue] = useState("")+ const [editor, setEditor] = useState<Editor | undefined>(undefined)+ const [isEditingTitle, setIsEditingTitle] = useState(false)+ const [includeContext, setIncludeContext] = useState(false)++ // Chat hook+ const {+ isAiLoading,+ promptOpen,+ setPromptOpen,+ customPrompt,+ setCustomPrompt,+ handleCustomPrompt+ } = useChat({+ onContentUpdate: setEditorValue,+ onSuccess: () => saveMutation.mutate({}),+ editor: editor+ })++ // Mutations+ const createMutation = useMutation({+ mutationFn: async () => {+ const newAnalysis: Partial<Analysis> = {+ title: "Untitled Analysis",+ investigation_id: investigationId,+ content: {},+ }+ const res = await analysisService.create(JSON.stringify(newAnalysis))+ return res+ },+ onSuccess: async () => {+ queryClient.invalidateQueries({ queryKey: ["analyses", investigationId] })+ onAnalysisCreate?.(investigationId)+ toast.success("New analysis created")+ },+ onError: (error) => {+ toast.error("Failed to create analysis: " + (error instanceof Error ? error.message : "Unknown error"))+ }+ })++ const saveMutation = useMutation({+ mutationFn: async (updated: Partial<Analysis>) => {+ if (!analysis) return+ return analysisService.update(analysis.id, JSON.stringify({+ ...analysis,+ ...updated,+ content: editorValue+ }))+ },+ onSuccess: async (data) => {+ queryClient.invalidateQueries({ queryKey: ["analyses", investigationId] })+ onAnalysisUpdate?.(data)+ toast.success("Analysis saved !")+ },+ onError: (error) => {+ toast.error("Failed to save analysis: " + (error instanceof Error ? error.message : "Unknown error"))+ }+ })++ const deleteMutation = useMutation({+ mutationFn: async (id: string) => {+ return analysisService.delete(id)+ },+ onSuccess: async () => {+ queryClient.invalidateQueries({ queryKey: ["analyses", investigationId] })+ onAnalysisDelete?.(analysis?.id || "")+ toast.success("Analysis deleted")+ },+ onError: (error) => {+ toast.error("Failed to delete analysis: " + (error instanceof Error ? error.message : "Unknown error"))+ }+ })++ const updateTitleMutation = useMutation({+ mutationFn: async (newTitle: string) => {+ if (!analysis) return+ return analysisService.update(analysis.id, JSON.stringify({+ ...analysis,+ title: newTitle+ }))+ },+ onSuccess: async (data) => {+ queryClient.invalidateQueries({ queryKey: ["analyses", investigationId] })+ onAnalysisUpdate?.(data)+ toast.success("Title updated")+ },+ onError: (error) => {+ toast.error("Failed to update title: " + (error instanceof Error ? error.message : "Unknown error"))+ }+ })++ // Handle title update+ const handleTitleUpdate = (newTitle: string) => {+ setTitleValue(newTitle)+ updateTitleMutation.mutate(newTitle)+ setIsEditingTitle(false)+ }++ const deleteAnalysis = async () => {+ if (!analysis?.id) {+ toast.error("No analysis selected")+ return+ }+ if (!await confirm({ title: "Delete Analysis", message: "Are you sure you want to delete this analysis?" })) {+ return+ }+ deleteMutation.mutate(analysis.id)+ }++ // Update editor content when analysis changes+ useEffect(() => {+ if (analysis) {+ // Handle both string content and object content+ const content = analysis.content+ if (typeof content === 'string') {+ try {+ // Try to parse if it's a JSON string+ const parsedContent = JSON.parse(content)+ setEditorValue(parsedContent)+ if (editor) {+ editor.commands.setContent(parsedContent)+ }+ } catch {+ // If parsing fails, treat as plain text and convert to editor format+ setEditorValue(content || "")+ if (editor) {+ editor.commands.setContent(content || "")+ }+ }+ } else {+ // If it's already an object, use it directly+ setEditorValue(content || "")+ if (editor) {+ editor.commands.setContent(content || "")+ }+ }+ setTitleValue(analysis.title || "")+ } else {+ // Reset when no analysis is selected+ setEditorValue("")+ setTitleValue("")+ if (editor) {+ editor.commands.setContent("")+ }+ }+ }, [analysis?.id, analysis?.content, analysis?.title, editor])++ useKeyboardShortcut({+ key: "s",+ ctrlOrCmd: true,+ callback: () => {+ saveMutation.mutate({})+ },+ })++ useKeyboardShortcut({+ key: "e",+ ctrlOrCmd: true,+ callback: () => setPromptOpen(!promptOpen),+ })++ if (isLoading) {+ return <Skeleton className="h-full w-full" />+ }++ return (+ <div className={`flex flex-col h-full w-full ${className}`}>+ {/* Header */}+ {showHeader && (+ <div className="border-b bg-background h-11 w-full flex items-center justify-between">+ <div className="flex items-center justify-between p-3 w-full">+ {/* Left section with navigation and title */}+ <div className="flex items-center gap-3 flex-1 min-w-0">+ {showNavigation && type !== "analysis" && (+ <Button className="h-8 w-8" variant="ghost" onClick={toggleChat}>+ <ChevronsRight />+ </Button>+ )}++ {/* Analysis Selector */}+ {showAnalysisSelector && analyses && analyses.length > 0 && (+ <Popover>+ <PopoverTrigger asChild>+ <div>+ <Button variant="ghost" size="icon" className="h-8 w-8">+ <ChevronDown className="h-4 w-4" />+ </Button>+ </div>+ </PopoverTrigger>+ <PopoverContent className="w-[200px] p-0" align="start">+ <div className="flex flex-col">+ {analyses.map((analysisItem) => (+ <Button+ key={analysisItem.id}+ variant="ghost"+ className="justify-start px-2 py-1.5 h-auto"+ onClick={() => onAnalysisSelect?.(analysisItem.id)}+ >+ <div className="flex flex-col items-start">+ <span className="font-medium">{analysisItem.title || "Untitled"}</span>+ <span className="text-xs text-muted-foreground">+ {analysisItem.id === currentAnalysisId ? "Current" : "Switch to this analysis"}+ </span>+ </div>+ </Button>+ ))}+ </div>+ </PopoverContent>+ </Popover>+ )}++ {/* Title section */}+ <div className="flex items-center gap-2 flex-1 min-w-0">+ {isEditingTitle ? (+ <input+ className="text-md font-medium bg-transparent outline-none border-none p-0 m-0 w-full"+ value={titleValue}+ onChange={e => setTitleValue(e.target.value)}+ onBlur={() => {+ handleTitleUpdate(titleValue)+ setIsEditingTitle(false)+ }}+ onKeyDown={e => {+ if (e.key === 'Enter') {+ handleTitleUpdate(titleValue)+ setIsEditingTitle(false)+ } else if (e.key === 'Escape') {+ setIsEditingTitle(false)+ setTitleValue(analysis?.title || "")+ }+ }}+ autoFocus+ />+ ) : (+ <span+ className="text-md font-medium cursor-pointer hover:text-primary truncate min-w-0 flex-1"+ onClick={() => setIsEditingTitle(true)}+ >+ {titleValue || "Untitled Analysis"}+ </span>+ )}+ </div>+ </div>++ {/* Action buttons */}+ {showActions && (+ <div className="flex items-center gap-1">+ {analysis && type !== "analysis" && (+ <Link to="/dashboard/investigations/$investigationId/$type/$id" params={{+ investigationId: routeInvestigationId || investigationId,+ type: "analysis",+ id: analysis.id+ }}>+ <Button+ size="icon"+ variant="ghost"+ title="Open in Full Page"+ className="h-8 w-8"+ >+ <ExternalLink className="w-4 h-4" strokeWidth={1.5} />+ </Button>+ </Link>+ )}+ <Button+ size="icon"+ variant="ghost"+ disabled={!analysis || isAiLoading}+ title="AI Prompt"+ className="h-8 w-8"+ onClick={() => setPromptOpen(!promptOpen)}+ >+ <Sparkles className="w-4 h-4" strokeWidth={1.5} />+ </Button>+ {type !== "analysis" &&+ <Button+ size="icon"+ variant="ghost"+ onClick={() => createMutation.mutate()}+ disabled={createMutation.isPending}+ title="New Analysis"+ className="h-8 w-8"+ >+ <PlusIcon className="w-4 h-4" strokeWidth={1.5} />+ </Button>}+ <Button+ size="icon"+ variant="ghost"+ onClick={() => saveMutation.mutate({})}+ disabled={!analysis || saveMutation.isPending}+ title="Save"+ className="h-8 w-8"+ >+ <Save className="w-4 h-4" strokeWidth={1.5} />+ </Button>+ <Button+ size="icon"+ variant="ghost"+ onClick={deleteAnalysis}+ disabled={!analysis || deleteMutation.isPending}+ title="Delete"+ className="h-8 w-8"+ >+ <Trash2 className="w-4 h-4" strokeWidth={1.5} />+ </Button>+ </div>+ )}+ </div>+ </div>+ )}++ {/* Editor */}+ <div className="flex-1 min-h-0 flex flex-col">+ {analysis ? (+ <>+ <div className="flex-1 h-full w-full">+ <MinimalTiptapEditor+ key={analysis.id}+ immediatelyRender={true}+ value={editorValue}+ onChange={setEditorValue}+ className="w-full flex-1"+ editorContentClassName="p-5 min-h-[300px]"+ output="json"+ placeholder="Enter your analysis..."+ autofocus={true}+ editable={true}+ editorClassName="focus:outline-hidden"+ onEditorReady={setEditor}+ />+ </div>+ {/* Prompt Panel */}+ <div className={`border-t bg-background transition-all duration-200 ${promptOpen ? 'h-[300px]' : 'h-0'}`}>+ <div className="flex flex-col h-full">+ <div className="flex items-center justify-between p-2 border-b">+ <div className="flex items-center gap-2">+ <Sparkles className="w-4 h-4" strokeWidth={1.5} />+ <span className="text-sm font-medium">AI Prompt</span>+ </div>+ <Button+ variant="ghost"+ size="icon"+ onClick={() => setPromptOpen(false)}+ className="h-6 w-6 px-2"+ >+ <XIcon />+ </Button>+ </div>+ <div className="flex-1 p-2 flex flex-col gap-2">+ <div className="flex items-center gap-2">+ <Button+ variant="ghost"+ size="sm"+ onClick={() => setIncludeContext(!includeContext)}+ className="h-6 px-2"+ >+ {includeContext ? "Hide Context" : "Show Context"}+ </Button>+ {includeContext && (+ <span className="text-xs text-muted-foreground">+ Current analysis content will be included as context+ </span>+ )}+ </div>+ {includeContext && (+ <Textarea+ autoFocus+ value={JSON.stringify(editorValue, null, 2)}+ readOnly+ className="h-[100px] text-xs font-mono resize-none"+ />+ )}+ <Textarea+ placeholder="Enter your prompt..."+ value={customPrompt}+ onChange={(e) => setCustomPrompt(e.target.value)}+ className="flex-1 resize-none"+ />+ </div>+ <div className="p-2 border-t">+ <Button+ onClick={() => handleCustomPrompt(editorValue)}+ disabled={!customPrompt.trim() || isAiLoading}+ className="w-full"+ >+ {isAiLoading ? "Generating..." : "Generate"}+ </Button>+ </div>+ </div>+ </div>+ </>+ ) : (+ <div className="flex flex-col items-center justify-center h-full text-muted-foreground space-y-3">+ <div>No analysis selected.</div>+ <Button+ className="shadow-none"+ variant="outline"+ onClick={() => createMutation.mutate()}+ disabled={createMutation.isPending}+ >+ <PlusIcon className="w-4 h-4 mr-2" strokeWidth={1.5} />+ Create your first analysis+ </Button>+ </div>+ )}+ </div>+ </div>+ )+}\ No newline at end of filediff --git a/flowsint-app/src/renderer/src/components/analyses/analysis-page.tsx b/flowsint-app/src/renderer/src/components/analyses/analysis-page.tsxnew file mode 100644index 00000000..2818875c--- /dev/null+++ b/flowsint-app/src/renderer/src/components/analyses/analysis-page.tsx@@ -0,0 +1,40 @@+import { useParams } from "@tanstack/react-router"+import type { Analysis } from "@/types"+import { Skeleton } from "@/components/ui/skeleton"+import { AnalysisEditor } from "./analysis-editor"++export const AnalysisPage = ({ analysis, isLoading, isError, refetch }: { analysis: Analysis, isLoading: boolean, isError: boolean, refetch: () => void }) => {+ const { investigationId } = useParams({ strict: false }) as { investigationId: string, id: string }++ if (isLoading) {+ return <Skeleton className="h-full w-full" />+ }++ if (isError) {+ return <div className="text-sm text-destructive">Error loading analysis.</div>+ }++ const handleAnalysisUpdate = () => {+ refetch()+ }++ const handleAnalysisDelete = () => {+ // Navigate back to investigation page or to another analysis+ window.history.back()+ }++ return (+ <div className="flex flex-col h-full w-full">+ {/* Analysis Editor */}+ <AnalysisEditor+ analysis={analysis || null}+ investigationId={investigationId}+ onAnalysisUpdate={handleAnalysisUpdate}+ onAnalysisDelete={handleAnalysisDelete}+ showHeader={true}+ showNavigation={true}+ isLoading={isLoading}+ />+ </div>+ )+}\ No newline at end of filediff --git a/flowsint-app/src/renderer/src/components/analyses/editor/minimal-tiptap.tsx b/flowsint-app/src/renderer/src/components/analyses/editor/minimal-tiptap.tsxindex 105b97b7..a201653a 100644--- a/flowsint-app/src/renderer/src/components/analyses/editor/minimal-tiptap.tsx+++ b/flowsint-app/src/renderer/src/components/analyses/editor/minimal-tiptap.tsx@@ -99,7 +99,7 @@ export const MinimalTiptapEditor = React.forwardRef<{/* <Toolbar editor={editor} /> */}<EditorContenteditor={editor}- className={cn("minimal-tiptap-editor p-8 max-w-4xl mx-auto", editorContentClassName)}+ className={cn("minimal-tiptap-editor p-8 w-full max-w-4xl mx-auto", editorContentClassName)}/><LinkBubbleMenu editor={editor} /></MeasuredContainer>diff --git a/flowsint-app/src/renderer/src/components/analyses/notes-panel.tsx b/flowsint-app/src/renderer/src/components/analyses/notes-panel.tsxindex f08ee87b..68a3452f 100644--- a/flowsint-app/src/renderer/src/components/analyses/notes-panel.tsx+++ b/flowsint-app/src/renderer/src/components/analyses/notes-panel.tsx@@ -1,51 +1,16 @@-import { useState, useEffect } from "react"-import { useQuery, useMutation } from "@tanstack/react-query"-import { MinimalTiptapEditor } from "@/components/analyses/editor"+import { useQuery } from "@tanstack/react-query"+import { useParams } from "@tanstack/react-router"import { analysisService } from "@/api/analysis-service"import type { Analysis } from "@/types"-import { Link, useParams } from "@tanstack/react-router"-import { Button } from "@/components/ui/button"import { Skeleton } from "@/components/ui/skeleton"-import { PlusIcon, Trash2, Save, ChevronsRight, Sparkles, ChevronDown, XIcon, ExternalLink } from "lucide-react"import { useAnalysisPanelStore } from "@/stores/analysis-panel-store"-import { toast } from "sonner"-import { useKeyboardShortcut } from "@/hooks/use-keyboard-shortcut"-import { useConfirm } from "../use-confirm-dialog"-import { useLayoutStore } from "@/stores/layout-store"-import { useChat } from "@/hooks/use-chat"-import {- Popover,- PopoverContent,- PopoverTrigger,-} from "@/components/ui/popover"-import { Textarea } from "@/components/ui/textarea"-import { Editor } from "@tiptap/core"+import { AnalysisEditor } from "./analysis-editor"+import { useEffect } from "react"export const AnalysisPanel = () => {const { investigationId } = useParams({ strict: false }) as { investigationId: string }- const toggleChat = useLayoutStore(s => s.toggleChat)const currentAnalysisId = useAnalysisPanelStore(s => s.currentAnalysisId)const setCurrentAnalysisId = useAnalysisPanelStore(s => s.setCurrentAnalysisId)- const { confirm } = useConfirm()- // State for editor- const [editorValue, setEditorValue] = useState<any>("")- const [titleValue, setTitleValue] = useState("")- const [editor, setEditor] = useState<Editor | undefined>(undefined)- const [isEditingTitle, setIsEditingTitle] = useState(false)- const [includeContext, setIncludeContext] = useState(false)- // Chat hook- const {- isAiLoading,- promptOpen,- setPromptOpen,- customPrompt,- setCustomPrompt,- handleCustomPrompt- } = useChat({- onContentUpdate: setEditorValue,- onSuccess: () => saveMutation.mutate({}),- editor: editor- })// Fetch all analyses for this investigationconst { data: analyses, isLoading: isLoadingAnalyses, isError, refetch } = useQuery<Analysis[]>({@@ -53,6 +18,7 @@ export const AnalysisPanel = () => {queryFn: () => analysisService.getByInvestigationId(investigationId),enabled: !!investigationId,})+// Find the current analysisconst currentAnalysis = Array.isArray(analyses) ? analyses?.find(a => a.id === currentAnalysisId) || (analyses && analyses[0]) : null@@ -66,151 +32,25 @@ export const AnalysisPanel = () => {}}, [analyses, currentAnalysisId, setCurrentAnalysisId])- // Add title update mutation- const updateTitleMutation = useMutation({- mutationFn: async (newTitle: string) => {- if (!currentAnalysis) return- return analysisService.update(currentAnalysis.id, JSON.stringify({- ...currentAnalysis,- title: newTitle- }))- },- onSuccess: async () => {- await refetch()- toast.success("Title updated")- },- onError: (error) => {- toast.error("Failed to update title: " + (error instanceof Error ? error.message : "Unknown error"))- }- })-- // Handle title update- const handleTitleUpdate = (newTitle: string) => {- setTitleValue(newTitle)- updateTitleMutation.mutate(newTitle)- setIsEditingTitle(false)- }-- // Mutations- const createMutation = useMutation({- mutationFn: async () => {- const newAnalysis: Partial<Analysis> = {- title: "Untitled Analysis",- investigation_id: investigationId,- content: {},- }- const res = await analysisService.create(JSON.stringify(newAnalysis))- return res- },- onSuccess: async (data) => {- await refetch()- setCurrentAnalysisId(data.id)- toast.success("New analysis created")- },- onError: (error) => {- toast.error("Failed to create analysis: " + (error instanceof Error ? error.message : "Unknown error"))- }- })-- const saveMutation = useMutation({- mutationFn: async (updated: Partial<Analysis>) => {- if (!currentAnalysis) return- return analysisService.update(currentAnalysis.id, JSON.stringify({- ...currentAnalysis,- ...updated,- content: editorValue- }))- },- onSuccess: async () => {- await refetch()- toast.success("Analysis saved !")- },- onError: (error) => {- toast.error("Failed to save analysis: " + (error instanceof Error ? error.message : "Unknown error"))- }- })-- const deleteMutation = useMutation({- mutationFn: async (id: string) => {- return analysisService.delete(id)- },- onSuccess: async () => {- await refetch()- // Set to another analysis or null- if (analyses && analyses.length > 1) {- const next = analyses.find(a => a.id !== currentAnalysisId)- setCurrentAnalysisId(next?.id || null)- } else {- setCurrentAnalysisId(null)- }- toast.success("Analysis deleted")- },- onError: (error) => {- toast.error("Failed to delete analysis: " + (error instanceof Error ? error.message : "Unknown error"))- }- })-- const deleteAnalysis = async () => {- if (!currentAnalysisId) {- toast.error("No analysis selected")- return- }- if (!await confirm({ title: "Delete Analysis", message: "Are you sure you want to delete this analysis?" })) {- return- }- deleteMutation.mutate(currentAnalysisId)+ const handleAnalysisUpdate = () => {+ refetch()}- useEffect(() => {- if (currentAnalysis) {- // Handle both string content and object content- const content = currentAnalysis.content- if (typeof content === 'string') {- try {- // Try to parse if it's a JSON string- const parsedContent = JSON.parse(content)- setEditorValue(parsedContent)- if (editor) {- editor.commands.setContent(parsedContent)- }- } catch {- // If parsing fails, treat as plain text and convert to editor format- setEditorValue(content || "")- if (editor) {- editor.commands.setContent(content || "")- }- }- } else {- // If it's already an object, use it directly- setEditorValue(content || "")- if (editor) {- editor.commands.setContent(content || "")- }- }- setTitleValue(currentAnalysis.title || "")+ const handleAnalysisDelete = () => {+ refetch()+ // Set to another analysis or null+ if (analyses && analyses.length > 1) {+ const next = analyses.find(a => a.id !== currentAnalysisId)+ setCurrentAnalysisId(next?.id || null)} else {- // Reset when no analysis is selected- setEditorValue("")- setTitleValue("")- if (editor) {- editor.commands.setContent("")- }+ setCurrentAnalysisId(null)}- }, [currentAnalysisId, currentAnalysis?.id, currentAnalysis?.content, currentAnalysis?.title, editor])-- useKeyboardShortcut({- key: "s",- ctrlOrCmd: true,- callback: () => {- saveMutation.mutate({})- },- })+ }- useKeyboardShortcut({- key: "e",- ctrlOrCmd: true,- callback: () => setPromptOpen(!promptOpen),- })+ const handleAnalysisCreate = (investigationId: string) => {+ refetch()+ setCurrentAnalysisId(investigationId)+ }if (isLoadingAnalyses) {return <Skeleton className="h-full w-full" />@@ -219,259 +59,24 @@ export const AnalysisPanel = () => {if (isError) {return <div className="text-sm text-destructive">Error loading analyses.</div>}-+return (<div className="flex flex-col h-full w-full">- {/* Header with unified title/analysis selector and controls */}- <div className="border-b bg-background h-10 w-full flex items-center justify-between">- <div className="flex items-center justify-between p-3 w-full">- {/* Left section with navigation and title */}- <div className="flex items-center gap-3 flex-1 min-w-0">- <Button className="h-8 w-8" variant="ghost" onClick={toggleChat}>- <ChevronsRight />- </Button>- {isLoadingAnalyses ? (- <Skeleton className="h-9 w-64" />- ) : isError ? (- <div className="text-sm text-destructive">Error loading analyses</div>- ) : analyses && analyses.length > 0 ? (- <div className="flex items-center gap-3 flex-1 min-w-0">- <Popover>- <PopoverTrigger asChild>- <div>- <Button variant="ghost" size="icon" className="h-8 w-8">- <ChevronDown className="h-4 w-4" />- </Button>- </div>- </PopoverTrigger>- <PopoverContent className="w-[200px] p-0" align="start">- <div className="flex flex-col">- {analyses.map((analysis) => (- <Button- key={analysis.id}- variant="ghost"- className="justify-start px-2 py-1.5 h-auto"- onClick={() => setCurrentAnalysisId(analysis.id)}- >- <div className="flex flex-col items-start">- <span className="font-medium">{analysis.title || "Untitled"}</span>- <span className="text-xs text-muted-foreground">- {analysis.id === currentAnalysisId ? "Current" : "Switch to this analysis"}- </span>- </div>- </Button>- ))}- <Button- variant="ghost"- className="justify-start px-2 py-1.5 h-auto text-primary"- onClick={() => createMutation.mutate()}- >- <div className="flex items-center gap-2">- <PlusIcon className="w-4 h-4" />- <span>Create new analysis</span>- </div>- </Button>- </div>- </PopoverContent>- </Popover>- <div className="flex items-center gap-2 flex-1 min-w-0">- {isEditingTitle ? (- <input- className="text-md font-medium bg-transparent outline-none border-none p-0 m-0 w-full"- value={titleValue}- onChange={e => setTitleValue(e.target.value)}- onBlur={() => {- handleTitleUpdate(titleValue)- setIsEditingTitle(false)- }}- onKeyDown={e => {- if (e.key === 'Enter') {- handleTitleUpdate(titleValue)- setIsEditingTitle(false)- } else if (e.key === 'Escape') {- setIsEditingTitle(false)- setTitleValue(currentAnalysis?.title || "")- }- }}- autoFocus- />- ) : (- <span- className="text-md font-medium cursor-pointer hover:text-primary truncate min-w-0 flex-1"- onClick={() => setIsEditingTitle(true)}- >- {titleValue || "Untitled Analysis"}- </span>- )}- </div>- </div>- ) : (- <div className="flex items-center gap-2 flex-1 min-w-0">- <div className="text-sm font-bold text-muted-foreground/60 truncate text-ellipsis">No analyses yet</div>- </div>- )}- </div>- {/* <div className="grow" /> */}-- {/* Action buttons */}- <div className="flex items-center gap-1">- <Link to="/dashboard/investigations/$investigationId/$type/$id" params={{- investigationId,- type: "analysis",- id: currentAnalysisId as string- }}>- <Button- size="icon"- variant="ghost"- disabled={!currentAnalysis || isAiLoading}- title="AI Prompt"- className="h-8 w-8"- onClick={() => setPromptOpen(!promptOpen)}- >- <ExternalLink className="w-4 h-4" strokeWidth={1.5} />- </Button>- </Link>- <Button- size="icon"- variant="ghost"- disabled={!currentAnalysis || isAiLoading}- title="AI Prompt"- className="h-8 w-8"- onClick={() => setPromptOpen(!promptOpen)}- >- <Sparkles className="w-4 h-4" strokeWidth={1.5} />- </Button>- <Button- size="icon"- variant="ghost"- onClick={() => createMutation.mutate()}- disabled={createMutation.isPending}- title="New Analysis"- className="h-8 w-8"- >- <PlusIcon className="w-4 h-4" strokeWidth={1.5} />- </Button>- <Button- size="icon"- variant="ghost"- onClick={() => saveMutation.mutate({})}- disabled={!currentAnalysis || saveMutation.isPending}- title="Save"- className="h-8 w-8"- >- <Save className="w-4 h-4" strokeWidth={1.5} />- </Button>- <Button- size="icon"- variant="ghost"- onClick={deleteAnalysis}- disabled={!currentAnalysis || deleteMutation.isPending}- title="Delete"- className="h-8 w-8"- >- <Trash2 className="w-4 h-4" strokeWidth={1.5} />- </Button>- </div>- </div>- </div>-- {/* Editor */}- <div className="flex-1 min-h-0 flex flex-col">- {currentAnalysis ? (- <>- <div className="flex-1 h-full w-full">- <MinimalTiptapEditor- key={currentAnalysisId}- immediatelyRender={true}- value={editorValue}- onChange={setEditorValue}- className="w-full flex-1"- editorContentClassName="p-5 min-h-[300px]"- output="json"- placeholder="Enter your analysis..."- autofocus={true}- editable={true}- editorClassName="focus:outline-hidden"- onEditorReady={setEditor}- />- </div>- {/* Prompt Panel */}- <div className={`border-t bg-background transition-all duration-200 ${promptOpen ? 'h-[300px]' : 'h-0'}`}>- <div className="flex flex-col h-full">- <div className="flex items-center justify-between p-2 border-b">- <div className="flex items-center gap-2">- <Sparkles className="w-4 h-4" strokeWidth={1.5} />- <span className="text-sm font-medium">AI Prompt</span>- </div>- <Button- variant="ghost"- size="icon"- onClick={() => setPromptOpen(false)}- className="h-6 w-6 px-2"- >- <XIcon />- </Button>- </div>- <div className="flex-1 p-2 flex flex-col gap-2">- <div className="flex items-center gap-2">- <Button- variant="ghost"- size="sm"- onClick={() => setIncludeContext(!includeContext)}- className="h-6 px-2"- >- {includeContext ? "Hide Context" : "Show Context"}- </Button>- {includeContext && (- <span className="text-xs text-muted-foreground">- Current analysis content will be included as context- </span>- )}- </div>- {includeContext && (- <Textarea- autoFocus- value={JSON.stringify(editorValue, null, 2)}- readOnly- className="h-[100px] text-xs font-mono resize-none"- />- )}- <Textarea- placeholder="Enter your prompt..."- value={customPrompt}- onChange={(e) => setCustomPrompt(e.target.value)}- className="flex-1 resize-none"- />- </div>- <div className="p-2 border-t">- <Button- onClick={() => handleCustomPrompt(editorValue)}- disabled={!customPrompt.trim() || isAiLoading}- className="w-full"- >- {isAiLoading ? "Generating..." : "Generate"}- </Button>- </div>- </div>- </div>- </>- ) : (- <div className="flex flex-col items-center justify-center h-full text-muted-foreground space-y-3">- <div>No analysis selected.</div>- {analyses && analyses.length === 0 && (- <Button- className="shadow-none"- variant="outline"- onClick={() => createMutation.mutate()}- disabled={createMutation.isPending}- >- <PlusIcon className="w-4 h-4 mr-2" strokeWidth={1.5} />- Create your first analysis- </Button>- )}- </div>- )}- </div>+ {/* Analysis Editor with all functionality */}+ <AnalysisEditor+ analysis={currentAnalysis}+ investigationId={investigationId}+ onAnalysisUpdate={handleAnalysisUpdate}+ onAnalysisDelete={handleAnalysisDelete}+ onAnalysisCreate={handleAnalysisCreate}+ onAnalysisSelect={setCurrentAnalysisId}+ showHeader={true}+ showAnalysisSelector={true}+ showNavigation={true}+ isLoading={isLoadingAnalyses}+ analyses={analyses || []}+ currentAnalysisId={currentAnalysisId}+ /></div>)}diff --git a/flowsint-app/src/renderer/src/components/dashboard/discover-section.tsx b/flowsint-app/src/renderer/src/components/dashboard/discover-section.tsxindex a084d8ed..8f866eca 100644--- a/flowsint-app/src/renderer/src/components/dashboard/discover-section.tsx+++ b/flowsint-app/src/renderer/src/components/dashboard/discover-section.tsx@@ -9,21 +9,21 @@ export function DiscoverSection() {<div className="grid grid-cols-1 md:grid-cols-3 gap-6"><Card className="border border-border/60 bg-card/90"><CardHeader className="flex flex-row items-center gap-3 pb-2">- <div className="bg-blue-600/20 rounded-lg p-2 flex items-center justify-center"><PlusCircle className="w-5 h-5 text-blue-600" /></div>+ <div className="bg-muted rounded-lg p-2 flex items-center justify-center"><PlusCircle className="w-5 h-5 text-muted-foreground" /></div><CardTitle className="text-base">Start a new investigation</CardTitle></CardHeader><CardContent className="text-muted-foreground text-sm">Quickly create a new investigation to begin your work.</CardContent></Card><Card className="border border-border/60 bg-card/90"><CardHeader className="flex flex-row items-center gap-3 pb-2">- <div className="bg-orange-600/20 rounded-lg p-2 flex items-center justify-center"><Import className="w-5 h-5 text-orange-600" /></div>+ <div className="bg-muted rounded-lg p-2 flex items-center justify-center"><Import className="w-5 h-5 text-muted-foreground" /></div><CardTitle className="text-base">Import data</CardTitle></CardHeader><CardContent className="text-muted-foreground text-sm">Import investigations or data from files to get started quickly.</CardContent></Card><Card className="border border-border/60 bg-card/90"><CardHeader className="flex flex-row items-center gap-3 pb-2">- <div className="bg-green-600/20 rounded-lg p-2 flex items-center justify-center"><FileText className="w-5 h-5 text-green-600" /></div>+ <div className="bg-muted rounded-lg p-2 flex items-center justify-center"><FileText className="w-5 h-5 text-muted-foreground" /></div><CardTitle className="text-base">Read documentation</CardTitle></CardHeader><CardContent className="text-muted-foreground text-sm">Learn how to use the platform and best practices.</CardContent>diff --git a/flowsint-app/src/renderer/src/components/dashboard/get-started-section.tsx b/flowsint-app/src/renderer/src/components/dashboard/get-started-section.tsxindex a022c91e..a7a70914 100644--- a/flowsint-app/src/renderer/src/components/dashboard/get-started-section.tsx+++ b/flowsint-app/src/renderer/src/components/dashboard/get-started-section.tsx@@ -9,8 +9,8 @@ export function GetStartedSection() {{/* Action 1 */}<NewInvestigation noDropDown><div className="flex flex-row items-center gap-4 px-6 py-5 hover:bg-accent/50 cursor-pointer transition-colors">- <div className="bg-blue-600/20 rounded-lg p-3 flex items-center justify-center">- <PlusCircle className="w-4 h-4 text-blue-600" />+ <div className="bg-muted rounded-lg p-3 flex items-center justify-center">+ <PlusCircle className="w-4 h-4 text-muted-foreground" /></div><div className="flex-1 flex flex-col"><span className="font-semibold text-lg text-foreground">Start a new investigation</span>@@ -20,8 +20,8 @@ export function GetStartedSection() {</NewInvestigation>{/* Action 2 */}<div className="flex flex-row items-center gap-4 px-6 py-5 hover:bg-accent/50 cursor-pointer transition-colors">- <div className="bg-orange-600/20 rounded-lg p-3 flex items-center justify-center">- <Import className="w-4 h-4 text-orange-600" />+ <div className="bg-muted rounded-lg p-3 flex items-center justify-center">+ <Import className="w-4 h-4 text-muted-foreground" /></div><div className="flex-1 flex flex-col"><span className="font-semibold text-lg text-foreground">Import data</span>diff --git a/flowsint-app/src/renderer/src/components/dashboard/recent-investigations.tsx b/flowsint-app/src/renderer/src/components/dashboard/recent-investigations.tsxindex 338702a0..5f5f3756 100644--- a/flowsint-app/src/renderer/src/components/dashboard/recent-investigations.tsx+++ b/flowsint-app/src/renderer/src/components/dashboard/recent-investigations.tsx@@ -66,8 +66,8 @@ export function RecentInvestigations() {className="flex items-center justify-between px-4 py-3 rounded-lg hover:bg-muted/50 transition-colors"><div className="flex items-center gap-3">- <span className="bg-blue-600/20 rounded-lg p-2">- <PlusCircle className="w-4 h-4 text-blue-600" />+ <span className="bg-muted rounded-lg p-2">+ <PlusCircle className="w-4 h-4 text-muted-foreground" /></span><div className="flex flex-col"><span className="font-medium text-foreground">{investigation.name}</span>diff --git a/flowsint-app/src/renderer/src/components/graphs/create-relation.tsx b/flowsint-app/src/renderer/src/components/graphs/create-relation.tsxindex 4795987c..e8da95fc 100644--- a/flowsint-app/src/renderer/src/components/graphs/create-relation.tsx+++ b/flowsint-app/src/renderer/src/components/graphs/create-relation.tsx@@ -1,5 +1,5 @@import { useState } from "react"-import { useSketchStore } from "@/stores/sketch-store"+import { useGraphStore } from "@/stores/graph-store"import { Button } from "@/components/ui/button"import { Dialog, DialogContent, DialogFooter, DialogHeader, DialogTitle } from "@/components/ui/dialog"import { Input } from "@/components/ui/input"@@ -13,10 +13,10 @@ import { useParams } from "@tanstack/react-router"export function CreateRelationDialog() {const { id: sketchId } = useParams({ strict: false })- const selectedNodes = useSketchStore((state) => state.selectedNodes || [])- const addEdge = useSketchStore((state) => state.addEdge)- const openAddRelationDialog = useSketchStore((state) => state.openAddRelationDialog)- const setOpenAddRelationDialog = useSketchStore((state) => state.setOpenAddRelationDialog)+ const selectedNodes = useGraphStore((state) => state.selectedNodes || [])+ const addEdge = useGraphStore((state) => state.addEdge)+ const openAddRelationDialog = useGraphStore((state) => state.openAddRelationDialog)+ const setOpenAddRelationDialog = useGraphStore((state) => state.setOpenAddRelationDialog)const [relationType, setRelationType] = useState("IS_RELATED_TO")const [direction, setDirection] = useState<"one-way" | "two-way">("one-way")@@ -29,7 +29,7 @@ export function CreateRelationDialog() {label: relationType,sketch_id: sketchId}- const newEdgeObject = { type: newEdge.type, label: relationType, from: newEdge.source.id, to: newEdge.target.id } as any+ const newEdgeObject = { type: newEdge.type, label: relationType, source: newEdge.source.id, target: newEdge.target.id } as anytoast.promise((async () => {diff --git a/flowsint-app/src/renderer/src/components/graphs/draggable-item.tsx b/flowsint-app/src/renderer/src/components/graphs/draggable-item.tsxindex 8e1dd47b..8ea36c03 100644--- a/flowsint-app/src/renderer/src/components/graphs/draggable-item.tsx+++ b/flowsint-app/src/renderer/src/components/graphs/draggable-item.tsx@@ -4,7 +4,7 @@ import type { LucideIcon } from "lucide-react"import { GripVertical } from "lucide-react"import { memo, useState } from "react"import { IconContainer } from "@/components/icon-container"-import { useSketchStore } from "@/stores/sketch-store"+import { useGraphStore } from "@/stores/graph-store"import { cn } from "@/lib/utils"import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@/components/ui/tooltip"@@ -27,7 +27,7 @@ export const DraggableItem = memo(function DraggableItem({disabled = false,description,}: DraggableItemProps) {- const handleOpenFormModal = useSketchStore((s) => s.handleOpenFormModal)+ const handleOpenFormModal = useGraphStore((s) => s.handleOpenFormModal)const [isDragging, setIsDragging] = useState(false)const handleDragStart = (e: React.DragEvent<HTMLButtonElement>) => {@@ -55,7 +55,7 @@ export const DraggableItem = memo(function DraggableItem({onDragStart={handleDragStart}onDragEnd={handleDragEnd}className={cn(- "px-2 py-1 group rounded-md relative overflow-hidden border-l-4 bg-card border hover:shadow-md transition-shadow w-full text-left",+ "px-0 py-1 group flex flex-col items-center w-full justify-center gap-1 rounded-md relative overflow-hidden",{"opacity-50": isDragging || disabled,"cursor-not-allowed": disabled,@@ -64,15 +64,11 @@ export const DraggableItem = memo(function DraggableItem({)}style={{ borderLeftColor: color }}>- <div className="flex justify-start items-center w-full gap-2">- <IconContainer icon={icon} color={color} type={type} />- <div className="space-y-1 truncate flex-1">- <h3 className="text-sm font-medium truncate">{label}</h3>- <p className="text-xs text-muted-foreground truncate">{description || label}</p>- </div>- {!disabled && (- <GripVertical className="h-4 w-4 text-muted-foreground/50 group-hover:text-muted-foreground flex-shrink-0" />- )}+ <div className="flex justify-center items-center bg-background w-full text-left h-20 border rounded-lg">+ <IconContainer size={18} icon={icon} color={color} type={type} />+ </div>+ <div className="space-y-1 truncate flex-1">+ <h3 className="text-xs font-normal opacity-60 truncate">{label}</h3></div></button></TooltipTrigger>diff --git a/flowsint-app/src/renderer/src/components/sketches/dynamic-form.tsx b/flowsint-app/src/renderer/src/components/graphs/dynamic-form.tsxsimilarity index 99%rename from flowsint-app/src/renderer/src/components/sketches/dynamic-form.tsxrename to flowsint-app/src/renderer/src/components/graphs/dynamic-form.tsxindex 1400e3ab..3f2dfc6f 100644--- a/flowsint-app/src/renderer/src/components/sketches/dynamic-form.tsx+++ b/flowsint-app/src/renderer/src/components/graphs/dynamic-form.tsx@@ -16,7 +16,7 @@ import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popoverimport { Calendar } from "@/components/ui/calendar"import { cn } from "@/lib/utils"import type { FormField } from "@/lib/action-items"-import { MetadataField } from "@/components/sketches/metadata-field"+import { MetadataField } from "@/components/graphs/metadata-field"import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@/components/ui/tooltip"import { toast } from "sonner"diff --git a/flowsint-app/src/renderer/src/components/sketches/empty-state.tsx b/flowsint-app/src/renderer/src/components/graphs/empty-state.tsxsimilarity index 100%rename from flowsint-app/src/renderer/src/components/sketches/empty-state.tsxrename to flowsint-app/src/renderer/src/components/graphs/empty-state.tsxdiff --git a/flowsint-app/src/renderer/src/components/graphs/graph-navigation.tsx b/flowsint-app/src/renderer/src/components/graphs/graph-navigation.tsxindex e989b8c5..1b6639e2 100644--- a/flowsint-app/src/renderer/src/components/graphs/graph-navigation.tsx+++ b/flowsint-app/src/renderer/src/components/graphs/graph-navigation.tsx@@ -1,4 +1,4 @@-import { useSketchStore } from "@/stores/sketch-store"+import { useGraphStore } from "@/stores/graph-store"import NodesPanel from "./nodes-panel"import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"import { UserPlus, Users } from "lucide-react"@@ -7,8 +7,8 @@ import DetailsPanel from "./details-panel"import { ResizableHandle, ResizablePanel, ResizablePanelGroup } from "../ui/resizable"const GraphNavigation = () => {- const nodes = useSketchStore((s) => s.nodes)- const currentNode = useSketchStore((s) => s.currentNode)+ const nodes = useGraphStore((s) => s.nodes)+ const currentNode = useGraphStore((s) => s.currentNode)return (<div className="h-full w-full min-h-0">diff --git a/flowsint-app/src/renderer/src/components/graphs/graph-panel.tsx b/flowsint-app/src/renderer/src/components/graphs/graph-panel.tsxindex 34d80b3e..4522da2d 100644--- a/flowsint-app/src/renderer/src/components/graphs/graph-panel.tsx+++ b/flowsint-app/src/renderer/src/components/graphs/graph-panel.tsx@@ -1,19 +1,17 @@import { useLoaderData } from '@tanstack/react-router'import { useEffect, useRef, memo, useState, lazy, Suspense } from 'react'-// import Graph from '../sketches/graph'-import { useSketchStore } from '@/stores/sketch-store'-import { Toolbar } from '../sketches/toolbar'+import { useGraphStore, type GraphNode, type GraphEdge } from '@/stores/graph-store'+import { Toolbar } from './toolbar'import { cn } from '@/lib/utils'import { ArrowDownToLineIcon } from 'lucide-react'import { CreateRelationDialog } from './create-relation'-// import GraphSigma from '../sketches/graph-sigma'-import type { NodeData, EdgeData } from '@/types'import GraphLoader from './graph-loader'import Loader from '../loader'--const GraphReactForce = lazy(() => import('../sketches/graph-react-force'))-const Graph = lazy(() => import('../sketches/graph'))-// const GraphSigma = lazy(() => import('../sketches/graph-sigma'))+import WallEditor from './wall/wall'+import GraphReactForce from './graph-react-force'+import { useGraphControls } from '@/stores/graph-controls-store'+// const GraphReactForce = lazy(() => import('./graph-react-force'))+const Graph = lazy(() => import('./graph'))// Separate component for the drag overlay@@ -32,15 +30,18 @@ const DragOverlay = memo(({ isDragging }: { isDragging: boolean }) => (DragOverlay.displayName = 'DragOverlay'interface GraphPanelProps {- graphData: { nds: NodeData[]; rls: EdgeData[] } | null;+ graphData: { nds: GraphNode[]; rls: GraphEdge[] } | null;isLoading: boolean;+ isRefetching: boolean;}-const GraphPanel = ({ graphData, isLoading }: GraphPanelProps) => {+const GraphPanel = ({ graphData, isLoading, isRefetching }: GraphPanelProps) => {const graphPanelRef = useRef<HTMLDivElement>(null)- const handleOpenFormModal = useSketchStore(s => s.handleOpenFormModal)- const nodes = useSketchStore(s => s.nodes)- const updateGraphData = useSketchStore(s => s.updateGraphData)+ const [loading, setLoading] = useState(isLoading)+ const handleOpenFormModal = useGraphStore(s => s.handleOpenFormModal)+ const nodes = useGraphStore(s => s.nodes)+ const view = useGraphControls((s) => s.view)+ const updateGraphData = useGraphStore(s => s.updateGraphData)const { sketch } = useLoaderData({from: '/_auth/dashboard/investigations/$investigationId/$type/$id',})@@ -49,8 +50,9 @@ const GraphPanel = ({ graphData, isLoading }: GraphPanelProps) => {useEffect(() => {if (graphData?.nds && graphData?.rls) {updateGraphData(graphData.nds, graphData.rls)+ setLoading(false)}- }, [graphData])+ }, [graphData, setLoading])const handleDragOver = (e: React.DragEvent<HTMLDivElement>) => {e.preventDefault()@@ -114,13 +116,13 @@ const GraphPanel = ({ graphData, isLoading }: GraphPanelProps) => {</div></div>}>- {nodes?.length > 500 ? <Graph /> : <GraphReactForce />}+ {nodes?.length > 400 || view === "force" ? <Graph /> : <WallEditor isRefetching={isRefetching} isLoading={loading} />}{/* <GraphReactForce /> */}</Suspense>{/* <Graph /> */}{/* <GraphSigma /> */}<DragOverlay isDragging={isDraggingOver} />- <div className='absolute w-10 right-3 top-3 h-min shadow-sm border rounded-full overflow-y-auto'>+ <div className='absolute left-3 top-3'><Toolbar isLoading={isLoading} /></div><CreateRelationDialog />diff --git a/flowsint-app/src/renderer/src/components/sketches/graph-react-force.tsx b/flowsint-app/src/renderer/src/components/graphs/graph-react-force.tsxsimilarity index 91%rename from flowsint-app/src/renderer/src/components/sketches/graph-react-force.tsxrename to flowsint-app/src/renderer/src/components/graphs/graph-react-force.tsxindex ea7bdd3d..31cad29a 100644--- a/flowsint-app/src/renderer/src/components/sketches/graph-react-force.tsx+++ b/flowsint-app/src/renderer/src/components/graphs/graph-react-force.tsx@@ -1,9 +1,8 @@import React, { useCallback, useMemo, useEffect, useState } from 'react';import ForceGraph2D from 'react-force-graph-2d';-import { useSketchStore } from '@/stores/sketch-store';+import { GraphEdge, GraphNode, useGraphStore } from '@/stores/graph-store';import { useNodesDisplaySettings } from '@/stores/node-display-settings';import { useGraphControls } from '@/stores/graph-controls-store';-import type { NodeData, EdgeData } from '@/types';import type { ItemType } from '@/stores/node-display-settings';import EmptyState from './empty-state';import { useTheme } from '../theme-provider';@@ -15,14 +14,14 @@ interface GraphReactForceProps {const NODE_COUNT_THRESHOLD = 500;const GraphReactForce: React.FC<GraphReactForceProps> = () => {- const nodes = useSketchStore(s => s.nodes) as NodeData[];- const rawEdges = useSketchStore(s => s.edges) as EdgeData[];+ const nodes = useGraphStore(s => s.nodes) as GraphNode[];+ const rawEdges = useGraphStore(s => s.edges) as GraphEdge[];const { theme } = useTheme();const getSize = useNodesDisplaySettings(s => s.getSize);const colors = useNodesDisplaySettings(s => s.colors) as Record<ItemType, string>;- const toggleNodeSelection = useSketchStore(s => s.toggleNodeSelection);- const clearSelectedNodes = useSketchStore(s => s.clearSelectedNodes);- // const currentNode = useSketchStore(s => s.currentNode);+ const toggleNodeSelection = useGraphStore(s => s.toggleNodeSelection);+ const clearSelectedNodes = useGraphStore(s => s.clearSelectedNodes);+ // const currentNode = useGraphStore(s => s.currentNode);const setActions = useGraphControls(s => s.setActions);const shouldUseSimpleRendering = useMemo(() => nodes.length > NODE_COUNT_THRESHOLD, [nodes.length]);@@ -30,10 +29,10 @@ const GraphReactForce: React.FC<GraphReactForceProps> = () => {// Transform data for Force Graphconst graphData = useMemo(() => {const transformedNodes = nodes.map(node => {- const type = node.type || node.data?.type;+ const type = node.data?.type as ItemType;const color = colors[type] || '#0074D9';const size = getSize(type);- let nodeLabel = node.label;+ let nodeLabel = node.data.label;if (!nodeLabel && 'caption' in node) nodeLabel = (node as any).caption;if (!nodeLabel) nodeLabel = node.id;@@ -48,7 +47,7 @@ const GraphReactForce: React.FC<GraphReactForceProps> = () => {const edgeGroups = new Map();rawEdges.forEach(edge => {- const key = `${edge.from}-${edge.to}`;+ const key = `${edge.source}-${edge.target}`;if (!edgeGroups.has(key)) {edgeGroups.set(key, []);}@@ -56,7 +55,7 @@ const GraphReactForce: React.FC<GraphReactForceProps> = () => {});const transformedEdges = rawEdges.map((edge) => {- const key = `${edge.from}-${edge.to}`;+ const key = `${edge.source}-${edge.target}`;const group = edgeGroups.get(key);const groupIndex = group.indexOf(edge);const groupSize = group.length;@@ -65,8 +64,6 @@ const GraphReactForce: React.FC<GraphReactForceProps> = () => {return {...edge,edgeLabel: edge.label,- source: edge.from,- target: edge.to,curve: curve,groupIndex: groupIndex,groupSize: groupSize@@ -103,7 +100,7 @@ const GraphReactForce: React.FC<GraphReactForceProps> = () => {const renderNode = useCallback((node: any, ctx: CanvasRenderingContext2D, globalScale: number) => {const size = node.nodeSize;-+if (shouldUseSimpleRendering) {// Simple circle rendering for large node countsctx.beginPath();@@ -128,7 +125,7 @@ const GraphReactForce: React.FC<GraphReactForceProps> = () => {ctx.font = `${fontSize}px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif`;const textWidth = ctx.measureText(label).width;const padding = 2;-+ctx.fillStyle = 'rgba(255, 255, 255, 0.45)';ctx.strokeStyle = 'rgba(0, 0, 0, 0.05)';ctx.lineWidth = 0.2;@@ -136,12 +133,12 @@ const GraphReactForce: React.FC<GraphReactForceProps> = () => {const bgHeight = fontSize + padding;const bgX = node.x - bgWidth / 2;const bgY = node.y + size / 2 + 1;-+ctx.beginPath();ctx.roundRect(bgX, bgY, bgWidth, bgHeight, 2);ctx.fill();ctx.stroke();-+ctx.fillStyle = theme === "dark" ? 'rgb(255, 255, 255)' : 'rgb(0, 0, 0)';ctx.textAlign = 'center';ctx.textBaseline = 'middle';@@ -204,7 +201,6 @@ const GraphReactForce: React.FC<GraphReactForceProps> = () => {onNodeClick={handleNodeClick}onBackgroundClick={handleBackgroundClick}linkCurvature={link => link.curve}- linkLabel={link => link.edgeLabel}linkDirectionalParticles={link => link.__highlighted ? 2 : 0}linkDirectionalParticleSpeed={0.005}linkWidth={link => link.__highlighted ? 2 : link.__dimmed ? 0.5 : 1}diff --git a/flowsint-app/src/renderer/src/components/sketches/graph.tsx b/flowsint-app/src/renderer/src/components/graphs/graph.tsxsimilarity index 91%rename from flowsint-app/src/renderer/src/components/sketches/graph.tsxrename to flowsint-app/src/renderer/src/components/graphs/graph.tsxindex b1bd07db..c202ec40 100644--- a/flowsint-app/src/renderer/src/components/sketches/graph.tsx+++ b/flowsint-app/src/renderer/src/components/graphs/graph.tsx@@ -1,6 +1,6 @@import { useCallback, useEffect, memo, lazy, Suspense, useRef, useState } from "react"import { Cosmograph, CosmographProvider, useCosmograph } from '@cosmograph/react'-import { useSketchStore } from "@/stores/sketch-store"+import { useGraphStore } from "@/stores/graph-store"import { useNodesDisplaySettings } from "@/stores/node-display-settings"import Loader from "@/components/shared/loader"import { useGraphControls } from "@/stores/graph-controls-store"@@ -84,12 +84,12 @@ const GRAPH_CONFIG = {}const GraphContent = memo(() => {- const nodes = useSketchStore(s => s.nodes)- const edges = useSketchStore(s => s.edges)- const currentNode = useSketchStore(s => s.currentNode)+ const nodes = useGraphStore(s => s.nodes)+ const edges = useGraphStore(s => s.edges)+ const currentNode = useGraphStore(s => s.currentNode)const { isCosmographReady, loadingStage, handleSimulationStart, handleSimulationEnd } = useCosmographLoader(nodes, edges)- const clearSelectedNodes = useSketchStore(s => s.clearSelectedNodes)- const toggleNodeSelection = useSketchStore(s => s.toggleNodeSelection)+ const clearSelectedNodes = useGraphStore(s => s.clearSelectedNodes)+ const toggleNodeSelection = useGraphStore(s => s.toggleNodeSelection)const colors = useNodesDisplaySettings(s => s.colors)const getSize = useNodesDisplaySettings(s => s.getSize)const getIcon = useNodesDisplaySettings(s => s.getIcon)@@ -120,10 +120,10 @@ const GraphContent = memo(() => {}, [toggleNodeSelection, clearSelectedNodes, cosmograph?.cosmograph])// Fonctions de style stables- const nodeColorFunction = useCallback((n: CosmosInputNode & { type?: string }) =>- colors[n.type as keyof typeof colors] || "#000000", [colors])+ const nodeColorFunction = useCallback((n: CosmosInputNode & { data?: { type?: string } }) =>+ colors[n.data?.type as keyof typeof colors] || "#000000", [colors])- const nodeSizeFunction = useCallback((n: any) => getSize(n.type), [getSize])+ const nodeSizeFunction = useCallback((n: any) => getSize(n.data?.type), [getSize])const nodeLabelFunction = useCallback((n: any) => `${getIcon(n.data.type)} ${n.label}`, [getIcon])@@ -225,15 +225,9 @@ const GraphProvider = memo(({ nodes, edges, children }: {edges: any[],children: React.ReactNode}) => {- // Transform edges to use source/target instead of from/to- const transformedEdges = edges.map(edge => ({- ...edge,- source: edge.from,- target: edge.to- }))return (- <CosmographProvider nodes={nodes} links={transformedEdges}>+ <CosmographProvider nodes={nodes} links={edges}>{children}</CosmographProvider>)@@ -242,8 +236,8 @@ GraphProvider.displayName = "GraphProvider"// Composant principal avec optimisations maximalesconst Graph = memo(() => {- const nodes = useSketchStore(s => s.nodes)- const edges = useSketchStore(s => s.edges)+ const nodes = useGraphStore(s => s.nodes)+ const edges = useGraphStore(s => s.edges)if (!nodes.length) {return <EmptyState />diff --git a/flowsint-app/src/renderer/src/components/graphs/items-panel.tsx b/flowsint-app/src/renderer/src/components/graphs/items-panel.tsxindex 88924733..03acda34 100644--- a/flowsint-app/src/renderer/src/components/graphs/items-panel.tsx+++ b/flowsint-app/src/renderer/src/components/graphs/items-panel.tsx@@ -1,13 +1,12 @@"use client"import { Button } from "@/components/ui/button"-import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from "@/components/ui/accordion"import { PlusIcon, Search } from "lucide-react"import { memo, useCallback, useState } from "react"import { type ActionItem, actionItems } from "@/lib/action-items"import { DraggableItem } from "./draggable-item"import { Input } from "@/components/ui/input"-import NewActions from "@/components/sketches/new-actions"+import NewActions from "@/components/graphs/new-actions"export const ItemsPanel = memo(function LeftPanel() {const [searchQuery, setSearchQuery] = useState<string>("")@@ -41,36 +40,32 @@ export const ItemsPanel = memo(function LeftPanel() {/></div></div>- <div className="grid grid-cols-1 gap-2">+ <div className="grid grid-cols-1 gap-3">{actionItems.map((item: ActionItem) => {if (item.children && item.children.length > 0) {return (- <Accordion key={item.id} type="single" collapsible className="border-b border-border">- <AccordionItem value={item.id.toString()}>- <AccordionTrigger className="py-1 text-sm text-muted-foreground">- <div className="flex items-center gap-2">- <span>{item.label}</span>- {item.comingSoon && <span className="ml-1 text-xs text-muted-foreground">(Soon)</span>}- </div>- </AccordionTrigger>- <AccordionContent>- <div className="grid grid-cols-1 gap-2 p-2">- {item.children.map((childItem) => (- <DraggableItem- key={childItem.id}- itemKey={childItem.key}- label={childItem.label}- icon={childItem.icon}- type={childItem.type}- color={childItem.color}- disabled={childItem.disabled}- description={childItem.fields.map((n) => n.name).join(", ")}- />- ))}- </div>- </AccordionContent>- </AccordionItem>- </Accordion>+ <div key={item.id} className="@container">+ <div className="py-1 text-sm text-muted-foreground">+ <div className="flex items-center gap-2">+ <span>{item.label} ({item.children.length})</span>+ {item.comingSoon && <span className="ml-1 text-xs text-muted-foreground">(Soon)</span>}+ </div>+ </div>+ <div className="grid grid-cols-2 @xs:grid-cols-3 @sm:grid-cols-4 @md:grid-cols-5 gap-2">+ {item.children.map((childItem) => (+ <DraggableItem+ key={childItem.id}+ itemKey={childItem.key}+ label={childItem.label}+ icon={childItem.icon}+ type={childItem.type}+ color={childItem.color}+ disabled={childItem.disabled}+ description={childItem.fields.map((n) => n.name).join(", ")}+ />+ ))}+ </div>+ </div>)}return (diff --git a/flowsint-app/src/renderer/src/components/sketches/legend.tsx b/flowsint-app/src/renderer/src/components/graphs/legend.tsxsimilarity index 100%rename from flowsint-app/src/renderer/src/components/sketches/legend.tsxrename to flowsint-app/src/renderer/src/components/graphs/legend.tsxdiff --git a/flowsint-app/src/renderer/src/components/sketches/metadata-field.tsx b/flowsint-app/src/renderer/src/components/graphs/metadata-field.tsxsimilarity index 100%rename from flowsint-app/src/renderer/src/components/sketches/metadata-field.tsxrename to flowsint-app/src/renderer/src/components/graphs/metadata-field.tsxdiff --git a/flowsint-app/src/renderer/src/components/sketches/new-actions.tsx b/flowsint-app/src/renderer/src/components/graphs/new-actions.tsxsimilarity index 91%rename from flowsint-app/src/renderer/src/components/sketches/new-actions.tsxrename to flowsint-app/src/renderer/src/components/graphs/new-actions.tsxindex 85000437..646d013e 100644--- a/flowsint-app/src/renderer/src/components/sketches/new-actions.tsx+++ b/flowsint-app/src/renderer/src/components/graphs/new-actions.tsx@@ -10,10 +10,10 @@ import { Dialog, DialogContent, DialogDescription, DialogTitle } from "@/componeimport { actionItems, type ActionItem, type FormField } from "@/lib/action-items"import { Card, CardContent } from "@/components/ui/card"import { AnimatePresence, motion } from "framer-motion"-import { DynamicForm } from "@/components/sketches/dynamic-form"+import { DynamicForm } from "@/components/graphs/dynamic-form"import { Badge } from "@/components/ui/badge"import { useNodesDisplaySettings } from "@/stores/node-display-settings"-import { useSketchStore } from "@/stores/sketch-store"+import { useGraphStore } from "@/stores/graph-store"import { DialogTrigger } from "@radix-ui/react-dialog"import { sketchService } from "@/api/sketch-service"import { useParams } from "@tanstack/react-router"@@ -25,16 +25,15 @@ interface ActionDialogProps {export default function ActionDialog({ children, setCurrentNode }: ActionDialogProps) {const colors = useNodesDisplaySettings(s => s.colors)- const handleOpenFormModal = useSketchStore(state => state.handleOpenFormModal)- const currentNodeType = useSketchStore(state => state.currentNodeType)- const openMainDialog = useSketchStore(state => state.openMainDialog)- const setOpenMainDialog = useSketchStore(state => state.setOpenMainDialog)- const openFormDialog = useSketchStore(state => state.openFormDialog)- const setOpenFormDialog = useSketchStore(state => state.setOpenFormDialog)- const addNode = useSketchStore(state => state.addNode)+ const handleOpenFormModal = useGraphStore(state => state.handleOpenFormModal)+ const currentNodeType = useGraphStore(state => state.currentNodeType)+ const openMainDialog = useGraphStore(state => state.openMainDialog)+ const setOpenMainDialog = useGraphStore(state => state.setOpenMainDialog)+ const openFormDialog = useGraphStore(state => state.openFormDialog)+ const setOpenFormDialog = useGraphStore(state => state.setOpenFormDialog)+ const addNode = useGraphStore(state => state.addNode)const { id } = useParams({ strict: false })-const [currentParent, setCurrentParent] = useState<ActionItem | null>(null)const [navigationHistory, setNavigationHistory] = useState<ActionItem[]>([])@@ -49,7 +48,7 @@ export default function ActionDialog({ children, setCurrentNode }: ActionDialogPconst type = currentNodeType.typeconst color = colors[type as keyof typeof colors]const newNode = {- type: type,+ type: "custom",caption: label,label: label,color,@@ -57,7 +56,7 @@ export default function ActionDialog({ children, setCurrentNode }: ActionDialogP...flattenObj(data),color,label,- type,+ type: type.toLowerCase(),},}if (addNode) addNode(newNode as any)diff --git a/flowsint-app/src/renderer/src/components/sketches/new-sketch.tsx b/flowsint-app/src/renderer/src/components/graphs/new-sketch.tsxsimilarity index 100%rename from flowsint-app/src/renderer/src/components/sketches/new-sketch.tsxrename to flowsint-app/src/renderer/src/components/graphs/new-sketch.tsxdiff --git a/flowsint-app/src/renderer/src/components/graphs/nodes-panel.tsx b/flowsint-app/src/renderer/src/components/graphs/nodes-panel.tsxindex 4e74e177..095d929f 100644--- a/flowsint-app/src/renderer/src/components/graphs/nodes-panel.tsx+++ b/flowsint-app/src/renderer/src/components/graphs/nodes-panel.tsx@@ -1,7 +1,7 @@import type React from "react"import { memo, useMemo, useState, useCallback, useRef } from "react"import { useVirtualizer } from '@tanstack/react-virtual'-import { useSketchStore } from "@/stores/sketch-store"+import { useGraphStore } from "@/stores/graph-store"import { Button } from "@/components/ui/button"import { Badge } from "@/components/ui/badge"import { TypeBadge } from "@/components/type-badge"@@ -18,7 +18,7 @@ import {DropdownMenuSeparator,DropdownMenuTrigger,} from "@/components/ui/dropdown-menu"-import type { NodeData } from "@/types"+import type { GraphNode } from "@/stores/graph-store"import { Checkbox } from "@/components/ui/checkbox"// Hauteur fixe pour chaque item (en pixels)@@ -33,8 +33,8 @@ const SocialNode = memo(isNodeChecked,}: {node: any- setCurrentNode: (node: NodeData) => void- onCheckboxChange: (node: NodeData, checked: boolean) => void+ setCurrentNode: (node: GraphNode) => void+ onCheckboxChange: (node: GraphNode, checked: boolean) => voidisNodeChecked: (nodeId: string) => boolean}) => {const platformsIcons = usePlatformIcons()@@ -88,8 +88,8 @@ const NodeRenderer = memo(isNodeChecked,}: {node: any- setCurrentNode: (node: NodeData) => void- onCheckboxChange: (node: NodeData, checked: boolean) => void+ setCurrentNode: (node: GraphNode) => void+ onCheckboxChange: (node: GraphNode, checked: boolean) => voidisNodeChecked: (nodeId: string) => boolean}) => {const handleClick = useCallback(() => setCurrentNode(node), [node, setCurrentNode])@@ -139,9 +139,9 @@ const VirtualizedItem = memo(({isNodeChecked}: {index: number- node: NodeData- setCurrentNode: (node: NodeData) => void- onCheckboxChange: (node: NodeData, checked: boolean) => void+ node: GraphNode+ setCurrentNode: (node: GraphNode) => void+ onCheckboxChange: (node: GraphNode, checked: boolean) => voidisNodeChecked: (nodeId: string) => boolean}) => {return (@@ -154,10 +154,10 @@ const VirtualizedItem = memo(({)})-const NodesPanel = memo(({ nodes, isLoading }: { nodes: NodeData[]; isLoading?: boolean }) => {- const setCurrentNode = useSketchStore((state) => state.setCurrentNode)- const setSelectedNodes = useSketchStore((state) => state.setSelectedNodes)- const selectedNodes = useSketchStore((state) => state.selectedNodes || [])+const NodesPanel = memo(({ nodes, isLoading }: { nodes: GraphNode[]; isLoading?: boolean }) => {+ const setCurrentNode = useGraphStore((state) => state.setCurrentNode)+ const setSelectedNodes = useGraphStore((state) => state.setSelectedNodes)+ const selectedNodes = useGraphStore((state) => state.selectedNodes || [])const [searchQuery, setSearchQuery] = useState<string>("")const [filters, setFilters] = useState<null | string[]>(null)@@ -213,7 +213,7 @@ const NodesPanel = memo(({ nodes, isLoading }: { nodes: NodeData[]; isLoading?:)const handleCheckboxChange = useCallback(- (node: NodeData, checked: boolean) => {+ (node: GraphNode, checked: boolean) => {if (checked) {setSelectedNodes([...selectedNodes.filter((n) => n.id !== node.id), node])} else {diff --git a/flowsint-app/src/renderer/src/components/graphs/toolbar.tsx b/flowsint-app/src/renderer/src/components/graphs/toolbar.tsxnew file mode 100644index 00000000..98a981fb--- /dev/null+++ b/flowsint-app/src/renderer/src/components/graphs/toolbar.tsx@@ -0,0 +1,168 @@+"use client"++import { Button } from "@/components/ui/button"+import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@/components/ui/tooltip"+import { useConfirm } from "@/components/use-confirm-dialog"+import { useGraphControls } from "@/stores/graph-controls-store"+import { useGraphStore } from "@/stores/graph-store"+import { useModalStore } from "@/stores/store-settings"+import {+ Filter,+ Maximize,+ Minus,+ Trash,+ ZoomIn,+ Settings,+ RotateCw,+ GitPullRequestCreate,+ GitFork,+ Waypoints,+} from "lucide-react"+import { memo, useCallback } from "react"+import { sketchService } from "@/api/sketch-service"+import { useParams } from "@tanstack/react-router"+import { toast } from "sonner"+import { cn } from "@/lib/utils"++// Tooltip wrapper component to avoid repetition+const ToolbarButton = memo(function ToolbarButton({+ icon,+ tooltip,+ onClick,+ disabled = false,+ badge = null+}: {+ icon: React.ReactNode;+ tooltip: string | React.ReactNode;+ onClick?: () => void;+ disabled?: boolean;+ badge?: number | null;+}) {+ return (+ <Tooltip>+ <TooltipTrigger asChild>+ <div>+ <Button+ onClick={onClick}+ disabled={disabled}+ variant="outline"+ size="icon"+ className="h-8 w-8 relative shadow-none"+ >+ {icon}+ {badge && <span className="absolute -top-2 -right-2 z-50 bg-primary text-white text-[10px] rounded-full w-4.5 h-4.5 flex items-center justify-center line-height-0">{badge}</span>}+ </Button>+ </div>+ </TooltipTrigger>+ <TooltipContent>{tooltip}</TooltipContent>+ </Tooltip>+ )+})+export const Toolbar = memo(function Toolbar({ isLoading }: { isLoading: boolean }) {+ const { id: sketchId } = useParams({ from: "/_auth/dashboard/investigations/$investigationId/$type/$id" })+ const selectedNodes = useGraphStore((state) => state.selectedNodes || [])+ const setOpenAddRelationDialog = useGraphStore((state) => state.setOpenAddRelationDialog)+ const setView = useGraphControls((s) => s.setView)+ const removeNodes = useGraphStore((state) => state.removeNodes)+ const toggleSettings = useModalStore((s) => s.toggleSettings)+ const zoomToFit = useGraphControls((s) => s.zoomToFit);+ const zoomIn = useGraphControls((s) => s.zoomIn);+ const zoomOut = useGraphControls((s) => s.zoomOut);+ const onLayout = useGraphControls((s) => s.onLayout);+ const { confirm } = useConfirm()+ const refetchGraph = useGraphControls((s) => s.refetchGraph)++ const handleRefresh = useCallback(() => {+ try {+ refetchGraph()+ onLayout("dagre")+ } catch (error) {+ toast.error("Failed to refresh graph data");+ }+ }, [refetchGraph, onLayout]);++ const handleOpenRelationshipDialog = useCallback(() => {+ setOpenAddRelationDialog(true)+ }, [])++ const handleDeleteNodes = async () => {+ if (!selectedNodes.length) return+ if (!await confirm({ title: `You are about to delete ${selectedNodes.length} node(s).`, message: "The action is irreversible." })) return++ toast.promise(+ (async () => {+ removeNodes(selectedNodes.map((n) => n.id))+ return sketchService.deleteNodes(sketchId, JSON.stringify({ nodeIds: selectedNodes.map((n) => n.id) }))+ })(),+ {+ loading: `Deleting ${selectedNodes.length} node(s)...`,+ success: 'Nodes deleted successfully.',+ error: 'Failed to delete nodes.'+ }+ )+ }+ const isMoreThanZero = selectedNodes.length > 0+ const isTwo = selectedNodes.length == 2++ const handleForceLayout = useCallback(() => {+ setView("force")+ }, [setView])++ const handleDagreLayout = useCallback(() => {+ setView("hierarchy")+ onLayout && onLayout("dagre")+ }, [onLayout, setView])++ return (+ <div className="flex justify-start gap-2 items-center space-y-1 py-1">+ <TooltipProvider>+ <ToolbarButton+ onClick={handleOpenRelationshipDialog}+ icon={<GitPullRequestCreate className="h-4 w-4 opacity-70" />}+ tooltip="Create relation"+ disabled={!isTwo}+ />+ <ToolbarButton+ onClick={handleDeleteNodes}+ icon={<Trash className="h-4 w-4 opacity-70" />}+ tooltip="Delete"+ disabled={!isMoreThanZero}+ badge={isMoreThanZero ? selectedNodes.length : null}+ />+ {/* <ToolbarButton disabled icon={<Filter className="h-4 w-4 opacity-70" />} tooltip="Filter" /> */}+ <ToolbarButton+ icon={<ZoomIn className="h-4 w-4 opacity-70" />}+ tooltip="Zoom In"+ onClick={zoomIn}+ />+ <ToolbarButton+ icon={<Minus className="h-4 w-4 opacity-70" />}+ tooltip="Zoom Out"+ onClick={zoomOut}+ />+ <ToolbarButton+ icon={<Maximize className="h-4 w-4 opacity-70" />}+ tooltip="Fit to View"+ onClick={zoomToFit}+ />+ <ToolbarButton+ icon={<Waypoints className="h-4 w-4 opacity-70" />}+ tooltip="Graph"+ onClick={handleForceLayout}+ />+ <ToolbarButton+ icon={<GitFork className="h-4 w-4 opacity-70" />}+ tooltip="Hierarchy"+ onClick={handleDagreLayout}+ />+ {/* <ToolbarButton onClick={toggleSettings} icon={<Settings className="h-4 w-4 opacity-70" />} tooltip="Settings" /> */}+ <ToolbarButton+ onClick={handleRefresh}+ disabled={isLoading}+ icon={<RotateCw className={cn("h-4 w-4 opacity-70", isLoading && "animate-spin")} />}+ tooltip="Refresh Graph Data"+ />+ </TooltipProvider>+ </div>+ )+})\ No newline at end of filediff --git a/flowsint-app/src/renderer/src/components/graphs/wall/custom/connection-line.tsx b/flowsint-app/src/renderer/src/components/graphs/wall/custom/connection-line.tsxnew file mode 100644index 00000000..bca82abe--- /dev/null+++ b/flowsint-app/src/renderer/src/components/graphs/wall/custom/connection-line.tsx@@ -0,0 +1,75 @@+import { getBezierPath } from '@xyflow/react';+import { getEdgeParams } from '@/lib/utils';+import { memo, useMemo } from 'react';+import { Position, Node } from '@xyflow/react';++interface FloatingConnectionLineProps {+ toX: number;+ toY: number;+ fromPosition: Position;+ toPosition: Position;+ fromNode: Node;+}++const FloatingConnectionLine = memo(function FloatingConnectionLine({+ toX,+ toY,+ fromPosition,+ toPosition,+ fromNode,+}: FloatingConnectionLineProps) {+ if (!fromNode) {+ return null;+ }++ // Create a mock target node at the cursor position+ const targetNode = useMemo(() => ({+ id: 'connection-target',+ measured: {+ width: 1,+ height: 1,+ },+ internals: {+ positionAbsolute: { x: toX, y: toY },+ },+ }), [toX, toY]);++ const { sx, sy, tx, ty, sourcePos, targetPos } = useMemo(() => getEdgeParams(+ fromNode as Node & {+ internals: { positionAbsolute: { x: number; y: number } };+ measured: { width: number; height: number };+ },+ targetNode,+ ), [fromNode, targetNode]);++ const [edgePath] = useMemo(() => getBezierPath({+ sourceX: sx,+ sourceY: sy,+ sourcePosition: sourcePos || fromPosition,+ targetPosition: targetPos || toPosition,+ targetX: tx || toX,+ targetY: ty || toY,+ }), [sx, sy, sourcePos, fromPosition, targetPos, toPosition, tx, toX, ty, toY]);++ return (+ <g>+ <path+ fill="none"+ stroke="#222"+ strokeWidth={1.5}+ className="animated"+ d={edgePath}+ />+ <circle+ cx={tx || toX}+ cy={ty || toY}+ fill="#fff"+ r={3}+ stroke="#222"+ strokeWidth={1.5}+ />+ </g>+ );+});++export default FloatingConnectionLine;\ No newline at end of filediff --git a/flowsint-app/src/renderer/src/components/graphs/wall/custom/context-menu.tsx b/flowsint-app/src/renderer/src/components/graphs/wall/custom/context-menu.tsxnew file mode 100644index 00000000..62e78a02--- /dev/null+++ b/flowsint-app/src/renderer/src/components/graphs/wall/custom/context-menu.tsx@@ -0,0 +1,167 @@+import React, { useState } from 'react';+import { transformService } from '@/api/transfrom-service';+import { useQuery } from '@tanstack/react-query';+import { Skeleton } from '@/components/ui/skeleton';+import { Button } from '@/components/ui/button';+import { Input } from '@/components/ui/input';+import { Pencil, Trash2, FileCode2, Search, Info, Star } from 'lucide-react';+import { Transform } from '@/types';+import { GraphNode } from '@/stores/graph-store';+import { useLaunchTransform } from '@/hooks/use-launch-transform';+import { useParams } from '@tanstack/react-router';++export default function ContextMenu({+ node,+ top,+ left,+ right,+ bottom,+ onEdit,+ onDelete,+ ...props+}: {+ node: GraphNode;+ top: number;+ left: number;+ right: number;+ bottom: number;+ onEdit?: () => void;+ onDelete?: () => void;+ [key: string]: any;+}) {+ const { id } = useParams({ strict: false })+ const [searchQuery, setSearchQuery] = useState('');+ const { launchTransform } = useLaunchTransform(false);+ const { data: transforms, isLoading } = useQuery({+ queryKey: ["transforms"],+ queryFn: () => transformService.get(),+ });++ const filteredTransforms = transforms?.filter((transform: Transform) => {+ if (!searchQuery.trim()) return true;+ const query = searchQuery.toLowerCase().trim();+ const matchesName = transform.name?.toLowerCase().includes(query);+ const matchesDescription = transform.description?.toLowerCase().includes(query);+ return matchesName || matchesDescription;+ }) || [];++ const handleMenuClick = (e: React.MouseEvent) => {+ e.stopPropagation();+ };++ const handleButtonClick = (e: React.MouseEvent, action?: () => void) => {+ e.stopPropagation();+ action?.();+ };++ const handleTransformClick = (e: React.MouseEvent, transformId: string) => {+ e.stopPropagation();+ launchTransform([node.data.label], transformId, id)+ };++ return (+ <div+ style={{ top, left, right, bottom }}+ className="bg-background border border-border flex flex-col rounded-lg shadow-lg absolute z-50 w-80 h-96"+ onClick={handleMenuClick}+ {...props}+ >+ {/* Header with title and action buttons */}+ <div className="px-3 py-2 border-b border-border flex items-center justify-between">+ <p className="text-xs text-muted-foreground font-medium truncate flex-1">+ {node.data.label} - {node.data.type}+ </p>+ <div className="flex items-center gap-1 ml-2">+ <Button+ variant="ghost"+ size="sm"+ className="h-6 w-6 p-0 hover:bg-muted opacity-70 hover:opacity-100"+ onClick={(e) => handleButtonClick(e, onEdit)}+ >+ <Pencil className="h-3 w-3" strokeWidth={1.5} />+ </Button>+ <Button+ variant="ghost"+ size="sm"+ className="h-6 w-6 p-0 hover:bg-muted opacity-70 hover:opacity-100 text-destructive hover:text-destructive"+ onClick={(e) => handleButtonClick(e, onDelete)}+ >+ <Trash2 className="h-3 w-3" strokeWidth={1.5} />+ </Button>+ </div>+ </div>++ {/* Search bar */}+ <div className="px-3 py-2 border-b border-border">+ <div className="relative">+ <Search className="absolute left-2 top-1/2 transform -translate-y-1/2 h-3 w-3 text-muted-foreground" />+ <Input+ type="search"+ placeholder="Search transforms..."+ value={searchQuery}+ onChange={(e) => {+ e.stopPropagation();+ setSearchQuery(e.target.value);+ }}+ onClick={(e) => e.stopPropagation()}+ className="h-7 pl-7 text-xs"+ />+ </div>+ </div>++ {/* Transforms list */}+ <div className="flex-1 overflow-auto grow">+ {isLoading ? (+ <div className="p-2 space-y-2">+ {[...Array(8)].map((_, i) => (+ <div key={i} className="flex items-center gap-2 p-2 rounded-md">+ <Skeleton className="h-4 w-4" />+ <div className="flex-1 space-y-1">+ <Skeleton className="h-3 w-3/4" />+ <Skeleton className="h-2 w-1/2" />+ </div>+ </div>+ ))}+ </div>+ ) : filteredTransforms.length > 0 ? (+ <div className="p-1">+ {filteredTransforms.map((transform: Transform) => (+ <button+ key={transform.id}+ className="w-full flex items-center gap-2 p-2 rounded-md hover:bg-muted text-left transition-colors"+ onClick={(e) => handleTransformClick(e, transform.id)}+ >+ <FileCode2 className="h-4 w-4 text-muted-foreground flex-shrink-0" />+ <div className="flex-1 min-w-0">+ <p className="text-sm font-medium truncate">+ {transform.name || "(Unnamed transform)"}+ </p>+ {transform.description && (+ <p className="text-xs text-muted-foreground truncate">+ {transform.description}+ </p>+ )}++ </div>+ <div className='flex items-center gap-1'>+ <Button className='w-5 h-5' variant='ghost' size={"icon"}>+ <Star className='w-4 h-4 opacity-50' strokeWidth={1.5} />+ </Button>+ <Button className='w-5 h-5' variant='ghost' size={"icon"}>+ <Info className='w-4 h-4 opacity-50' strokeWidth={1.5} />+ </Button>+ </div>+ </button>+ ))}+ </div>+ ) : (+ <div className="p-4 text-center">+ <p className="text-sm text-muted-foreground">+ {searchQuery ? 'No transforms found' : 'No transforms available'}+ </p>+ </div>+ )}+ </div>+ </div>+ );+}diff --git a/flowsint-app/src/renderer/src/components/graphs/wall/custom/custom-node.tsx b/flowsint-app/src/renderer/src/components/graphs/wall/custom/custom-node.tsxnew file mode 100644index 00000000..0e11346b--- /dev/null+++ b/flowsint-app/src/renderer/src/components/graphs/wall/custom/custom-node.tsx@@ -0,0 +1,102 @@+import { memo, useCallback } from "react";+import { NodeProps, Handle, Position, getOutgoers } from "@xyflow/react";+import { useNodesDisplaySettings } from "@/stores/node-display-settings";+import { useGraphStore } from "@/stores/graph-store";+import { ChevronDown, ChevronRight } from "lucide-react";++const size = 32;+++export const CustomNode = memo(({ data, selected, id }: NodeProps) => {+ const iconUrl = `/icons/${data.type}.svg`;+ const isCurrent = useGraphStore(state => state.isCurrent);+ const color = useNodesDisplaySettings(state => state.colors[data.type as keyof typeof state.colors]);+ const node = useGraphStore(state => state.nodes.find(n => n.id === id));+ const edges = useGraphStore(state => state.edges);+ const toggleCollapse = useGraphStore(state => state.toggleCollapse);++ const isCollapsed = node?.collapsed;++ const outgoers = node ? getOutgoers(+ { id },+ [node],+ edges,+ ) : [];++ const handleToggleCollapse = useCallback((e: React.MouseEvent) => {+ e.stopPropagation();+ toggleCollapse(id);+ }, [id, toggleCollapse]);++ return (+ <div className="xy-node -z-[5000] relative p-1 flex flex-col justify-center items-center !rounded-full h-20">+ {outgoers.length > 0 &&+ <button+ onClick={handleToggleCollapse}+ style={{+ position: "absolute",+ top: 2,+ right: 2,+ zIndex: 10,+ background: "transparent",+ border: "none",+ cursor: "pointer",+ padding: 0,+ }}+ tabIndex={-1}+ aria-label={isCollapsed ? "Expand" : "Collapse"}+ >+ {isCollapsed ? <ChevronRight size={12} /> : <ChevronDown size={12} />}+ </button>}+ <Handle+ type="target"+ position={Position.Top}+ id="top"+ className="opacity-0"+ />+ <Handle+ type="source"+ position={Position.Bottom}+ id="bottom"+ className="opacity-0"+ />+ <div style={{ width: size, height: size, borderColor: (selected || isCurrent(id)) ? "#f97316" : color }} className="!rounded-full gap-0 bg-card flex items-center justify-center border-2 border-primary/70 p-1 overflow-hidden">+ <img+ src={iconUrl}+ alt={data?.label as string ?? "N/A"}+ width={size}+ height={size}+ draggable={false}+ style={{+ pointerEvents: "none",+ opacity: selected ? 1 : 0.85,+ display: "block",+ margin: "0 auto",+ }}+ />+ </div>+ <div+ className="text-nowrap text-center truncate text-ellipsis"+ style={{+ fontSize: 11,+ color: (selected || isCurrent(id)) ? "#f97316" : "#94a3b8",+ marginTop: 2,+ pointerEvents: "none",+ }}+ >+ {data?.label as string ?? "N/A"}+ </div>+ <div+ className="text-nowrap text-center opacity-70"+ style={{+ fontSize: 8,+ color: selected ? "#f97316" : "#94a3b8",+ marginTop: 1,+ pointerEvents: "none",+ }}+ >+ {data?.type as string ?? "N/A"}+ </div>+ </div>+ );+});diff --git a/flowsint-app/src/renderer/src/components/graphs/wall/custom/floating-edge.tsx b/flowsint-app/src/renderer/src/components/graphs/wall/custom/floating-edge.tsxnew file mode 100644index 00000000..e71dc06e--- /dev/null+++ b/flowsint-app/src/renderer/src/components/graphs/wall/custom/floating-edge.tsx@@ -0,0 +1,45 @@+import { getStraightPath, useInternalNode } from '@xyflow/react';+import { getEdgeParams } from '@/lib/utils';+import { memo } from 'react';++interface FloatingEdgeProps {+ id: string;+ source: string;+ target: string;+ markerEnd?: string;+ style?: React.CSSProperties;+}++const FloatingEdge = memo(function FloatingEdge({ id, source, target, markerEnd, style }: FloatingEdgeProps) {+ const sourceNode = useInternalNode(source);+ const targetNode = useInternalNode(target);++ if (!sourceNode || !targetNode) {+ return null;+ }++ const { sx, sy, tx, ty } = getEdgeParams(+ //@ts-ignore+ sourceNode,+ targetNode,+ );++ const [edgePath] = getStraightPath({+ sourceX: sx,+ sourceY: sy,+ targetX: tx,+ targetY: ty,+ });++ return (+ <path+ id={id}+ className="react-flow__edge-path"+ d={edgePath}+ markerEnd={markerEnd}+ style={style}+ />+ );+});++export default FloatingEdge;\ No newline at end of filediff --git a/flowsint-app/src/renderer/src/components/graphs/wall/wall.tsx b/flowsint-app/src/renderer/src/components/graphs/wall/wall.tsxnew file mode 100644index 00000000..b457f69f--- /dev/null+++ b/flowsint-app/src/renderer/src/components/graphs/wall/wall.tsx@@ -0,0 +1,296 @@+"use client"++import type React from "react"+import { useState, useCallback, useRef, useEffect, memo, useMemo } from "react"+import {+ ReactFlow,+ ReactFlowProvider,+ Background,+ type Node,+ useReactFlow,+ type NodeMouseHandler,+ type ColorMode,+ MiniMap,+ BackgroundVariant,+ // EdgeTypes,+ MarkerType,+} from "@xyflow/react"+import "@xyflow/react/dist/style.css"+import { getDagreLayoutedElements, getForceLayoutedElements } from "@/lib/utils"+import { useTheme } from "@/components/theme-provider"+import { useGraphStore, type GraphNode, type GraphEdge } from "@/stores/graph-store"+import { CustomNode } from "./custom/custom-node"+import FloatingEdge from "./custom/floating-edge"+import FloatingConnectionLine from "./custom/connection-line"+import GraphLoader from "../graph-loader"+import { useGraphControls } from "@/stores/graph-controls-store"+import { useNodesDisplaySettings } from "@/stores/node-display-settings"+import ContextMenu from './custom/context-menu';+++const nodeTypes = {+ custom: CustomNode,+};++const edgeTypes = {+ custom: FloatingEdge,+};++const Wall = memo(({ theme, edges }: { theme: ColorMode, edges: GraphEdge[] }) => {+ const { fitView, zoomIn, zoomOut, setCenter } = useReactFlow()+ const reactFlowWrapper = useRef<HTMLDivElement>(null)+ const colors = useNodesDisplaySettings(state => state.colors)+ const [reactFlowInstance, setReactFlowInstance] = useState<any>(null)+ const setActions = useGraphControls(state => state.setActions)+ // Memoize store selectors+ const nodes = useGraphStore(state => state.nodes)+ const currentNode = useGraphStore(state => state.currentNode)+ const setCurrentNode = useGraphStore(state => state.setCurrentNode)+ const clearSelectedNodes = useGraphStore(state => state.clearSelectedNodes)+ const setNodes = useGraphStore(state => state.setNodes)+ const setEdges = useGraphStore(state => state.setEdges)+ const addNode = useGraphStore(state => state.addNode)+ const onNodesChange = useGraphStore(state => state.onNodesChange)+ const onEdgesChange = useGraphStore(state => state.onEdgesChange)+ const onConnect = useGraphStore(state => state.onConnect)+ const [menu, setMenu] = useState<{+ node: GraphNode;+ top: number;+ left: number;+ right: number;+ bottom: number;+ } | null>(null);+++ // Memoize filtered nodes and edges+ const visibleNodes = useMemo(() => nodes.filter(n => !n.hidden), [nodes])+ const visibleEdges = useMemo(() => edges.filter(e => !e.hidden), [edges])++ // Center view on selected node+ useEffect(() => {+ if (currentNode && reactFlowInstance) {+ const nodeWidth = currentNode.measured?.width ?? 0+ const nodeHeight = currentNode.measured?.height ?? 0+ setCenter(+ currentNode.position.x + nodeWidth / 2,+ currentNode.position.y + nodeHeight / 2 + 20,+ { duration: 500, zoom: 1.5 }+ )+ }+ }, [currentNode, reactFlowInstance, setCenter])++ useEffect(() => {+ if (reactFlowInstance) {+ const actions = {+ zoomIn: zoomIn,+ zoomToFit: fitView,+ zoomOut: zoomOut,+ onLayout: onLayout,+ }+ setActions(actions)+ }+ }, [reactFlowInstance, setActions])++ const onDragOver = useCallback((event: React.DragEvent<HTMLDivElement>) => {+ event.preventDefault()+ event.dataTransfer.dropEffect = "move"+ }, [])++ const onDrop = useCallback(+ (event: React.DragEvent<HTMLDivElement>) => {+ event.preventDefault()+ if (!reactFlowWrapper.current || !reactFlowInstance) return+ const reactFlowBounds = reactFlowWrapper.current.getBoundingClientRect()+ const newNodeData = JSON.parse(event.dataTransfer.getData("application/json")) as any & {+ type: string+ }+ const position = reactFlowInstance.screenToFlowPosition({+ x: event.clientX - reactFlowBounds.left,+ y: event.clientY - reactFlowBounds.top,+ })+ const id = `${newNodeData.type}-${Date.now()}`+ const newNode: GraphNode = {+ id: id,+ position,+ data: {+ id: id,+ type: newNodeData.type,+ caption: newNodeData.caption,+ label: newNodeData.label,+ },+ }+ addNode(newNode)+ const nodeWidth = newNode.measured?.width ?? 0+ const nodeHeight = newNode.measured?.height ?? 0+ setCenter(newNode.position.x + nodeWidth / 2, newNode.position.y + nodeHeight / 2 + 20, {+ duration: 500,+ zoom: 1.5,+ })+ },+ [reactFlowInstance, addNode, setCenter],+ )++ const onNodeClick: NodeMouseHandler = useCallback(+ (_: React.MouseEvent, node: Node) => {+ const typedNode = node as GraphNode+ setCurrentNode(typedNode)+ const nodeWidth = typedNode.measured?.width ?? 0+ const nodeHeight = typedNode.measured?.height ?? 0+ setCenter(typedNode.position.x + nodeWidth / 2, typedNode.position.y + nodeHeight / 2 + 20, {+ duration: 500,+ zoom: 1.5,+ })+ },+ [setCenter, setCurrentNode],+ )++ const onPaneClick = useCallback(() => {+ setCurrentNode(null)+ clearSelectedNodes()+ setMenu(null)+ }, [setCurrentNode, clearSelectedNodes, setMenu])++ const onLayout = useCallback((type: "dagre" | "force") => {+ // Wait for nodes to be measured before running layout+ setTimeout(() => {+ let layouted;+ if (type === "dagre") {+ layouted = getDagreLayoutedElements(+ nodes,+ edges,+ { direction: "TB" }+ );+ } else {+ layouted = getForceLayoutedElements(+ nodes,+ edges,+ {+ direction: "TB",+ strength: -300,+ distance: 100,+ iterations: 300+ }+ );+ }+ setNodes(layouted.nodes as GraphNode[])+ setEdges(layouted.edges as GraphEdge[])+ window.requestAnimationFrame(() => {+ fitView()+ })+ }, 100)+ }, [nodes, edges, setNodes, setEdges, fitView])++ // Run dagre layout on first render+ useEffect(() => {+ if (reactFlowInstance && nodes.length) {+ onLayout("dagre")+ }+ }, [reactFlowInstance, nodes.length])++ const onNodeContextMenu = useCallback(+ (event: React.MouseEvent, node: Node) => {+ // Prevent native context menu from showing+ event.preventDefault();++ // Calculate position of the context menu. We want to make sure it+ // doesn't get positioned off-screen.+ if (!reactFlowWrapper.current) return;++ const pane = reactFlowWrapper.current.getBoundingClientRect();+ const relativeX = event.clientX - pane.left;+ const relativeY = event.clientY - pane.top;++ setMenu({+ node: node as GraphNode,+ top: relativeY < pane.height - 200 ? relativeY : 0,+ left: relativeX < pane.width - 200 ? relativeX : 0,+ right: relativeX >= pane.width - 200 ? pane.width - relativeX : 0,+ bottom:+ relativeY >= pane.height - 200 ? pane.height - relativeY : 0,+ });+ },+ [setMenu],+ );++ // Memoize ReactFlow props+ const reactFlowProps = useMemo(() => ({+ nodes: visibleNodes,+ edges: visibleEdges,+ nodeTypes,+ // edgeTypes: edgeTypes as EdgeTypes,+ onInit: setReactFlowInstance,+ onNodeContextMenu,+ onDrop,+ onDragOver,+ onNodeClick,+ onPaneClick,+ onNodesChange,+ onEdgesChange,+ onConnect,+ connectionLineComponent: FloatingConnectionLine,+ fitView: true,+ proOptions: { hideAttribution: true },+ colorMode: theme,+ onlyRenderVisibleElements: nodes.length > 500,+ }), [+ visibleNodes,+ visibleEdges,+ onDrop,+ onNodeContextMenu,+ onDragOver,+ onNodeClick,+ onPaneClick,+ onNodesChange,+ onEdgesChange,+ onConnect,+ theme,+ nodes.length+ ])++ return (+ <>+ <div ref={reactFlowWrapper} className="w-full h-full bg-background">+ <ReactFlow {...reactFlowProps}>+ <Background variant={"dots" as BackgroundVariant} bgColor="var(--background)" />+ {menu && <ContextMenu+ onClick={onPaneClick}+ {...menu}+ />}+ <MiniMap nodeBorderRadius={80} nodeClassName={"h-16 w-16 text-center"} nodeColor={(node) => colors[node.data.type as keyof typeof colors]} className="bg-background" position="bottom-right" pannable zoomable />+ </ReactFlow>+ </div>+ </>+ )+})++Wall.displayName = "Wall"++const WallEditor = memo(({ isLoading, isRefetching }: { isLoading: boolean, isRefetching: boolean }) => {+ const { theme } = useTheme()+ const edges = useGraphStore(state => state.edges)++ const edgesWithMarkers = useMemo(() => edges.map(edge => ({+ ...edge,+ markerEnd: {+ type: MarkerType.ArrowClosed,+ },+ // markerStart: {+ // type: MarkerType.ArrowClosed,+ // orient: 'auto-start-reverse',+ // },+ })), [edges])++ if (isLoading || isRefetching) {+ return <GraphLoader />+ }++ return (+ <ReactFlowProvider>+ <Wall edges={edgesWithMarkers} theme={theme as ColorMode} />+ </ReactFlowProvider>+ )+})++WallEditor.displayName = "WallEditor"++export default WallEditordiff --git a/flowsint-app/src/renderer/src/components/icon-container.tsx b/flowsint-app/src/renderer/src/components/icon-container.tsxindex 21358976..5299b096 100644--- a/flowsint-app/src/renderer/src/components/icon-container.tsx+++ b/flowsint-app/src/renderer/src/components/icon-container.tsx@@ -26,7 +26,7 @@ export function IconContainer({ type, color, icon: Icon, size = 12 }: IconContai<div><divstyle={{- border: `${size / 4}px solid ${bgColor}`,+ border: `${size / 8}px solid ${bgColor}`,width: `${containerSize}px`,height: `${containerSize}px`,}}diff --git a/flowsint-app/src/renderer/src/components/investigations/sketch-list.tsx b/flowsint-app/src/renderer/src/components/investigations/sketch-list.tsxindex 427eebea..e9c4c18d 100644--- a/flowsint-app/src/renderer/src/components/investigations/sketch-list.tsx+++ b/flowsint-app/src/renderer/src/components/investigations/sketch-list.tsx@@ -6,7 +6,7 @@ import { PlusIcon, Waypoints } from "lucide-react"import { Input } from "../ui/input"import { useParams } from "@tanstack/react-router"import { SkeletonList } from "../shared/skeleton-list"-import NewSketch from "../sketches/new-sketch"+import NewSketch from "../graphs/new-sketch"import { SketchListItem } from "./investigation-list"import { useState, useMemo } from "react"diff --git a/flowsint-app/src/renderer/src/components/layout/investigation-selector.tsx b/flowsint-app/src/renderer/src/components/layout/investigation-selector.tsxindex 0f58ee3a..14fec74a 100644--- a/flowsint-app/src/renderer/src/components/layout/investigation-selector.tsx+++ b/flowsint-app/src/renderer/src/components/layout/investigation-selector.tsx@@ -35,7 +35,7 @@ export default function InvestigationSelector() {{isLoading ? <Skeleton className="h-7 w-40 bg-foreground/10" /> :// @ts-ignore<Select onValueChange={handleSelectionChange} defaultValue={investigationId}>- <SelectTrigger className="min-w-none h-7 w-full hover:bg-foreground/10 rounded-sm font-medium shadow-none border-none text-ellipsis truncate gap-1 inset-shadow-none">+ <SelectTrigger className="min-w-none !h-7 w-full hover:bg-foreground/10 !bg-transparent rounded-sm font-medium shadow-none border-none text-ellipsis truncate gap-1 inset-shadow-none"><SelectValue placeholder="Select an investigation" /></SelectTrigger><SelectContent>diff --git a/flowsint-app/src/renderer/src/components/layout/log-panel.tsx b/flowsint-app/src/renderer/src/components/layout/log-panel.tsxindex 70bf9ccf..07d97abb 100644--- a/flowsint-app/src/renderer/src/components/layout/log-panel.tsx+++ b/flowsint-app/src/renderer/src/components/layout/log-panel.tsx@@ -1,74 +1,191 @@+"use client"+import { ScrollArea } from "../ui/scroll-area"-import { useLogs } from "@/hooks/use-logs"-import { Button } from "../ui/button"+import { useEvents } from "@/hooks/use-events"+import { Badge } from "../ui/badge"import { logService } from "@/api/log-service"import { useConfirm } from "../use-confirm-dialog"import { useParams } from "@tanstack/react-router"-import { RefreshCcwIcon } from "lucide-react"-import { useEffect, useRef } from "react"+import {+ Terminal,+ Info,+ AlertTriangle,+ AlertCircle,+ CheckCircle,+ Zap,+ Clock,+ RotateCcw,+ PartyPopper,+ BarChart3,+ FileText,+ Trash2,+} from "lucide-react"+import { useEffect, useRef, useState } from "react"import { CopyButton } from "../copy"+import { EventLevel } from "@/types"+import { cn } from "@/lib/utils"+import { Button } from "../ui/button"++const logLevelConfig = {+ [EventLevel.INFO]: {+ icon: Info,+ color: "dark:text-blue-400 text-blue-600",+ bg: "bg-blue-500/10",+ badge: "dark:bg-blue-500/20 dark:text-blue-300 bg-blue-500/20 text-blue-600",+ emoji: "ℹ️",+ },+ [EventLevel.WARNING]: {+ icon: AlertTriangle,+ color: "dark:text-yellow-400 text-yellow-600",+ bg: "bg-yellow-500/10",+ badge: "dark:bg-yellow-500/20 dark:text-yellow-300 bg-yellow-500/20 text-yellow-600",+ emoji: "⚠️",+ },+ [EventLevel.FAILED]: {+ icon: AlertCircle,+ color: "dark:text-red-400 text-red-600",+ bg: "bg-red-500/10",+ badge: "dark:bg-red-500/20 dark:text-red-300 bg-red-500/20 text-red-600",+ emoji: "❌",+ },+ [EventLevel.SUCCESS]: {+ icon: CheckCircle,+ color: "dark:text-green-400 text-green-600",+ bg: "bg-green-500/10",+ badge: "dark:bg-green-500/20 dark:text-green-300 bg-green-500/20 text-green-600",+ emoji: "✅",+ },+ [EventLevel.DEBUG]: {+ icon: Zap,+ color: "dark:text-purple-400 text-purple-600",+ bg: "bg-purple-500/10",+ badge: "dark:bg-purple-500/20 dark:text-purple-300 bg-purple-500/20 text-purple-600",+ emoji: "🐛",+ },+ [EventLevel.PENDING]: {+ icon: Clock,+ color: "dark:text-orange-400 text-orange-600",+ bg: "bg-orange-500/10",+ badge: "dark:bg-orange-500/20 dark:text-orange-300 bg-orange-500/20 text-orange-600",+ emoji: "⏳",+ },+ [EventLevel.RUNNING]: {+ icon: RotateCcw,+ color: "dark:text-blue-400 text-blue-600",+ bg: "bg-blue-500/10",+ badge: "dark:bg-blue-500/20 dark:text-blue-300 bg-blue-500/20 text-blue-600",+ emoji: "🔄",+ },+ [EventLevel.COMPLETED]: {+ icon: PartyPopper,+ color: "dark:text-green-400 text-green-600",+ bg: "bg-green-500/10",+ badge: "dark:bg-green-500/20 dark:text-green-300 bg-green-500/20 text-green-600",+ emoji: "🎉",+ },+ [EventLevel.GRAPH_APPEND]: {+ icon: BarChart3,+ color: "dark:text-purple-400 text-purple-600",+ bg: "bg-purple-500/10",+ badge: "dark:bg-purple-500/20 dark:text-purple-300 bg-purple-500/20 text-purple-600",+ emoji: "📊",+ }+}+// Fallback config for any missing event levels+const defaultConfig = {+ icon: FileText,+ color: "text-gray-400",+ bg: "bg-gray-500/10",+ badge: "bg-gray-500/20 text-gray-300",+ emoji: "📝",+}export function LogPanel() {const { id: sketch_id } = useParams({ strict: false })- const { logs, refetch } = useLogs(sketch_id)+ const { logs, refetch } = useEvents(sketch_id)const { confirm } = useConfirm()+ const [isAutoScroll, setIsAutoScroll] = useState(true)const bottomRef = useRef<HTMLDivElement | null>(null)+ const scrollAreaRef = useRef<HTMLDivElement>(null)useEffect(() => {- bottomRef.current?.scrollIntoView({ behavior: "smooth" })- }, [logs])-+ if (isAutoScroll && bottomRef.current) {+ bottomRef.current.scrollIntoView({ behavior: "smooth" })+ }+ }, [logs, isAutoScroll])const handleDeleteLogs = async () => {if (!sketch_id) return- if (!await confirm({- title: "Delete all logs",- message: "Are you sure you want to delete all logs?",- })) return+ if (+ !(await confirm({+ title: "Delete all logs",+ message: "Are you sure you want to delete all logs?",+ }))+ )+ returnawait logService.delete(sketch_id)refetch()}+ const formatTime = (date: string) => {+ return new Date(date).toLocaleTimeString("en-US", {+ hour12: false,+ hour: "2-digit",+ minute: "2-digit",+ second: "2-digit",+ })+ }+return (- <div className="h-full bg-card rounded-md relative">- <ScrollArea className="h-full">- <div className="p-4 font-mono text-sm leading-relaxed">- {logs.map((log) => (- <div- key={log.id}- className={`flex items-start gap-2 mb-1 ${log.type === "ERROR"- ? "text-destructive"- : log.type === "WARN"- ? "text-yellow-500"- : log.type === "SUCCESS"- ? "text-green-500"- : "text-foreground"- }`}- >- <span className="text-muted-foreground min-w-[60px]">- {new Date(log.created_at).toLocaleTimeString()}- </span>- <span className="flex-1">{log.content}</span>- </div>- ))}- {logs.length === 0 && (- <div className="text-center py-4 text-muted-foreground">- No logs to display+ <div className="h-full bg-background overflow-hidden flex flex-col relative">+ <ScrollArea className="flex-1 h-full" ref={scrollAreaRef}>+ <div className="font-mono text-sm h-full">+ {logs.length === 0 ? (+ <div className="text-center text-gray-500 h-full py-8">+ <Terminal className="w-8 h-8 mx-auto mb-2 opacity-50" />+ <p>No logs to display</p></div>+ ) : (+ logs.map((log, i) => {+ const config = logLevelConfig[log.type] || defaultConfig+ const Icon = config.icon++ return (+ <div+ key={i}+ className={cn(+ "group flex items-start gap-3 p-2 py-1 transition-colors hover:bg-card/50",+ // config.bg,+ )}+ >+ <div className="flex items-center gap-2 min-w-0">+ <Icon className={cn("w-4 h-4 mt-0.5 flex-shrink-0", config.color)} />+ <span className="text-xs font-medium min-w-[60px]">{formatTime(log.created_at)}</span>+ <Badge className={cn("text-xs px-2 py-0.5", config.badge)}>{log.type}</Badge>++ </div>+ <div className="min-w-0 flex-1">+ <p className="break-words">{log.payload.message}</p>+ </div>+ <CopyButton+ content={`[${formatTime(log.created_at)}] ${log.type}: ${log.payload.message}`}+ className="opacity-0 group-hover:opacity-100 transition-opacity p-1 h-auto"+ />+ </div>+ )+ }))}+ <div ref={bottomRef} /></div>- <div ref={bottomRef} /></ScrollArea>-- <div className="absolute top-2 right-2 flex gap-2">- <CopyButton content={JSON.stringify(logs)} />- <Button variant={"ghost"} size={"sm"} onClick={() => refetch()} className="text-muted-foreground hover:text-foreground">- <RefreshCcwIcon className="w-4 h-4" />+ <div className="absolute top-1 right-1">+ <Button variant="ghost" size="icon" onClick={refetch}>+ <RotateCcw strokeWidth={1.5} className="w-4 h-4 opacity-60" /></Button>- <Button variant={"ghost"} size={"sm"} onClick={handleDeleteLogs} className="text-muted-foreground hover:text-foreground">- Clear+ <Button variant="ghost" size="icon" onClick={handleDeleteLogs}>+ <Trash2 strokeWidth={1.5} className="w-4 h-4 opacity-60" /></Button></div></div>)-}\ No newline at end of file+}diff --git a/flowsint-app/src/renderer/src/components/layout/root.layout.tsx b/flowsint-app/src/renderer/src/components/layout/root.layout.tsxindex 74087d68..edb5e297 100644--- a/flowsint-app/src/renderer/src/components/layout/root.layout.tsx+++ b/flowsint-app/src/renderer/src/components/layout/root.layout.tsx@@ -81,10 +81,10 @@ export default function RootLayout({ children }: LayoutProps) {collapsible={true}collapsedSize={0}>- <div className="h-10 bg-card flex items-center justify-end px-2 text-sm w-full font-semibold border-b">+ {/* <div className="h-10 bg-card flex items-center justify-end px-2 text-sm w-full font-semibold border-b"><PathBreadcrumb />- </div>- <div className="h-[calc(100%-40px)] flex flex-col overflow-hidden bg-card">+ </div> */}+ <div className="h-full flex flex-col overflow-hidden bg-card"><SecondaryNavigation /></div></ResizablePanel>diff --git a/flowsint-app/src/renderer/src/components/layout/sketch-selector.tsx b/flowsint-app/src/renderer/src/components/layout/sketch-selector.tsxindex 040eb651..25b324cd 100644--- a/flowsint-app/src/renderer/src/components/layout/sketch-selector.tsx+++ b/flowsint-app/src/renderer/src/components/layout/sketch-selector.tsx@@ -9,19 +9,31 @@ import {import { Skeleton } from "@/components/ui/skeleton";import { useQuery } from "@tanstack/react-query";import { type Sketch } from "@/types/sketch";-import { sketchService } from "@/api/sketch-service";+import { type Analysis } from "@/types";import { useNavigate, useParams } from "@tanstack/react-router";+import { investigationService } from "@/api/investigation-service";+import { analysisService } from "@/api/analysis-service";+import { Waypoints, FileText } from "lucide-react";export default function CaseSelector() {const navigate = useNavigate()const { id, investigationId, type } = useParams({ strict: false })- const { data: sketches, isLoading } = useQuery({- queryKey: ["dashboard", "sketches", "selector"],- queryFn: sketchService.get,+ const { data: investigation, isLoading: isLoadingInvestigation } = useQuery({+ queryKey: ["dashboard", "investigation", investigationId],+ queryFn: () => investigationService.getById(investigationId as string),refetchOnWindowFocus: true,})+ const { data: analyses, isLoading: isLoadingAnalyses } = useQuery({+ queryKey: ["analyses", investigationId],+ queryFn: () => analysisService.getByInvestigationId(investigationId as string),+ enabled: !!investigationId,+ refetchOnWindowFocus: true,+ })++ const isLoading = isLoadingInvestigation || isLoadingAnalyses+const handleSelectionChange = (value: string) => {if (value === "overview") {navigate({@@ -31,30 +43,50 @@ export default function CaseSelector() {},})} else {+ // Check if the selected value is a sketch or analysis+ const isSketch = investigation?.sketches?.some((sketch: Sketch) => sketch.id === value)+ const isAnalysis = analyses?.some((analysis: Analysis) => analysis.id === value)++ const itemType = isSketch ? "graph" : isAnalysis ? "analysis" : type+navigate({to: "/dashboard/investigations/$investigationId/$type/$id",params: {investigationId: investigationId as string,- type: type as string,- id: id as string,+ type: itemType as string,+ id: value as string,},})}};+return (<div className="flex items-center">- {isLoading ? <Skeleton className="h-7 w-40 bg-foreground/10" /> :+ {isLoading ? <Skeleton className="!h-7 w-40 bg-foreground/10" /> :<Select onValueChange={handleSelectionChange} defaultValue={id as string || "overview"}>- <SelectTrigger className="min-w-none h-7 rounded-sm w-full hover:bg-foreground/10 font-medium shadow-none border-none text-ellipsis truncate gap-1 inset-shadow-none">- <SelectValue placeholder="Select a sketch" />+ <SelectTrigger className="min-w-none !h-7 rounded-sm w-full !bg-transparent hover:bg-foreground/10 font-medium shadow-none border-none text-ellipsis truncate gap-1 inset-shadow-none">+ <SelectValue placeholder="Select a sketch or analysis" className="text-ellipsis truncate" /></SelectTrigger><SelectContent><SelectItem className="text-ellipsis truncate" value={"overview"}>{"Overview"}</SelectItem>- {sketches?.map((sketch: Sketch) => (- <SelectItem className="text-ellipsis truncate items-center" key={sketch.id} value={sketch.id}>{sketch.title}</SelectItem>+ {investigation?.sketches?.map((sketch: Sketch) => (+ <SelectItem className="text-ellipsis truncate items-center" key={sketch.id} value={sketch.id}>+ <div className="flex items-center gap-2">+ <Waypoints className="w-4 h-4 text-yellow-500" />+ {sketch.title}+ </div>+ </SelectItem>+ ))}+ {analyses?.map((analysis: Analysis) => (+ <SelectItem className="text-ellipsis truncate items-center" key={analysis.id} value={analysis.id}>+ <div className="flex items-center gap-2">+ <FileText className="w-4 h-4 text-blue-500" />+ {analysis.title}+ </div>+ </SelectItem>))}</SelectContent></Select >}- </div >+ </div>);}diff --git a/flowsint-app/src/renderer/src/components/layout/status-bar.tsx b/flowsint-app/src/renderer/src/components/layout/status-bar.tsxindex 4ecaf5af..f1b68e49 100644--- a/flowsint-app/src/renderer/src/components/layout/status-bar.tsx+++ b/flowsint-app/src/renderer/src/components/layout/status-bar.tsx@@ -2,7 +2,7 @@ import { Button } from "@/components/ui/button"import { HelpCircle, Terminal, Trash, Unlock } from "lucide-react"import { ModeToggle } from "../mode-toggle"import { useLayoutStore } from "@/stores/layout-store"-import Legend from "../sketches/legend"+import Legend from "../graphs/legend"export function StatusBar() {const isOpenConsole = useLayoutStore(s => s.isOpenConsole)diff --git a/flowsint-app/src/renderer/src/components/layout/top-navbar.tsx b/flowsint-app/src/renderer/src/components/layout/top-navbar.tsxindex 3744fc16..74a3e5f8 100644--- a/flowsint-app/src/renderer/src/components/layout/top-navbar.tsx+++ b/flowsint-app/src/renderer/src/components/layout/top-navbar.tsx@@ -2,9 +2,12 @@ import { Button } from "@/components/ui/button"import { Settings } from "lucide-react"import { Command } from "../command"import { NavUser } from "../nav-user"-import { Link } from "@tanstack/react-router"+import { Link, useParams } from "@tanstack/react-router"+import InvestigationSelector from "./investigation-selector"+import SketchSelector from "./sketch-selector"export function TopNavbar() {+ const { investigationId, id } = useParams({ strict: false })return (<header className="flex items-center bg-card h-12 px-4 border-b shrink-0"><div className="flex items-center gap-4">@@ -12,11 +15,13 @@ export function TopNavbar() {<img src="/icon.png" alt="Flowsint" className="h-8 w-8" /><span className="text-lg font-semibold">Flowsint</span></Link>- <Link to="/dashboard/tools">- <Button variant="ghost" className="px-2">- Tools- </Button>- </Link>+ <div className="hidden lg:flex items-center gap-2">+ {investigationId &&+ <InvestigationSelector />}+ {id && <>+ <span className="opacity-30 text-sm">/</span><SketchSelector />+ </>}+ </div></div><div className="grow flex items-center justify-center"><Command />diff --git a/flowsint-app/src/renderer/src/components/sketches/custom-node.tsx b/flowsint-app/src/renderer/src/components/sketches/custom-node.tsxdeleted file mode 100644index 8d2cdbff..00000000--- a/flowsint-app/src/renderer/src/components/sketches/custom-node.tsx+++ /dev/null@@ -1,129 +0,0 @@-import {- createContext,- useContext,- useState,- useCallback,- ReactNode,- forwardRef,- HTMLAttributes,- memo,-} from "react";-import { NodeToolbar, NodeProps, NodeToolbarProps, Position } from "@xyflow/react";--import { cn } from "@/lib/utils";--const BaseNode = forwardRef<- HTMLDivElement,- HTMLAttributes<HTMLDivElement> & { selected?: boolean }->(({ className, selected, ...props }, ref) => (- <div- ref={ref}- className={cn(- "relative rounded-md border bg-card p-5 text-card-foreground",- className,- selected ? "border-muted-foreground shadow-lg" : "",- "hover:ring-1",- )}- tabIndex={0}- {...props}- />-));--BaseNode.displayName = "BaseNode";--/* TOOLTIP CONTEXT ---------------------------------------------------------- */--const TooltipContext = createContext(false);--/* TOOLTIP NODE ------------------------------------------------------------- */--export type TooltipNodeProps = Partial<NodeProps> & {- children?: ReactNode;-};--/**- * A component that wraps a node and provides tooltip visibility context.- */-export const TooltipNode = forwardRef<HTMLDivElement, TooltipNodeProps>(- ({ selected, children }, ref) => {- const [isTooltipVisible, setTooltipVisible] = useState(false);-- const showTooltip = useCallback(() => setTooltipVisible(true), []);- const hideTooltip = useCallback(() => setTooltipVisible(false), []);-- return (- <TooltipContext.Provider value={isTooltipVisible}>- <BaseNode- ref={ref}- onMouseEnter={showTooltip}- onMouseLeave={hideTooltip}- onFocus={showTooltip}- onBlur={hideTooltip}- tabIndex={0}- selected={selected}- >- {children}- </BaseNode>- </TooltipContext.Provider>- );- },-);--TooltipNode.displayName = "TooltipNode";--/* TOOLTIP CONTENT ---------------------------------------------------------- */--export type TooltipContentProps = NodeToolbarProps;--/**- * A component that displays the tooltip content based on visibility context.- */-export const TooltipContent = forwardRef<HTMLDivElement, TooltipContentProps>(- ({ position, children }, ref) => {- const isTooltipVisible = useContext(TooltipContext);-- return (- <div ref={ref}>- <NodeToolbar- isVisible={isTooltipVisible}- className="rounded-sm bg-primary p-2 text-primary-foreground"- tabIndex={1}- position={position}- >- {children}- </NodeToolbar>- </div>- );- },-);--TooltipContent.displayName = "TooltipContent";--/* TOOLTIP TRIGGER ---------------------------------------------------------- */--export type TooltipTriggerProps = HTMLAttributes<HTMLParagraphElement>;--/**- * A component that triggers the tooltip visibility.- */-export const TooltipTrigger = forwardRef<- HTMLParagraphElement,- TooltipTriggerProps->(({ children, ...props }, ref) => {- return (- <div ref={ref} {...props}>- {children}- </div>- );-});--TooltipTrigger.displayName = "TooltipTrigger";--export const TooltipNodeDemo = memo(({ selected }: NodeProps) => {- return (- <TooltipNode selected={selected}>- <TooltipContent position={Position.Top}>Hidden Content</TooltipContent>- <TooltipTrigger>Hover</TooltipTrigger>- </TooltipNode>- );-});diff --git a/flowsint-app/src/renderer/src/components/sketches/toolbar.tsx b/flowsint-app/src/renderer/src/components/sketches/toolbar.tsxdeleted file mode 100644index 42f8bc30..00000000--- a/flowsint-app/src/renderer/src/components/sketches/toolbar.tsx+++ /dev/null@@ -1,156 +0,0 @@-"use client"--import { Button } from "@/components/ui/button"-import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@/components/ui/tooltip"-import { useConfirm } from "@/components/use-confirm-dialog"-import { useGraphControls } from "@/stores/graph-controls-store"-import { useSketchStore } from "@/stores/sketch-store"-import { useModalStore } from "@/stores/store-settings"-import {- ArrowDownUp,- Copy,- Filter,- GitBranchIcon,- Layers,- LayoutGrid,- Maximize,- Minus,- Trash,- ZoomIn,- Settings,- RotateCw-} from "lucide-react"-import { memo, useCallback } from "react"-import { Separator } from "../ui/separator"-import { sketchService } from "@/api/sketch-service"-import { useParams } from "@tanstack/react-router"-import { toast } from "sonner"-import { useQuery } from "@tanstack/react-query"-import { cn } from "@/lib/utils"--// Tooltip wrapper component to avoid repetition-const ToolbarButton = memo(function ToolbarButton({- icon,- tooltip,- onClick,- disabled = false-}: {- icon: React.ReactNode;- tooltip: string | React.ReactNode;- onClick?: () => void;- disabled?: boolean-}) {- return (- <Tooltip>- <TooltipTrigger asChild>- <Button- onClick={onClick}- disabled={disabled}- variant="ghost"- size="icon"- className="h-8 w-8 rounded-full"- >- {icon}- </Button>- </TooltipTrigger>- <TooltipContent>{tooltip}</TooltipContent>- </Tooltip>- )-})-export const Toolbar = memo(function Toolbar({ isLoading }: { isLoading: boolean }) {- const selectedNodes = useSketchStore((state) => state.selectedNodes || [])- const setOpenAddRelationDialog = useSketchStore((state) => state.setOpenAddRelationDialog)- const removeNodes = useSketchStore((state) => state.removeNodes)- const toggleSettings = useModalStore((s) => s.toggleSettings)- const zoomToFit = useGraphControls((s) => s.zoomToFit);- const zoomIn = useGraphControls((s) => s.zoomIn);- const zoomOut = useGraphControls((s) => s.zoomOut);- const { confirm } = useConfirm()- const { id: sketchId, investigationId, type } = useParams({ from: "/_auth/dashboard/investigations/$investigationId/$type/$id" })-- const { refetch } = useQuery({- queryKey: ["investigations", investigationId, type, sketchId, "data"],- queryFn: () => type === "graph" ? sketchService.getGraphDataById(sketchId) : Promise.resolve(null),- enabled: type === "graph"- })-- const handleRefresh = useCallback(async () => {- try {- await refetch()- toast.success("Graph data refreshed");- } catch (error) {- toast.error("Failed to refresh graph data");- }- }, [refetch]);-- const handleOpenRelationshipDialog = useCallback(() => {- setOpenAddRelationDialog(true)- }, [])-- const handleDeleteNodes = async () => {- if (!selectedNodes.length) return- if (!await confirm({ title: `You are about to delete ${selectedNodes.length} node(s).`, message: "The action is irreversible." })) return-- toast.promise(- (async () => {- removeNodes(selectedNodes.map((n) => n.id))- return sketchService.deleteNodes(sketchId, JSON.stringify({ nodeIds: selectedNodes.map((n) => n.id) }))- })(),- {- loading: `Deleting ${selectedNodes.length} node(s)...`,- success: 'Nodes deleted successfully.',- error: 'Failed to delete nodes.'- }- )- }- const isMoreThanZero = selectedNodes.length > 0- const isTwo = selectedNodes.length == 2-- return (- <div className="flex h-full flex-col items-center justify-start bg-background">- <div className="flex flex-col justify-start items-center space-y-1 py-1">- <TooltipProvider>- <ToolbarButton- onClick={handleOpenRelationshipDialog}- icon={<GitBranchIcon className="h-4 w-4 opacity-70" />}- tooltip="Create relation"- disabled={!isTwo}- />- <ToolbarButton- onClick={handleDeleteNodes}- icon={<Trash className="h-4 w-4 opacity-70" />}- tooltip="Delete"- disabled={!isMoreThanZero}- />- <Separator />- <ToolbarButton disabled icon={<Filter className="h-4 w-4 opacity-70" />} tooltip="Filter" />- <Separator />- <ToolbarButton- icon={<ZoomIn className="h-4 w-4 opacity-70" />}- tooltip="Zoom In"- onClick={zoomIn}- />- <ToolbarButton- icon={<Minus className="h-4 w-4 opacity-70" />}- tooltip="Zoom Out"- onClick={zoomOut}- />- <ToolbarButton- icon={<Maximize className="h-4 w-4 opacity-70" />}- tooltip="Fit to View"- onClick={zoomToFit}- />- <Separator />- <ToolbarButton onClick={toggleSettings} icon={<Settings className="h-4 w-4 opacity-70" />} tooltip="Settings" />- <Separator />- <ToolbarButton- onClick={handleRefresh}- disabled={isLoading}- icon={<RotateCw className={cn("h-4 w-4 opacity-70", isLoading && "animate-spin")} />}- tooltip="Refresh Graph Data"- />- </TooltipProvider>- </div>- </div>- )-})\ No newline at end of filediff --git a/flowsint-app/src/renderer/src/components/tab-bar.tsx b/flowsint-app/src/renderer/src/components/tab-bar.tsxindex c9e445c0..b19f66db 100644--- a/flowsint-app/src/renderer/src/components/tab-bar.tsx+++ b/flowsint-app/src/renderer/src/components/tab-bar.tsx@@ -1,4 +1,4 @@-import { useBoundStore } from '@/store/useBoundStore'+import { useBoundStore } from '@/stores/use-bound-store'import { AnimatePresence, motion, Reorder } from 'framer-motion'import { MdAdd } from 'react-icons/md'import { Tab } from './tab'diff --git a/flowsint-app/src/renderer/src/components/transforms/editor.tsx b/flowsint-app/src/renderer/src/components/transforms/editor.tsxindex 4ee31c3a..1bb09a92 100644--- a/flowsint-app/src/renderer/src/components/transforms/editor.tsx+++ b/flowsint-app/src/renderer/src/components/transforms/editor.tsx@@ -28,7 +28,7 @@ import { TransformModal } from "./save-modal"import { useConfirm } from "@/components/use-confirm-dialog"import { useParams, useRouter } from "@tanstack/react-router"import { transformService } from "@/api/transfrom-service"-import { useFlowStore, type FlowNode, type FlowEdge } from "@/stores/flow-store"+import { useTransformStore, type TransformNode, type TransformEdge } from "@/stores/transform-store"import type { CSSProperties } from 'react'import {Select,@@ -43,16 +43,10 @@ const nodeTypes: NodeTypes = {scanner: ScannerNode,}-interface FlowEditorProps {- theme: ColorMode- initialEdges: FlowEdge[]- initialNodes: FlowNode[]- transform?: any-}-interface TransformEditorProps {- initialEdges?: FlowEdge[]- initialNodes?: FlowNode[]+ theme: ColorMode+ initialEdges: TransformEdge[]+ initialNodes: TransformNode[]transform?: any}@@ -64,7 +58,7 @@ const defaultMarkerEnd: EdgeMarker = {color: "#64748b",}-const FlowEditor = memo(({ initialEdges, initialNodes, theme, transform }: FlowEditorProps) => {+const TransformEditorFlow = memo(({ initialEdges, initialNodes, theme, transform }: TransformEditorProps) => {const { fitView, zoomIn, zoomOut, setCenter } = useReactFlow()const reactFlowWrapper = useRef<HTMLDivElement>(null)const [reactFlowInstance, setReactFlowInstance] = useState<any>(null)@@ -77,18 +71,18 @@ const FlowEditor = memo(({ initialEdges, initialNodes, theme, transform }: FlowEconst [currentStepIndex, setCurrentStepIndex] = useState(0)const [simulationSpeed, setSimulationSpeed] = useState(1000) // ms per stepconst [transformBranches, setTransformsBranches] = useState<any[]>([])- const nodes = useFlowStore(state => state.nodes)- const edges = useFlowStore(state => state.edges)- const selectedNode = useFlowStore(state => state.selectedNode)- const loading = useFlowStore(state => state.loading)- const setNodes = useFlowStore(state => state.setNodes)- const setEdges = useFlowStore(state => state.setEdges)- const onNodesChange = useFlowStore(state => state.onNodesChange)- const onEdgesChange = useFlowStore(state => state.onEdgesChange)- const onConnect = useFlowStore(state => state.onConnect)- const setSelectedNode = useFlowStore(state => state.setSelectedNode)- const setLoading = useFlowStore(state => state.setLoading)- const deleteNode = useFlowStore(state => state.deleteNode)+ const nodes = useTransformStore(state => state.nodes)+ const edges = useTransformStore(state => state.edges)+ const selectedNode = useTransformStore(state => state.selectedNode)+ const loading = useTransformStore(state => state.loading)+ const setNodes = useTransformStore(state => state.setNodes)+ const setEdges = useTransformStore(state => state.setEdges)+ const onNodesChange = useTransformStore(state => state.onNodesChange)+ const onEdgesChange = useTransformStore(state => state.onEdgesChange)+ const onConnect = useTransformStore(state => state.onConnect)+ const setSelectedNode = useTransformStore(state => state.setSelectedNode)+ const setLoading = useTransformStore(state => state.setLoading)+ const deleteNode = useTransformStore(state => state.deleteNode)// Initialize store with initial datauseEffect(() => {@@ -142,7 +136,7 @@ const FlowEditor = memo(({ initialEdges, initialNodes, theme, transform }: FlowEx: event.clientX - reactFlowBounds.left,y: event.clientY - reactFlowBounds.top,})- const newNode: FlowNode = {+ const newNode: TransformNode = {id: `${scannerData.name}-${Date.now()}`,type: "scanner",position,@@ -173,7 +167,7 @@ const FlowEditor = memo(({ initialEdges, initialNodes, theme, transform }: FlowEconst onNodeClick: NodeMouseHandler = useCallback((_: React.MouseEvent, node: Node) => {- const typedNode = node as FlowNode+ const typedNode = node as TransformNodesetSelectedNode(typedNode)const nodeWidth = typedNode.measured?.width ?? 0const nodeHeight = typedNode.measured?.height ?? 0@@ -204,11 +198,11 @@ const FlowEditor = memo(({ initialEdges, initialNodes, theme, transform }: FlowEkey: node.data.class_name || node.id,},})),- edges as FlowEdge[],+ edges as TransformEdge[],{ direction: "LR" })- setNodes(layouted.nodes as FlowNode[])- setEdges(layouted.edges as FlowEdge[])+ setNodes(layouted.nodes as TransformNode[])+ setEdges(layouted.edges as TransformEdge[])window.requestAnimationFrame(() => {fitView()})@@ -310,7 +304,7 @@ const FlowEditor = memo(({ initialEdges, initialNodes, theme, transform }: FlowE}, [transformId, nodes, edges])// Update the updateNodeState function with proper types- const updateNodeState = useCallback((nds: FlowNode[], nodeId: string, state: 'pending' | 'processing' | 'completed' | 'error') => {+ const updateNodeState = useCallback((nds: TransformNode[], nodeId: string, state: 'pending' | 'processing' | 'completed' | 'error') => {return nds.map((node) => {if (node.id === nodeId) {return {@@ -355,10 +349,10 @@ const FlowEditor = memo(({ initialEdges, initialNodes, theme, transform }: FlowEconst currentStep = transformBranches[branchIndex].steps[stepIndex]// Update node states with proper types- setNodes((nds: FlowNode[]) => updateNodeState(nds, currentStep.nodeId, "processing"))+ setNodes((nds: TransformNode[]) => updateNodeState(nds, currentStep.nodeId, "processing"))// Update edges with proper types- setEdges((eds: FlowEdge[]) => {+ setEdges((eds: TransformEdge[]) => {return eds.map((edge) => ({...edge,style: {@@ -372,7 +366,7 @@ const FlowEditor = memo(({ initialEdges, initialNodes, theme, transform }: FlowE// After delay, mark as completed and move to next steptimer = setTimeout(() => {- setNodes((nds: FlowNode[]) => updateNodeState(nds, currentStep.nodeId, "completed"))+ setNodes((nds: TransformNode[]) => updateNodeState(nds, currentStep.nodeId, "completed"))setCurrentStepIndex((prev) => prev + 1)}, simulationSpeed)}@@ -386,7 +380,7 @@ const FlowEditor = memo(({ initialEdges, initialNodes, theme, transform }: FlowEconst startSimulation = () => {// Reset all nodes to pending state- setNodes((nds: FlowNode[]) =>+ setNodes((nds: TransformNode[]) =>nds.map((node) => ({...node,data: {@@ -397,7 +391,7 @@ const FlowEditor = memo(({ initialEdges, initialNodes, theme, transform }: FlowE)// Reset all edges- setEdges((eds: FlowEdge[]) =>+ setEdges((eds: TransformEdge[]) =>eds.map((edge) => ({...edge,style: {@@ -421,7 +415,7 @@ const FlowEditor = memo(({ initialEdges, initialNodes, theme, transform }: FlowEsetIsSimulating(false)// Mark all nodes as completed- setNodes((nds: FlowNode[]) =>+ setNodes((nds: TransformNode[]) =>nds.map((node) => ({...node,data: {@@ -432,7 +426,7 @@ const FlowEditor = memo(({ initialEdges, initialNodes, theme, transform }: FlowE)// Reset edge styling- setEdges((eds: FlowEdge[]) =>+ setEdges((eds: TransformEdge[]) =>eds.map((edge) => ({...edge,style: {@@ -453,7 +447,7 @@ const FlowEditor = memo(({ initialEdges, initialNodes, theme, transform }: FlowEsetCurrentStepIndex(0)// Reset all nodes- setNodes((nds: FlowNode[]) =>+ setNodes((nds: TransformNode[]) =>nds.map((node) => ({...node,data: {@@ -464,7 +458,7 @@ const FlowEditor = memo(({ initialEdges, initialNodes, theme, transform }: FlowE)// Reset all edges- setEdges((eds: FlowEdge[]) =>+ setEdges((eds: TransformEdge[]) =>eds.map((edge) => ({...edge,style: {@@ -551,7 +545,7 @@ const FlowEditor = memo(({ initialEdges, initialNodes, theme, transform }: FlowE)})-FlowEditor.displayName = "FlowEditor"+TransformEditor.displayName = "TransformEditor"function TransformEditor({initialEdges = [],@@ -566,11 +560,11 @@ function TransformEditor({animated: true,style: defaultEdgeStyle,markerEnd: defaultMarkerEnd- })) as FlowEdge[]+ })) as TransformEdge[]return (<ReactFlowProvider>- <FlowEditor+ <TransformEditorFlowtransform={transform}initialEdges={enhancedEdges}initialNodes={initialNodes}@@ -581,7 +575,7 @@ function TransformEditor({}// Update the NodePanel type-const NodePanel = memo(({ node, onDelete }: { node: FlowNode; onDelete: () => void }) => (+const NodePanel = memo(({ node, onDelete }: { node: TransformNode; onDelete: () => void }) => (<Panel position="bottom-right" className="bg-card p-3 rounded-md shadow-md border w-72"><div className="flex justify-between items-start mb-2"><h3 className="font-medium">{node.data.class_name}</h3>diff --git a/flowsint-app/src/renderer/src/components/transforms/test-transform.tsx b/flowsint-app/src/renderer/src/components/transforms/test-transform.tsxindex a3c68282..8ce98077 100644--- a/flowsint-app/src/renderer/src/components/transforms/test-transform.tsx+++ b/flowsint-app/src/renderer/src/components/transforms/test-transform.tsx@@ -2,7 +2,7 @@import { memo } from "react"import { Dialog, DialogContent, DialogDescription, DialogTitle } from "../ui/dialog"-import { DynamicForm } from "../sketches/dynamic-form"+import { DynamicForm } from "../graphs/dynamic-form"interface TestTransformProps {open: booleandiff --git a/flowsint-app/src/renderer/src/components/type-badge.tsx b/flowsint-app/src/renderer/src/components/type-badge.tsxindex 05c464cb..379a5e16 100644--- a/flowsint-app/src/renderer/src/components/type-badge.tsx+++ b/flowsint-app/src/renderer/src/components/type-badge.tsx@@ -9,13 +9,12 @@ type TypeBadgeProps = {}function TypeBadgeComponent({ type, className }: TypeBadgeProps) {- const { colors } = useNodesDisplaySettings()+ const colors = useNodesDisplaySettings(s => s.colors)const color = colors[type as keyof typeof colors] || "bg-gray-100 text-gray-800 hover:bg-gray-100/80 dark:bg-gray-800/50 dark:text-gray-300 dark:hover:bg-gray-800/60"-return (<Badgevariant="outline"- style={{ backgroundColor: hexToRgba(color, 0.3) }}+ style={{ backgroundColor: hexToRgba(color, .5) }}className={cn("font-medium border-transparent", className)}>{type}diff --git a/flowsint-app/src/renderer/src/hooks/use-chat.ts b/flowsint-app/src/renderer/src/hooks/use-chat.tsindex ef881629..84b77a80 100644--- a/flowsint-app/src/renderer/src/hooks/use-chat.ts+++ b/flowsint-app/src/renderer/src/hooks/use-chat.ts@@ -15,7 +15,7 @@ import { HorizontalRule } from '@tiptap/extension-horizontal-rule'import { CodeBlockLowlight } from '@tiptap/extension-code-block-lowlight'import { Color } from '@tiptap/extension-color'import type { Editor } from '@tiptap/react'-import { useSketchStore } from '@/stores/sketch-store';+import { useGraphStore } from '@/stores/graph-store';const markdownToHtml = (markdown: string) => {return marked(markdown, {@@ -35,7 +35,7 @@ export const useChat = ({ onContentUpdate, onSuccess, editor }: UseChatOptions)const [isAiLoading, setIsAiLoading] = useState(false)const [promptOpen, setPromptOpen] = useState(false)const [customPrompt, setCustomPrompt] = useState("")- const selectedNodes = useSketchStore(s => s.selectedNodes)+ const selectedNodes = useGraphStore(s => s.selectedNodes)const aiCompletionMutation = useMutation({mutationFn: async (prompt: string) => {diff --git a/flowsint-app/src/renderer/src/hooks/use-drag-drop.ts b/flowsint-app/src/renderer/src/hooks/use-drag-drop.tsindex ec95ca22..8b4c885e 100644--- a/flowsint-app/src/renderer/src/hooks/use-drag-drop.ts+++ b/flowsint-app/src/renderer/src/hooks/use-drag-drop.ts@@ -1,9 +1,9 @@import { useCallback, useRef, useState } from 'react'-import { useSketchStore } from '@/stores/sketch-store'+import { useGraphStore } from '@/stores/graph-store'export const useDragAndDrop = () => {const [isDraggingOver, setIsDraggingOver] = useState(false)- const handleOpenFormModal = useSketchStore(s => s.handleOpenFormModal)+ const handleOpenFormModal = useGraphStore(s => s.handleOpenFormModal)const dragLeaveTimeoutRef = useRef<number | null>(null)const handleDragOver = useCallback((e: React.DragEvent<HTMLDivElement>) => {diff --git a/flowsint-app/src/renderer/src/hooks/use-events.ts b/flowsint-app/src/renderer/src/hooks/use-events.tsnew file mode 100644index 00000000..345faa0c--- /dev/null+++ b/flowsint-app/src/renderer/src/hooks/use-events.ts@@ -0,0 +1,70 @@+import { useEffect, useState } from "react"+import { useQuery } from "@tanstack/react-query"+import { logService } from "@/api/log-service"+import { GraphEdge, GraphNode } from "@/stores/graph-store"+import { EventLevel } from "@/types"+import { useGraphControls } from "@/stores/graph-controls-store"++export function useEvents(sketch_id: string | undefined) {+ const [liveLogs, setLiveLogs] = useState<Event[]>([])+ // const [graphUpdates, setGraphUpdates] = useState<{ nodes: GraphNode[]; edges: GraphEdge[] }[]>([])+ const refetchGraph = useGraphControls((s) => s.refetchGraph)++ const { data: previousLogs = [], refetch } = useQuery({+ queryKey: ["logs", sketch_id],+ queryFn: () => logService.get(sketch_id as string),+ refetchOnWindowFocus: false,+ enabled: !!sketch_id,+ staleTime: 30_000,+ })++ const handleRefresh = () => {+ refetch()+ setLiveLogs([]) // Pour éviter les doublons dans les logs live+ }++ useEffect(() => {+ if (!sketch_id) return++ const eventSource = new EventSource(`http://localhost:5001/api/events/sketch/${sketch_id}/stream`)++ eventSource.onmessage = (e) => {+ try {+ const raw = JSON.parse(e.data) as any+ const event = JSON.parse(raw.data) as Event+ if (event.type === EventLevel.COMPLETED) {+ refetchGraph()+ // const nodes = event.payload.nodes as GraphNode[]+ // const edges = event.payload.edges as GraphEdge[]+ // if (nodes && edges) {+ // setGraphUpdates((prev) => [...prev, { nodes: nodes, edges: edges }])+ // } else {+ // console.error("[useSketchEvents] Graph append event has no nodes or edges")+ // }+ }+ setLiveLogs((prev) => [...prev.slice(-99), event])+ } catch (error) {+ console.error("[useSketchEvents] Failed to parse SSE event:", error)+ }+ }++ eventSource.onerror = (error) => {+ console.error("[useSketchEvents] EventSource error:", error)+ eventSource.close()+ }++ return () => {+ console.log("[useSketchEvents] Closing SSE connection")+ eventSource.close()+ }+ }, [sketch_id])++ const logs = [...previousLogs, ...liveLogs].slice(-100)++ return {+ logs,+ // graphUpdates,+ refetch: handleRefresh,+ // clearGraphUpdates: () => setGraphUpdates([]),+ }+}diff --git a/flowsint-app/src/renderer/src/hooks/use-icon.tsx b/flowsint-app/src/renderer/src/hooks/use-icon.tsxnew file mode 100644index 00000000..20ca1716--- /dev/null+++ b/flowsint-app/src/renderer/src/hooks/use-icon.tsx@@ -0,0 +1,39 @@+import { type JSX, useMemo, useCallback } from "react";++export type IconType = string;++interface IconProps {+ className?: string;+ size?: number;+}++const getIconPath = (type: string): string => {+ try {+ return new URL(`/icons/${type}.svg`, window.location.origin).href;+ } catch {+ return '';+ }+};++export const useIcon = (type: IconType) => {+ // Memoize the icon path+ const iconPath = useMemo(() => getIconPath(type), [type]);++ // Memoize the component itself+ return useCallback(({ className, size = 24 }: IconProps): JSX.Element => {+ if (!iconPath) {+ return <div className={className} style={{ width: size, height: size }} />;+ }++ return (+ <img+ src={iconPath}+ className={className}+ width={size}+ height={size}+ alt={`${type} icon`}+ />+ );+ }, [iconPath]);+};+diff --git a/flowsint-app/src/renderer/src/hooks/use-logs.ts b/flowsint-app/src/renderer/src/hooks/use-logs.tsdeleted file mode 100644index 1890f016..00000000--- a/flowsint-app/src/renderer/src/hooks/use-logs.ts+++ /dev/null@@ -1,75 +0,0 @@-import { useEffect, useState } from "react"-import { useQuery } from "@tanstack/react-query"-import { logService } from "@/api/log-service"--export interface Log {- id: string- scan_id: string- sketch_id: string | null- type: "INFO" | "WARN" | "ERROR" | "SUCCESS" | "DEBUG"- content: string- created_at: string-}--export function useLogs(sketch_id: string | undefined) {- const [realtimeLogs, setRealtimeLogs] = useState<Log[]>([])-- const { data: previousLogs = [], refetch } = useQuery({- queryKey: ["logs", sketch_id],- queryFn: () => logService.get(sketch_id as string),- refetchOnWindowFocus: false,- enabled: !!sketch_id,- staleTime: 30_000, // Consider data fresh for 30 seconds- })-- const handleRefresh = () => {- refetch()- setRealtimeLogs([]) // Clear realtime logs on refresh to avoid duplicates- }-- useEffect(() => {- const eventSource = new EventSource(`http://localhost:5001/api/logs/sketch/${sketch_id}/stream`)-- eventSource.onmessage = (event) => {- try {- let log = JSON.parse(event.data)- log = JSON.parse(log["data"]) as Log- const content = JSON.parse(log.content)- console.log("[useLogs] Received log event:", log)- log = {- content: content.details.message,- type: log.type,- created_at: content.timestamp,- id: log.id,- scan_id: "",- sketch_id: log.sketch_id,- }- setRealtimeLogs((prevLogs) => {- const newLogs = [...prevLogs.slice(-99), log]- return newLogs- })- }- catch (error) {- console.error("[useLogs] Failed to parse log event:", error)- }- }-- eventSource.onerror = (error) => {- console.error("[useLogs] EventSource error:", error)- eventSource.close()- }-- return () => {- console.log("[useLogs] Cleaning up SSE connection")- eventSource.close()- }- }, [sketch_id])-- // Combine previous and realtime logs, keeping the most recent 100- const logs = [...previousLogs, ...realtimeLogs].slice(-100)-- return {- logs,- refetch: handleRefresh- }-}\ No newline at end of filediff --git a/flowsint-app/src/renderer/src/hooks/use-navigate-to-tab.ts b/flowsint-app/src/renderer/src/hooks/use-navigate-to-tab.tsindex 74a6f333..9fe752fb 100644--- a/flowsint-app/src/renderer/src/hooks/use-navigate-to-tab.ts+++ b/flowsint-app/src/renderer/src/hooks/use-navigate-to-tab.ts@@ -1,5 +1,5 @@import { useNavigate } from "@tanstack/react-router";-import { useBoundStore } from "@/stores/useBoundStore";+import { useBoundStore } from "@/stores/use-bound-store";export interface NavigateToTabOptions {id: string;diff --git a/flowsint-app/src/renderer/src/hooks/use-tab-management.ts b/flowsint-app/src/renderer/src/hooks/use-tab-management.tsindex cca814dd..e2933ed0 100644--- a/flowsint-app/src/renderer/src/hooks/use-tab-management.ts+++ b/flowsint-app/src/renderer/src/hooks/use-tab-management.ts@@ -1,6 +1,6 @@import { useMemo } from 'react';import { useNavigate } from '@tanstack/react-router';-import { useBoundStore } from '@/stores/useBoundStore';+import { useBoundStore } from '@/stores/use-bound-store';import type { TabInfo } from '@/types/tabs';interface UseTabManagementProps {diff --git a/flowsint-app/src/renderer/src/hooks/use-toolbar-initialization.ts b/flowsint-app/src/renderer/src/hooks/use-toolbar-initialization.tsindex 6d2bc074..6c5a0b28 100644--- a/flowsint-app/src/renderer/src/hooks/use-toolbar-initialization.ts+++ b/flowsint-app/src/renderer/src/hooks/use-toolbar-initialization.ts@@ -1,4 +1,4 @@-import { useBoundStore } from '@/store/useBoundStore'+import { useBoundStore } from '@/stores/use-bound-store'import { useEffect, useState } from 'react'export function useToolbarInitialization() {diff --git a/flowsint-app/src/renderer/src/routes/_auth.dashboard.index.tsx b/flowsint-app/src/renderer/src/routes/_auth.dashboard.index.tsxindex 20488d44..5707235c 100644--- a/flowsint-app/src/renderer/src/routes/_auth.dashboard.index.tsx+++ b/flowsint-app/src/renderer/src/routes/_auth.dashboard.index.tsx@@ -8,12 +8,101 @@ import { Card } from '@/components/ui/card';import { Activity, BarChart3, Clock, FileText, PlusIcon } from 'lucide-react';import NewInvestigation from '@/components/investigations/new-investigation';import { Button } from '@/components/ui/button';+import { useQuery } from '@tanstack/react-query';+import { investigationService } from '@/api/investigation-service';+import { analysisService } from '@/api/analysis-service';+import { Skeleton } from '@/components/ui/skeleton';export const Route = createFileRoute('/_auth/dashboard/')({component: DashboardPage,pendingComponent: InvestigationSkeleton,});+function DashboardStats() {+ const { data: investigations = [], isLoading: isLoadingInvestigations } = useQuery({+ queryKey: ['dashboard-stats-investigations'],+ queryFn: () => investigationService.get(),+ });++ const { data: allAnalyses = [], isLoading: isLoadingAnalyses } = useQuery({+ queryKey: ['dashboard-stats-analyses'],+ queryFn: () => analysisService.get(),+ });++ if (isLoadingInvestigations || isLoadingAnalyses) {+ return (+ <div className="grid grid-cols-1 @xs:grid-cols-1 @sm:grid-cols-1 @md:grid-cols-2 @lg:grid-cols-2 @xl:grid-cols-4 gap-4 mb-8">+ {[...Array(4)].map((_, i) => (+ <Card key={i} className="p-4">+ <div className="flex items-center gap-4">+ <Skeleton className="w-9 h-9 rounded-lg" />+ <div className="space-y-2">+ <Skeleton className="h-4 w-24" />+ <Skeleton className="h-8 w-8" />+ </div>+ </div>+ </Card>+ ))}+ </div>+ );+ }++ // Calculate stats based on investigation status+ const activeInvestigations = investigations.filter(inv => inv.status === 'active').length;+ const completedInvestigations = investigations.filter(inv => inv.status === 'completed').length;+ const inProgressInvestigations = investigations.filter(inv => inv.status === 'in_progress').length;+ const totalAnalyses = allAnalyses.length;++ return (+ <div className="grid grid-cols-1 @xs:grid-cols-1 @sm:grid-cols-1 @md:grid-cols-2 @lg:grid-cols-2 @xl:grid-cols-4 gap-4 mb-8">+ <Card className="p-4 hover:shadow-md transition-shadow">+ <div className="flex items-center gap-4">+ <div className="bg-muted rounded-lg p-2">+ <Activity className="w-5 h-5 text-muted-foreground" />+ </div>+ <div>+ <p className="text-sm text-muted-foreground">Active Investigations</p>+ <p className="text-2xl font-bold">{activeInvestigations}</p>+ </div>+ </div>+ </Card>+ <Card className="p-4 hover:shadow-md transition-shadow">+ <div className="flex items-center gap-4">+ <div className="bg-muted rounded-lg p-2">+ <BarChart3 className="w-5 h-5 text-muted-foreground" />+ </div>+ <div>+ <p className="text-sm text-muted-foreground">Completed</p>+ <p className="text-2xl font-bold">{completedInvestigations}</p>+ </div>+ </div>+ </Card>+ <Card className="p-4 hover:shadow-md transition-shadow">+ <div className="flex items-center gap-4">+ <div className="bg-muted rounded-lg p-2">+ <Clock className="w-5 h-5 text-muted-foreground" />+ </div>+ <div>+ <p className="text-sm text-muted-foreground">In Progress</p>+ <p className="text-2xl font-bold">{inProgressInvestigations}</p>+ </div>+ </div>+ </Card>+ <Card className="p-4 hover:shadow-md transition-shadow">+ <div className="flex items-center gap-4">+ <div className="bg-muted rounded-lg p-2">+ <FileText className="w-5 h-5 text-muted-foreground" />+ </div>+ <div>+ <p className="text-sm text-muted-foreground">Total Analyses</p>+ <p className="text-2xl font-bold">{totalAnalyses}</p>+ </div>+ </div>+ </Card>+ </div>+ );+}+function DashboardPage() {return (<div className="h-full w-full bg-background overflow-y-auto">@@ -41,56 +130,10 @@ function DashboardPage() {</div></div>-{/* Main Content */}- <div className="max-w-7xl mx-auto p-8">+ <div className="max-w-7xl @container mx-auto p-8">{/* Quick Stats */}- <div className="grid grid-cols-1 md:grid-cols-4 gap-4 mb-8">- <Card className="p-4 hover:shadow-md transition-shadow">- <div className="flex items-center gap-4">- <div className="bg-blue-600/20 rounded-lg p-2">- <Activity className="w-5 h-5 text-blue-600" />- </div>- <div>- <p className="text-sm text-muted-foreground">Active Investigations</p>- <p className="text-2xl font-bold">12</p>- </div>- </div>- </Card>- <Card className="p-4 hover:shadow-md transition-shadow">- <div className="flex items-center gap-4">- <div className="bg-green-600/20 rounded-lg p-2">- <BarChart3 className="w-5 h-5 text-green-600" />- </div>- <div>- <p className="text-sm text-muted-foreground">Completed</p>- <p className="text-2xl font-bold">24</p>- </div>- </div>- </Card>- <Card className="p-4 hover:shadow-md transition-shadow">- <div className="flex items-center gap-4">- <div className="bg-orange-600/20 rounded-lg p-2">- <Clock className="w-5 h-5 text-orange-600" />- </div>- <div>- <p className="text-sm text-muted-foreground">In Progress</p>- <p className="text-2xl font-bold">8</p>- </div>- </div>- </Card>- <Card className="p-4 hover:shadow-md transition-shadow">- <div className="flex items-center gap-4">- <div className="bg-purple-600/20 rounded-lg p-2">- <FileText className="w-5 h-5 text-purple-600" />- </div>- <div>- <p className="text-sm text-muted-foreground">Total Reports</p>- <p className="text-2xl font-bold">36</p>- </div>- </div>- </Card>- </div>+ <DashboardStats />{/* Main Grid Layout */}<div className="grid grid-cols-1 lg:grid-cols-3 gap-8">diff --git a/flowsint-app/src/renderer/src/routes/_auth.dashboard.investigations.$investigationId.$type.$id.tsx b/flowsint-app/src/renderer/src/routes/_auth.dashboard.investigations.$investigationId.$type.$id.tsxindex d07c5c69..b7b13264 100644--- a/flowsint-app/src/renderer/src/routes/_auth.dashboard.investigations.$investigationId.$type.$id.tsx+++ b/flowsint-app/src/renderer/src/routes/_auth.dashboard.investigations.$investigationId.$type.$id.tsx@@ -4,30 +4,40 @@ import { sketchService } from '@/api/sketch-service'import { useQuery } from '@tanstack/react-query'import Loader from '@/components/loader'import { analysisService } from '@/api/analysis-service'-import AnalysisPanel from '@/components/analyses/notes-panel'+import { AnalysisPage } from '@/components/analyses/analysis-page'+import { useGraphControls } from '@/stores/graph-controls-store'+import { useEffect } from 'react'const services = {graph: sketchService.getGraphDataById,analysis: analysisService.getById,}+const GraphPageContent = () => {- const { params: { type, id, investigationId } } = useLoaderData({+ const setActions = useGraphControls((s) => s.setActions)+ const { params: { type, id, investigationId }, sketch } = useLoaderData({from: '/_auth/dashboard/investigations/$investigationId/$type/$id',})- const { data: graphData, isLoading } = useQuery({+ const { data: data, isLoading, isRefetching, isError, refetch } = useQuery({queryKey: ["investigations", investigationId, type, id, "data"],- queryFn: () => services[type] || Promise.resolve(null),- enabled: ["graph"].includes(type),- refetchOnWindowFocus: false+ queryFn: () => services[type](id),+ enabled: ["graph", "analysis"].includes(type),+ // refetchInterval: 5000,+ refetchOnWindowFocus: false,+ initialData: sketch})+ useEffect(() => {+ setActions({ refetchGraph: refetch })+ }, [refetch, setActions, id])+if (type === "graph") {- return <GraphPanel isLoading={isLoading} graphData={graphData} />+ return <GraphPanel isLoading={isLoading} isRefetching={isRefetching} graphData={data} />}if (type === "analysis") {- return <AnalysisPanel />+ return <AnalysisPage analysis={data} isLoading={isLoading} isError={isError} refetch={refetch} />}return (diff --git a/flowsint-app/src/renderer/src/routes/_auth.dashboard.investigations.$investigationId.index.tsx b/flowsint-app/src/renderer/src/routes/_auth.dashboard.investigations.$investigationId.index.tsxindex 3a9a1027..5fbae7f0 100644--- a/flowsint-app/src/renderer/src/routes/_auth.dashboard.investigations.$investigationId.index.tsx+++ b/flowsint-app/src/renderer/src/routes/_auth.dashboard.investigations.$investigationId.index.tsx@@ -4,7 +4,7 @@ import { analysisService } from '@/api/analysis-service'import { Waypoints, PlusIcon, Users, FileText, Settings, Activity, FileText as FileTextIcon } from 'lucide-react'import { Button } from '@/components/ui/button'import { Badge } from '@/components/ui/badge'-import NewSketch from '@/components/sketches/new-sketch'+import NewSketch from '@/components/graphs/new-sketch'import { Link } from '@tanstack/react-router'import { cn } from '@/lib/utils'import type { Sketch } from '@/types/sketch'@@ -33,7 +33,7 @@ function InvestigationSkeleton() {</div>{/* Overview Cards Skeleton */}- <div className="grid grid-cols-1 md:grid-cols-4 gap-4">+ <div className="grid grid-cols-[repeat(auto-fit,minmax(250px,1fr))] gap-4">{[...Array(4)].map((_, i) => (<Card key={i} className="hover:shadow-md transition-shadow"><CardHeader className="flex flex-row items-center justify-between space-y-0 pb-2">@@ -54,7 +54,7 @@ function InvestigationSkeleton() {<Skeleton className="h-6 w-24" /><Skeleton className="h-5 w-16" /></div>- <div className="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-4">+ <div className="grid grid-cols-[repeat(auto-fit,minmax(300px,1fr))] gap-4">{[...Array(3)].map((_, i) => (<div key={i} className="p-4 rounded-xl border border-border bg-card hover:shadow-md transition-shadow"><div className="space-y-2">@@ -81,7 +81,7 @@ function InvestigationSkeleton() {<Skeleton className="h-6 w-24" /><Skeleton className="h-5 w-16" /></div>- <div className="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-4">+ <div className="grid grid-cols-[repeat(auto-fit,minmax(300px,1fr))] gap-4">{[...Array(3)].map((_, i) => (<div key={i} className="p-4 rounded-xl border border-border bg-card hover:shadow-md transition-shadow"><div className="space-y-2">@@ -105,7 +105,7 @@ function InvestigationSkeleton() {{/* Quick Actions Skeleton */}<div className="space-y-4"><Skeleton className="h-6 w-32" />- <div className="grid grid-cols-1 md:grid-cols-2 gap-4">+ <div className="grid grid-cols-[repeat(auto-fit,minmax(300px,1fr))] gap-4">{[...Array(2)].map((_, i) => (<Card key={i} className="hover:shadow-md transition-shadow"><CardHeader className="flex flex-row items-center gap-3 pb-2">@@ -203,9 +203,9 @@ function InvestigationPage() {</div>{/* Main Content */}- <div className="max-w-7xl mx-auto p-8 space-y-8">+ <div className="max-w-7xl mx-auto p-8 @container space-y-8">{/* Overview Cards */}- <div className="grid grid-cols-1 md:grid-cols-4 gap-4">+ <div className="grid grid-cols-2 @xs:grid-cols-2 @sm:grid-cols-2 @md:grid-cols-2 @lg:grid-cols-2 @xl:grid-cols-4 gap-4"><Card className="hover:shadow-md transition-shadow"><CardHeader className="flex flex-row items-center justify-between space-y-0 pb-2"><CardTitle className="text-sm font-medium">Total Sketches</CardTitle>@@ -289,7 +289,7 @@ function InvestigationPage() {{!hasSketches ? (<div className="flex flex-col items-center justify-center text-center gap-4 p-8 border border-dashed rounded-xl">- <Waypoints className="w-10 h-10 text-yellow-500" />+ <Waypoints className="w-10 h-10 text-muted-foreground" /><div className="space-y-1 max-w-md"><h3 className="text-lg font-semibold text-foreground">No sketches yet@@ -306,7 +306,7 @@ function InvestigationPage() {</NewSketch></div>) : (- <div className="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-4">+ <div className="grid grid-cols-1 @xs:grid-cols-1 @sm:grid-cols-1 @md:grid-cols-2 @lg:grid-cols-2 @xl:grid-cols-4 gap-4">{investigation.sketches.map((sketch: Sketch) => (<Linkkey={sketch.id}@@ -323,8 +323,8 @@ function InvestigationPage() {><div className="space-y-2"><div className="flex items-center gap-2 text-sm font-medium text-foreground">- <Waypoints className="w-4 h-4 text-yellow-500" />- {sketch.title}+ <Waypoints className="w-4 h-4 text-muted-foreground" />+ <span className="truncate text-ellipsis">{sketch.title}</span><Badge variant="outline" className="text-[10px] py-0.5 px-1 ml-auto">SKETCH</Badge></div>{sketch.description && (@@ -344,7 +344,7 @@ function InvestigationPage() {</div>{/* Analyses Section */}- <div className="space-y-4">+ <div className="space-y-4 @container"><div className="flex items-center justify-between"><h2 className="text-lg font-semibold">Analyses</h2>{isLoadingAnalyses ? (@@ -357,7 +357,7 @@ function InvestigationPage() {</div>{isLoadingAnalyses ? (- <div className="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-4">+ <div className="grid grid-cols-1 @xs:grid-cols-1 @sm:grid-cols-1 @md:grid-cols-2 @lg:grid-cols-2 @xl:grid-cols-4 gap-4">{[...Array(3)].map((_, i) => (<div key={i} className="p-4 rounded-xl border border-border bg-card hover:shadow-md transition-shadow"><div className="space-y-2">@@ -389,7 +389,7 @@ function InvestigationPage() {</div></div>) : (- <div className="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-4">+ <div className="grid grid-cols-1 @xs:grid-cols-1 @sm:grid-cols-1 @md:grid-cols-2 @lg:grid-cols-2 @xl:grid-cols-4 gap-4">{analyses?.map((analysis) => (<Linkkey={analysis.id}@@ -406,8 +406,8 @@ function InvestigationPage() {><div className="space-y-2"><div className="flex items-center gap-2 text-sm font-medium text-foreground">- <FileTextIcon className="w-4 h-4 text-blue-500" />- {analysis.title || 'Untitled Analysis'}+ <FileTextIcon className="w-4 h-4 text-muted-foreground" />+ <span className="truncate text-ellipsis">{analysis.title || 'Untitled Analysis'}</span><Badge variant="outline" className="text-[10px] py-0.5 px-1 ml-auto">ANALYSIS</Badge></div>{analysis.description && (@@ -429,11 +429,11 @@ function InvestigationPage() {{/* Quick Actions */}<div className="space-y-4"><h2 className="text-lg font-semibold">Quick Actions</h2>- <div className="grid grid-cols-1 md:grid-cols-2 gap-4">+ <div className="grid grid-cols-[repeat(auto-fit,minmax(300px,1fr))] gap-4"><Card className="hover:shadow-md transition-all cursor-pointer"><CardHeader className="flex flex-row items-center gap-3 pb-2">- <div className="bg-blue-600/20 rounded-lg p-2">- <FileText className="w-5 h-5 text-blue-600" />+ <div className="bg-muted rounded-lg p-2">+ <FileText className="w-5 h-5 text-muted-foreground" /></div><CardTitle className="text-lg">Export Investigation</CardTitle></CardHeader>@@ -443,8 +443,8 @@ function InvestigationPage() {</Card><Card className="hover:shadow-md transition-all cursor-pointer"><CardHeader className="flex flex-row items-center gap-3 pb-2">- <div className="bg-green-600/20 rounded-lg p-2">- <Users className="w-5 h-5 text-green-600" />+ <div className="bg-muted rounded-lg p-2">+ <Users className="w-5 h-5 text-muted-foreground" /></div><CardTitle className="text-lg">Share Investigation</CardTitle></CardHeader>diff --git a/flowsint-app/src/renderer/src/routes/_auth.dashboard.investigations.index.tsx b/flowsint-app/src/renderer/src/routes/_auth.dashboard.investigations.index.tsxindex 55154068..08ed7f2e 100644--- a/flowsint-app/src/renderer/src/routes/_auth.dashboard.investigations.index.tsx+++ b/flowsint-app/src/renderer/src/routes/_auth.dashboard.investigations.index.tsx@@ -42,9 +42,9 @@ function InvestigationPage() {</div>{/* Main Content */}- <div className="max-w-7xl mx-auto p-8 space-y-8">+ <div className="max-w-7xl mx-auto @container p-8 space-y-8">{/* Overview Cards */}- <div className="grid grid-cols-1 md:grid-cols-4 gap-4">+ <div className="grid grid-cols-1 @xs:grid-cols-1 @sm:grid-cols-1 @md:grid-cols-2 @lg:grid-cols-2 @xl:grid-cols-4 gap-4"><Card className="hover:shadow-md transition-shadow"><CardHeader className="flex flex-row items-center justify-between space-y-0 pb-2"><CardTitle className="text-sm font-medium">Total Investigations</CardTitle>diff --git a/flowsint-app/src/renderer/src/store/tab-slice.ts b/flowsint-app/src/renderer/src/store/tab-slice.tsdeleted file mode 100644index 80121f5c..00000000--- a/flowsint-app/src/renderer/src/store/tab-slice.ts+++ /dev/null@@ -1,100 +0,0 @@-import { TabsSlice } from '@/types/tab-slice'-import { TabInfo } from '@/types/tabs'-import { produce } from 'immer'-import { StateCreator } from 'zustand'--export const createTabSlice: StateCreator<TabsSlice, [], [], TabsSlice> = (set) => ({- tabs: {- items: [- {- id: '0',- name: 'New Tab'- }- ],- selectedTabId: '0',- selectedTabIndex: 0,- initialize: async () => {- const ids = await window.tabs.getAllTabIds()- if (ids.length === 0) {- return- }- const selectedTabId = await window.tabs.getSelectedTabId()- set(- produce((state: TabsSlice) => {- state.tabs.items = ids.map((id) => ({- id: id.toString(),- name: 'New Tab'- }))-- state.tabs.selectedTabId = selectedTabId === -1 ? ids[0].toString() : selectedTabId.toString()-- state.tabs.selectedTabIndex = state.tabs.items.findIndex(- (tab) => state.tabs.selectedTabId === tab.id- )- })- )- },- setSelectedTab: (tab: TabInfo) => {- window.tabs.select(parseInt(tab.id))- set(- produce((state: TabsSlice) => {- state.tabs.selectedTabId = tab.id- state.tabs.selectedTabIndex = state.tabs.items.findIndex((item) => tab.id === item.id)- })- )- },- remove: (tab: TabInfo) =>- set(- produce((state: TabsSlice) => {- if (state.tabs.items.length === 1) {- // If we are deleting the last tab, close it and add a new tab- state.tabs.items.splice(0, 1)- window.tabs.close(parseInt(tab.id))- state.tabs.add()- return- }- const index = state.tabs.items.findIndex((t) => t.id === tab.id)-- if (tab.id === state.tabs.selectedTabId) {- // Set new selected tab if the current tab is selected- if (index === -1) {- state.tabs.selectedTabId = state.tabs.items[0].id- } else if (index === state.tabs.items.length - 1) {- state.tabs.selectedTabId = state.tabs.items[state.tabs.items.length - 2].id- } else {- state.tabs.selectedTabId = state.tabs.items[index + 1].id- }- }-- if (index === -1) return- window.tabs.select(parseInt(state.tabs.selectedTabId))- state.tabs.items.splice(index, 1)- window.tabs.close(parseInt(tab.id))- })- ),- add: async () => {- const id = await window.tabs.new()- if (id === -1) return-- set(- produce((state: TabsSlice) => {- state.tabs.items.push({- id: id.toString(),- name: 'New Tab'- })- state.tabs.selectedTabId = id.toString()- state.tabs.selectedTabIndex = state.tabs.items.length - 1- })- )- },- reorder: (tabs: TabInfo[]) => {- window.tabs.reorder(tabs.map((tab) => parseInt(tab.id)))- set(- produce((state: TabsSlice) => {- state.tabs.items = tabs- state.tabs.selectedTabIndex = tabs.findIndex((tab) => state.tabs.selectedTabId === tab.id)- })- )- }- }-})diff --git a/flowsint-app/src/renderer/src/store/useBoundStore.ts b/flowsint-app/src/renderer/src/store/useBoundStore.tsdeleted file mode 100644index 02bc8799..00000000--- a/flowsint-app/src/renderer/src/store/useBoundStore.ts+++ /dev/null@@ -1,27 +0,0 @@-import { TabsSlice } from '@/types/tab-slice'-import { merge } from 'lodash'-import { create } from 'zustand'-import { createJSONStorage, persist } from 'zustand/middleware'-import { createTabSlice } from './tab-slice'--type Store = TabsSlice-export const useBoundStore = create(- persist<Store>(- (...a) => ({- ...createTabSlice(...a)- }),- {- name: 'electron-storage',- version: 1,- storage: createJSONStorage(() => localStorage),- merge: (persistedState, currentState) => {- //? We need this otherwise action (functions inside the state) will be undefined.- return merge({}, currentState, persistedState)- },- partialize: () =>- ({- tabs: {}- }) as Pick<Store, 'tabs'>- }- )-)\ No newline at end of filediff --git a/flowsint-app/src/renderer/src/stores/graph-controls-store.ts b/flowsint-app/src/renderer/src/stores/graph-controls-store.tsindex 1c47dc3e..5c5ce753 100644--- a/flowsint-app/src/renderer/src/stores/graph-controls-store.ts+++ b/flowsint-app/src/renderer/src/stores/graph-controls-store.ts@@ -1,15 +1,23 @@import { create } from 'zustand';type GraphControlsStore = {+ view: 'force' | 'hierarchy';zoomToFit: () => void;zoomIn: () => void;zoomOut: () => void;+ onLayout: (layout: any) => void;setActions: (actions: Partial<GraphControlsStore>) => void;+ refetchGraph: () => void;+ setView: (view: 'force' | 'hierarchy') => void;};export const useGraphControls = create<GraphControlsStore>((set) => ({+ view: 'hierarchy',zoomToFit: () => { },zoomIn: () => { },zoomOut: () => { },+ onLayout: () => { },setActions: (actions) => set(actions),+ refetchGraph: () => { },+ setView: (view) => set({ view }),}));diff --git a/flowsint-app/src/renderer/src/stores/sketch-store.ts b/flowsint-app/src/renderer/src/stores/graph-store.tssimilarity index 52%rename from flowsint-app/src/renderer/src/stores/sketch-store.tsrename to flowsint-app/src/renderer/src/stores/graph-store.tsindex e88298d3..a435c914 100644--- a/flowsint-app/src/renderer/src/stores/sketch-store.ts+++ b/flowsint-app/src/renderer/src/stores/graph-store.ts@@ -1,28 +1,47 @@import { create } from "zustand"import type { EdgeData, NodeData } from "@/types"+import {+ type Node,+ type Edge,+ type OnNodesChange,+ type OnEdgesChange,+ type OnConnect,+ type Connection,+ applyNodeChanges,+ applyEdgeChanges+} from "@xyflow/react"import { type ActionItem, findActionItemByKey } from "@/lib/action-items"-interface SketchState {+export type GraphNode = Node<NodeData> & {+ collapsed?: boolean;+ hidden?: boolean;+}+export type GraphEdge = Edge<EdgeData>++interface GraphState {// === Graph ===- nodes: NodeData[]- edges: EdgeData[]- setNodes: (nodes: NodeData[]) => void- setEdges: (edges: EdgeData[]) => void- addNode: (newNode: Partial<NodeData>) => NodeData- addEdge: (newEdge: Partial<EdgeData>) => EdgeData+ nodes: GraphNode[]+ edges: GraphEdge[]+ setNodes: (nodes: GraphNode[]) => void+ setEdges: (edges: GraphEdge[]) => void+ addNode: (newNode: Partial<GraphNode>) => GraphNode+ addEdge: (newEdge: Partial<GraphEdge>) => GraphEdgeremoveNodes: (nodeIds: string[]) => voidremoveEdges: (edgeIds: string[]) => void- updateGraphData: (nodes: NodeData[], edges: EdgeData[]) => void+ updateGraphData: (nodes: GraphNode[], edges: GraphEdge[]) => void+ onNodesChange: OnNodesChange+ onEdgesChange: OnEdgesChange+ onConnect: OnConnect// === Selection & Current ===- currentNode: NodeData | null- selectedNodes: NodeData[]+ currentNode: GraphNode | null+ selectedNodes: GraphNode[]isCurrent: (nodeId: string) => booleanisSelected: (nodeId: string) => boolean- setCurrentNode: (node: NodeData | null) => void- setSelectedNodes: (nodes: NodeData[]) => void+ setCurrentNode: (node: GraphNode | null) => void+ setSelectedNodes: (nodes: GraphNode[]) => voidclearSelectedNodes: () => void- toggleNodeSelection: (node: NodeData, multiSelect?: boolean) => void+ toggleNodeSelection: (node: GraphNode, multiSelect?: boolean) => void// === Dialogs ===openMainDialog: boolean@@ -40,9 +59,12 @@ interface SketchState {// === Filters ===filters: Record<string, unknown>setFilters: (filters: Record<string, unknown>) => void++ // === Collapse/Expand logic ===+ toggleCollapse: (nodeId: string) => void}-export const useSketchStore = create<SketchState>()((set, get) => ({+export const useGraphStore = create<GraphState>()((set, get) => ({// === Graph ===nodes: [],edges: [],@@ -50,19 +72,23 @@ export const useSketchStore = create<SketchState>()((set, get) => ({setEdges: (edges) => set({ edges }),addNode: (newNode) => {const { nodes } = get()- const nodeWithId: NodeData = {+ const nodeWithId: GraphNode = {id: newNode.id || `node-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`,+ position: {+ x: 0,+ y: 0,+ },...newNode,- } as NodeData- set({ nodes: [...nodes, nodeWithId] })+ } as GraphNode+ set({ nodes: [...nodes, nodeWithId], currentNode: nodeWithId })return nodeWithId},addEdge: (newEdge) => {const { edges } = get()- const edgeWithId: EdgeData = {+ const edgeWithId: GraphEdge = {id: newEdge.id || `node-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`,...newEdge,- } as EdgeData+ } as GraphEdgeset({ edges: [...edges, edgeWithId] })return edgeWithId},@@ -70,7 +96,7 @@ export const useSketchStore = create<SketchState>()((set, get) => ({const { nodes, edges } = get();const newNodes = nodes.filter((n) => !nodeIds.includes(n.id));const newEdges = edges.filter(- (e) => !nodeIds.includes(e.from) && !nodeIds.includes(e.to)+ (e) => !nodeIds.includes(e.source) && !nodeIds.includes(e.target));set({ nodes: newNodes, edges: newEdges });},@@ -79,9 +105,31 @@ export const useSketchStore = create<SketchState>()((set, get) => ({const newEdges = edges.filter((e) => !edgeIds.includes(e.id))set({ edges: newEdges })},- updateGraphData: (nodes: NodeData[], edges: EdgeData[]) => {+ updateGraphData: (nodes: GraphNode[], edges: GraphEdge[]) => {set({ nodes, edges })},+ onNodesChange: (changes) => {+ set({+ nodes: applyNodeChanges(changes, get().nodes) as GraphNode[],+ })+ },+ onEdgesChange: (changes) => {+ set({+ edges: applyEdgeChanges(changes, get().edges) as GraphEdge[],+ })+ },+ onConnect: (connection: Connection) => {+ const edge: GraphEdge = {+ id: `${connection.source}-${connection.target}`,+ source: connection.source!,+ target: connection.target!,+ sourceHandle: connection.sourceHandle,+ targetHandle: connection.targetHandle,+ }+ set({+ edges: [...get().edges, edge],+ })+ },// === Selection & Current ===currentNode: null,@@ -97,7 +145,7 @@ export const useSketchStore = create<SketchState>()((set, get) => ({toggleNodeSelection: (node, multiSelect = false) => {const { selectedNodes, currentNode } = get()const isSelected = selectedNodes.some((n) => n.id === node.id)- let newSelected: NodeData[]+ let newSelected: GraphNode[]if (multiSelect) {newSelected = isSelected@@ -137,4 +185,41 @@ export const useSketchStore = create<SketchState>()((set, get) => ({// === Filters ===filters: {},setFilters: (filters) => set({ filters }),++ // === Collapse/Expand logic ===+ toggleCollapse: (nodeId) => {+ const { nodes, edges } = get();+ // Find the node+ const node = nodes.find(n => n.id === nodeId);+ if (!node) return;+ const isCollapsing = !node.collapsed;+ // Recursively find all descendants+ const getDescendants = (parentId: string, accNodes: Set<string>, accEdges: Set<string>) => {+ edges.forEach(edge => {+ if (edge.source === parentId) {+ accEdges.add(edge.id);+ accNodes.add(edge.target);+ getDescendants(edge.target, accNodes, accEdges);+ }+ });+ };+ const descendantNodeIds = new Set<string>();+ const descendantEdgeIds = new Set<string>();+ getDescendants(nodeId, descendantNodeIds, descendantEdgeIds);+ // Update nodes and edges+ set({+ nodes: nodes.map(n =>+ n.id === nodeId+ ? { ...n, collapsed: isCollapsing }+ : descendantNodeIds.has(n.id)+ ? { ...n, hidden: isCollapsing }+ : n+ ),+ edges: edges.map(e =>+ descendantEdgeIds.has(e.id)+ ? { ...e, hidden: isCollapsing }+ : e+ ),+ });+ },}))diff --git a/flowsint-app/src/renderer/src/stores/flow-store.ts b/flowsint-app/src/renderer/src/stores/transform-store.tssimilarity index 77%rename from flowsint-app/src/renderer/src/stores/flow-store.tsrename to flowsint-app/src/renderer/src/stores/transform-store.tsindex 6fb03805..5feab36e 100644--- a/flowsint-app/src/renderer/src/stores/flow-store.ts+++ b/flowsint-app/src/renderer/src/stores/transform-store.ts@@ -12,7 +12,6 @@ import {applyEdgeChanges} from "@xyflow/react"-export interface NodeData {class_name: stringmodule: string@@ -28,20 +27,20 @@ export interface NodeData {[key: string]: unknown}-export type FlowNode = Node<NodeData>-export type FlowEdge = Edge+export type TransformNode = Node<NodeData>+export type TransformEdge = Edge-export interface FlowState {- nodes: FlowNode[]- edges: FlowEdge[]- selectedNode: FlowNode | null+export interface TransformState {+ nodes: TransformNode[]+ edges: TransformEdge[]+ selectedNode: TransformNode | nullloading: boolean- setNodes: (nodes: FlowNode[] | ((prev: FlowNode[]) => FlowNode[])) => void- setEdges: (edges: FlowEdge[] | ((prev: FlowEdge[]) => FlowEdge[])) => void+ setNodes: (nodes: TransformNode[] | ((prev: TransformNode[]) => TransformNode[])) => void+ setEdges: (edges: TransformEdge[] | ((prev: TransformEdge[]) => TransformEdge[])) => voidonNodesChange: OnNodesChangeonEdgesChange: OnEdgesChangeonConnect: OnConnect- setSelectedNode: (node: FlowNode | null) => void+ setSelectedNode: (node: TransformNode | null) => voidsetLoading: (loading: boolean) => voiddeleteNode: (nodeId: string) => void}@@ -54,16 +53,16 @@ const defaultMarkerEnd: EdgeMarker = {color: "#64748b",}-export const useFlowStore = create<FlowState>((set, get) => ({- nodes: [] as FlowNode[],- edges: [] as FlowEdge[],+export const useTransformStore = create<TransformState>((set, get) => ({+ nodes: [] as TransformNode[],+ edges: [] as TransformEdge[],selectedNode: null,loading: false,setNodes: (nodes) => set({ nodes: typeof nodes === 'function' ? nodes(get().nodes) : nodes }),setEdges: (edges) => set({ edges: typeof edges === 'function' ? edges(get().edges) : edges }),onNodesChange: (changes) => {set({- nodes: applyNodeChanges(changes, get().nodes) as FlowNode[],+ nodes: applyNodeChanges(changes, get().nodes) as TransformNode[],})},onEdgesChange: (changes) => {@@ -72,7 +71,7 @@ export const useFlowStore = create<FlowState>((set, get) => ({})},onConnect: (connection: Connection) => {- const edge: FlowEdge = {+ const edge: TransformEdge = {id: `${connection.source}-${connection.target}`,source: connection.source!,target: connection.target!,diff --git a/flowsint-app/src/renderer/src/stores/useBoundStore.ts b/flowsint-app/src/renderer/src/stores/use-bound-store.tssimilarity index 100%rename from flowsint-app/src/renderer/src/stores/useBoundStore.tsrename to flowsint-app/src/renderer/src/stores/use-bound-store.tsdiff --git a/flowsint-app/src/renderer/src/styles.css b/flowsint-app/src/renderer/src/styles.cssindex 3b455e5c..698a4831 100644--- a/flowsint-app/src/renderer/src/styles.css+++ b/flowsint-app/src/renderer/src/styles.css@@ -4,18 +4,47 @@@custom-variant dark (&:is(.dark *));+@theme {+ --font-family-oxanium: 'Oxanium', sans-serif;+}+body {@apply m-0;font-family:- -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu',+ 'Oxanium', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu','Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;-webkit-font-smoothing: antialiased;-moz-osx-font-smoothing: grayscale;letter-spacing: var(--tracking-normal);}+/* Smooth scrolling optimizations */+html {+ scroll-behavior: smooth;+}++.scroll-smooth {+ scroll-behavior: smooth;+ -webkit-overflow-scrolling: touch;+ /* For iOS smooth scrolling */+}++/* Optimizations for virtualized lists */+.virtualized-container {+ contain: strict;+ will-change: scroll-position;+}++.virtualized-item {+ contain: layout style paint;+ transform: translateZ(0);+ /* Force hardware acceleration */+ will-change: transform;+}+@layer base {:root {+ --font-oxanium: 'Oxanium', sans-serif;--sidebar-background: hsl(0, 0%, 98%);--sidebar-foreground: hsl(240, 5.3%, 26.1%);--sidebar-primary: hsl(240, 5.9%, 10%);@@ -464,6 +493,7 @@ body {--shadow-lg: var(--shadow-lg);--shadow-xl: var(--shadow-xl);--shadow-2xl: var(--shadow-2xl);+ --xy-edge-label-background-color: var(--background)!important;}.minimal-tiptap-editor .ProseMirror {@@ -558,7 +588,7 @@ body {}/* Basic editor styles */-.tiptap > :first-child {+.tiptap> :first-child {margin-top: 0;}@@ -628,4 +658,4 @@ body {.tiptap pre .hljs-strong {font-weight: 700;-}+}\ No newline at end of filediff --git a/flowsint-app/src/renderer/src/types/index.ts b/flowsint-app/src/renderer/src/types/index.tsindex f8d0d169..9807d2ec 100644--- a/flowsint-app/src/renderer/src/types/index.ts+++ b/flowsint-app/src/renderer/src/types/index.ts@@ -1,25 +1,37 @@+import { GraphEdge, GraphNode } from "@/stores/graph-store";import type { Edge, Node } from "@xyflow/react";import { type SVGProps } from "react";+export enum EventLevel {+ // Standard log levels+ INFO = "INFO",+ WARNING = "WARNING",+ FAILED = "FAILED",+ SUCCESS = "SUCCESS",+ DEBUG = "DEBUG",+ // Scanner-specific statuses+ PENDING = "PENDING",+ RUNNING = "RUNNING",+ COMPLETED = "COMPLETED",+ GRAPH_APPEND = "GRAPH_APPEND",+}+export type IconSvgProps = SVGProps<SVGSVGElement> & {size?: number;};export type NodeData = {id: string;- position: any,type: string,- data: any,+ caption: string,label: string,- width?: number,- height?: number,- x?: number,- y?: number+ // Allow any other properties+ [key: string]: any;};export type EdgeData = {- source: string;- target: string;+ // source: string;+ // target: string;from: string,to: string,date: string,@@ -30,8 +42,8 @@ export type EdgeData = {};export type InvestigationGraph = {- nodes: NodeData[];- edges: EdgeData[];+ nodes: Node[];+ edges: Edge[];};@@ -98,4 +110,18 @@ export interface Analysis {last_updated_at: string; // ISO date stringowner_id?: string | null; // UUIDinvestigation_id?: string | null; // UUID+}++export interface Payload {+ message: string+ nodes?: GraphNode[]+ edges?: GraphEdge[]+}+export type Event = {+ id: string+ scan_id: string+ sketch_id: string | null+ type: EventLevel+ payload: Payload+ created_at: string}\ No newline at end of file