save/load data anotations

This commit is contained in:
Dobromir Popov
2025-10-18 23:44:02 +03:00
parent 7646137f11
commit 002d0f7858
7 changed files with 1563 additions and 69 deletions

View File

@@ -3,6 +3,22 @@
{% block title %}Trade Annotation Dashboard{% endblock %}
{% block content %}
<!-- Live Mode Banner -->
<div id="live-mode-banner" class="alert alert-success mb-0" style="display: none; border-radius: 0;">
<div class="container-fluid">
<div class="d-flex align-items-center justify-content-between">
<div>
<span class="badge bg-danger me-2">🔴 LIVE</span>
<strong>Real-Time Inference Active</strong>
<span class="ms-3 small">Charts updating with live data every second</span>
</div>
<div>
<span class="badge bg-light text-dark" id="live-update-count">0 updates</span>
</div>
</div>
</div>
</div>
<div class="row mt-3">
<!-- Left Sidebar - Controls -->
<div class="col-md-2">
@@ -96,9 +112,15 @@
window.appState.chartManager.initializeCharts(data.chart_data);
// Load existing annotations
console.log('Loading', window.appState.annotations.length, 'existing annotations');
window.appState.annotations.forEach(annotation => {
window.appState.chartManager.addAnnotation(annotation);
});
// Update annotation list
if (typeof renderAnnotationsList === 'function') {
renderAnnotationsList(window.appState.annotations);
}
} else {
showError('Failed to load chart data: ' + data.error.message);
}