4310a5cc2d
Frontend: - Vite + React 18 + TypeScript + Tailwind v4 + Shadcn/ui - React Flow v12 canvas with all 11 node types and 5 edge types - Dark theme with project design system (cyan, green, orange, purple accents) - Collapsible sidebar, toolbar, detail panel - Zustand store for canvas state - Demo data with 10 nodes and 10 edges Backend: - FastAPI + SQLAlchemy async + SQLite (Python 3.13) - DB models: Node, Edge, CanvasState, PendingDevice, ScanRun - REST API routes: auth, nodes, edges, canvas, scan, status (WebSocket) - JWT auth + bcrypt via config.yml - Pydantic v2 schemas Infra: - GitHub Actions quality + security workflows - .gitignore, .env.example, verify-tooling.sh, security-check.sh
31 lines
595 B
Python
31 lines
595 B
Python
from datetime import datetime
|
|
from typing import Any
|
|
|
|
from pydantic import BaseModel
|
|
|
|
|
|
class PendingDeviceResponse(BaseModel):
|
|
id: str
|
|
ip: str
|
|
mac: str | None
|
|
hostname: str | None
|
|
os: str | None
|
|
services: list[Any]
|
|
suggested_type: str | None
|
|
status: str
|
|
discovered_at: datetime
|
|
|
|
model_config = {"from_attributes": True}
|
|
|
|
|
|
class ScanRunResponse(BaseModel):
|
|
id: str
|
|
status: str
|
|
ranges: list[str]
|
|
devices_found: int
|
|
started_at: datetime
|
|
finished_at: datetime | None
|
|
error: str | None
|
|
|
|
model_config = {"from_attributes": True}
|