feat: market event
This commit is contained in:
@@ -436,6 +436,10 @@ function EventDetail({
|
|||||||
preds: latest.prediction_json || {},
|
preds: latest.prediction_json || {},
|
||||||
actuals: latest.actual_json || {},
|
actuals: latest.actual_json || {},
|
||||||
drift: driftByInst,
|
drift: driftByInst,
|
||||||
|
pricesMode: undefined,
|
||||||
|
lagMin: undefined,
|
||||||
|
lagDays: undefined,
|
||||||
|
lagDebug: undefined,
|
||||||
})
|
})
|
||||||
if (latest.graph_json?.nodes?.length) {
|
if (latest.graph_json?.nodes?.length) {
|
||||||
setGraphData(latest.graph_json as GraphData)
|
setGraphData(latest.graph_json as GraphData)
|
||||||
@@ -550,7 +554,7 @@ function EventDetail({
|
|||||||
})
|
})
|
||||||
const d = await r.json()
|
const d = await r.json()
|
||||||
if (!r.ok) throw new Error(d.detail || r.statusText)
|
if (!r.ok) throw new Error(d.detail || r.statusText)
|
||||||
setAnResult({
|
const freshResult = {
|
||||||
score: d.activation?.score ?? null,
|
score: d.activation?.score ?? null,
|
||||||
preds: d.node_values ?? {},
|
preds: d.node_values ?? {},
|
||||||
actuals: d.actual_moves ?? {},
|
actuals: d.actual_moves ?? {},
|
||||||
@@ -559,9 +563,11 @@ function EventDetail({
|
|||||||
lagMin: d.effective_lag_min,
|
lagMin: d.effective_lag_min,
|
||||||
lagDays: d.effective_lag_days,
|
lagDays: d.effective_lag_days,
|
||||||
lagDebug: d.lag_debug,
|
lagDebug: d.lag_debug,
|
||||||
})
|
}
|
||||||
|
setAnResult(freshResult)
|
||||||
if (d.graph_json?.nodes?.length) setGraphData(d.graph_json)
|
if (d.graph_json?.nodes?.length) setGraphData(d.graph_json)
|
||||||
await loadAnalyses()
|
await loadAnalyses()
|
||||||
|
setAnResult(freshResult) // loadAnalyses() écrase anResult — on restaure le résultat frais
|
||||||
} catch (e: any) { setAnResult({ score: null, preds: {}, actuals: {} }) }
|
} catch (e: any) { setAnResult({ score: null, preds: {}, actuals: {} }) }
|
||||||
finally { setLoadingAn(false) }
|
finally { setLoadingAn(false) }
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user