Backend:
- DB: add system_logs table (level/source/cycle_id/ticker/message) and
iv_watchlist table (ticker/added_by/is_active); seed builtin 18 tickers
- DBLogHandler attached at startup — all WARNING+ logs auto-persist to DB
- log_system_event() helper for structured manual events
- New router /api/logs: GET with filters (level, source, cycle_id, ticker,
date range), GET /sources, GET /cycles for dropdowns, DELETE /clear
- iv_watchlist now read from DB instead of hardcoded constant; options_vol
watchlist/refresh/bootstrap endpoints all use get_watchlist_tickers()
- New endpoints: POST/DELETE /options-vol/watchlist-tickers/{ticker} to
add/remove tickers; adding triggers background 1-year bootstrap
- auto_cycle: after log_trade_entries(), auto-detect new underlying proxies
not yet in watchlist, add them and bootstrap their IV history
Frontend:
- New page SystemLogs (/logs): log table with level/source/cycle/ticker/date
filters, color-coded rows, expandable JSON details, auto-refresh 30s
- Options Lab: WatchlistManager section — add ticker input, chip list with
builtin/auto/manual color coding, remove button for non-builtins
- Sidebar: Logs Système nav link (ScrollText icon)
- useApi: useSystemLogs, useLogSources, useLogCycles, useClearLogs,
useWatchlistTickers, useAddWatchlistTicker, useRemoveWatchlistTicker
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
58 lines
2.3 KiB
TypeScript
58 lines
2.3 KiB
TypeScript
import { BrowserRouter, Routes, Route } from 'react-router-dom'
|
|
import Sidebar from './components/layout/Sidebar'
|
|
import Dashboard from './pages/Dashboard'
|
|
import GeoRadar from './pages/GeoRadar'
|
|
import Markets from './pages/Markets'
|
|
import MacroRegime from './pages/MacroRegime'
|
|
import OptionsLab from './pages/OptionsLab'
|
|
import Backtest from './pages/Backtest'
|
|
import CalendarPage from './pages/CalendarPage'
|
|
import Portfolio from './pages/Portfolio'
|
|
import PatternEditor from './pages/PatternEditor'
|
|
import JournalDeBord from './pages/JournalDeBord'
|
|
import RapportIA from './pages/RapportIA'
|
|
import SuperContexte from './pages/SuperContexte'
|
|
import Config from './pages/Config'
|
|
import Analytics from './pages/Analytics'
|
|
import AnalyticsAdvanced from './pages/AnalyticsAdvanced'
|
|
import RiskDashboard from './pages/RiskDashboard'
|
|
import SystemLogs from './pages/SystemLogs'
|
|
import { useCycleWatcher } from './hooks/useApi'
|
|
|
|
function GlobalWatcher() {
|
|
useCycleWatcher()
|
|
return null
|
|
}
|
|
|
|
export default function App() {
|
|
return (
|
|
<BrowserRouter>
|
|
<div className="flex min-h-screen">
|
|
<GlobalWatcher />
|
|
<Sidebar />
|
|
<main className="flex-1 overflow-auto">
|
|
<Routes>
|
|
<Route path="/" element={<Dashboard />} />
|
|
<Route path="/geo" element={<GeoRadar />} />
|
|
<Route path="/markets" element={<Markets />} />
|
|
<Route path="/macro" element={<MacroRegime />} />
|
|
<Route path="/options" element={<OptionsLab />} />
|
|
<Route path="/patterns" element={<PatternEditor />} />
|
|
<Route path="/portfolio" element={<Portfolio />} />
|
|
<Route path="/backtest" element={<Backtest />} />
|
|
<Route path="/calendar" element={<CalendarPage />} />
|
|
<Route path="/journal" element={<JournalDeBord />} />
|
|
<Route path="/rapport" element={<RapportIA />} />
|
|
<Route path="/super-contexte" element={<SuperContexte />} />
|
|
<Route path="/config" element={<Config />} />
|
|
<Route path="/analytics" element={<Analytics />} />
|
|
<Route path="/analytics-advanced" element={<AnalyticsAdvanced />} />
|
|
<Route path="/risk" element={<RiskDashboard />} />
|
|
<Route path="/logs" element={<SystemLogs />} />
|
|
</Routes>
|
|
</main>
|
|
</div>
|
|
</BrowserRouter>
|
|
)
|
|
}
|