try to have sell actions
This commit is contained in:
@ -51,17 +51,18 @@ class DashboardLayoutManager:
|
||||
return html.Div([
|
||||
self._create_metrics_and_signals_row(),
|
||||
self._create_charts_row(),
|
||||
self._create_analytics_row(),
|
||||
self._create_performance_row()
|
||||
self._create_analytics_and_performance_row()
|
||||
])
|
||||
|
||||
def _create_metrics_and_signals_row(self):
|
||||
"""Create the top row with key metrics and recent signals"""
|
||||
"""Create the top row with key metrics, recent signals, and session controls"""
|
||||
return html.Div([
|
||||
# Left side - Key metrics (compact cards)
|
||||
self._create_metrics_grid(),
|
||||
# Right side - Recent Signals & Model Training
|
||||
self._create_signals_and_training_panels()
|
||||
# Middle - Recent Signals
|
||||
self._create_signals_panel(),
|
||||
# Right side - Session Controls
|
||||
self._create_session_controls_panel()
|
||||
], className="d-flex mb-3")
|
||||
|
||||
def _create_metrics_grid(self):
|
||||
@ -96,10 +97,9 @@ class DashboardLayoutManager:
|
||||
}
|
||||
)
|
||||
|
||||
def _create_signals_and_training_panels(self):
|
||||
"""Create the signals and training panels"""
|
||||
def _create_signals_panel(self):
|
||||
"""Create the signals panel"""
|
||||
return html.Div([
|
||||
# Recent Trading Signals Column (50%)
|
||||
html.Div([
|
||||
html.Div([
|
||||
html.H6([
|
||||
@ -108,19 +108,39 @@ class DashboardLayoutManager:
|
||||
], className="card-title mb-2"),
|
||||
html.Div(id="recent-decisions", style={"height": "160px", "overflowY": "auto"})
|
||||
], className="card-body p-2")
|
||||
], className="card", style={"width": "48%"}),
|
||||
|
||||
# Model Training + COB Buckets Column (50%)
|
||||
], className="card")
|
||||
], style={"width": "35%", "marginLeft": "2%"})
|
||||
|
||||
def _create_session_controls_panel(self):
|
||||
"""Create the session controls panel"""
|
||||
return html.Div([
|
||||
html.Div([
|
||||
html.Div([
|
||||
html.H6([
|
||||
html.I(className="fas fa-brain me-2"),
|
||||
"Training Progress & COB $1 Buckets"
|
||||
html.I(className="fas fa-cog me-2"),
|
||||
"Session Controls"
|
||||
], className="card-title mb-2"),
|
||||
html.Div(id="training-metrics", style={"height": "160px", "overflowY": "auto"})
|
||||
html.Button([
|
||||
html.I(className="fas fa-trash me-1"),
|
||||
"Clear Session"
|
||||
], id="clear-session-btn", className="btn btn-warning btn-sm w-100"),
|
||||
html.Hr(className="my-2"),
|
||||
html.Small("System Status", className="text-muted d-block mb-1"),
|
||||
html.Div([
|
||||
html.Span("Trading: ", className="small"),
|
||||
html.Span("SIMULATION", className="badge bg-info small")
|
||||
], className="mb-1"),
|
||||
html.Div([
|
||||
html.Span("Data: ", className="small"),
|
||||
html.Span("Active", className="badge bg-success small")
|
||||
], className="mb-1"),
|
||||
html.Div([
|
||||
html.Span("WebSocket: ", className="small"),
|
||||
html.Span("Connected", className="badge bg-success small")
|
||||
])
|
||||
], className="card-body p-2")
|
||||
], className="card", style={"width": "48%", "marginLeft": "4%"}),
|
||||
], style={"width": "48%", "marginLeft": "2%", "display": "flex"})
|
||||
], className="card")
|
||||
], style={"width": "23%", "marginLeft": "2%"})
|
||||
|
||||
def _create_charts_row(self):
|
||||
"""Create the charts row with price chart and manual trading buttons"""
|
||||
@ -154,68 +174,58 @@ class DashboardLayoutManager:
|
||||
], className="card")
|
||||
])
|
||||
|
||||
def _create_analytics_row(self):
|
||||
"""Create the analytics row with COB data and system status"""
|
||||
def _create_analytics_and_performance_row(self):
|
||||
"""Create the combined analytics and performance row with COB data, trades, and training progress"""
|
||||
return html.Div([
|
||||
# COB Status
|
||||
# Left side - COB panels and trades (68% width)
|
||||
html.Div([
|
||||
# Top section - COB panels
|
||||
html.Div([
|
||||
html.H6([
|
||||
html.I(className="fas fa-server me-2"),
|
||||
"System Status"
|
||||
], className="card-title mb-2"),
|
||||
html.Div(id="cob-status-content")
|
||||
], className="card-body p-2")
|
||||
], className="card", style={"width": "32%"}),
|
||||
# ETH/USDT COB
|
||||
html.Div([
|
||||
html.Div([
|
||||
html.H6([
|
||||
html.I(className="fab fa-ethereum me-2"),
|
||||
"ETH/USDT COB"
|
||||
], className="card-title mb-2"),
|
||||
html.Div(id="eth-cob-content")
|
||||
], className="card-body p-2")
|
||||
], className="card", style={"width": "48%"}),
|
||||
|
||||
# BTC/USDT COB
|
||||
html.Div([
|
||||
html.Div([
|
||||
html.H6([
|
||||
html.I(className="fab fa-bitcoin me-2"),
|
||||
"BTC/USDT COB"
|
||||
], className="card-title mb-2"),
|
||||
html.Div(id="btc-cob-content")
|
||||
], className="card-body p-2")
|
||||
], className="card", style={"width": "48%", "marginLeft": "4%"})
|
||||
], className="d-flex mb-3"),
|
||||
|
||||
# Bottom section - Closed Trades
|
||||
html.Div([
|
||||
html.Div([
|
||||
html.H6([
|
||||
html.I(className="fas fa-history me-2"),
|
||||
"Closed Trades"
|
||||
], className="card-title mb-2"),
|
||||
html.Div(id="closed-trades-table", style={"height": "250px", "overflowY": "auto"})
|
||||
], className="card-body p-2")
|
||||
], className="card")
|
||||
], style={"width": "68%"}),
|
||||
|
||||
# ETH/USDT COB
|
||||
# Right side - Training Progress & COB $1 Buckets (30% width, spans full height)
|
||||
html.Div([
|
||||
html.Div([
|
||||
html.H6([
|
||||
html.I(className="fab fa-ethereum me-2"),
|
||||
"ETH/USDT COB"
|
||||
html.I(className="fas fa-brain me-2"),
|
||||
"Training Progress & COB $1 Buckets"
|
||||
], className="card-title mb-2"),
|
||||
html.Div(id="eth-cob-content")
|
||||
html.Div(id="training-metrics", style={"height": "550px", "overflowY": "auto"})
|
||||
], className="card-body p-2")
|
||||
], className="card", style={"width": "32%", "marginLeft": "2%"}),
|
||||
|
||||
# BTC/USDT COB
|
||||
html.Div([
|
||||
html.Div([
|
||||
html.H6([
|
||||
html.I(className="fab fa-bitcoin me-2"),
|
||||
"BTC/USDT COB"
|
||||
], className="card-title mb-2"),
|
||||
html.Div(id="btc-cob-content")
|
||||
], className="card-body p-2")
|
||||
], className="card", style={"width": "32%", "marginLeft": "2%"})
|
||||
], className="d-flex mb-3")
|
||||
], className="card", style={"width": "30%", "marginLeft": "2%"})
|
||||
], className="d-flex")
|
||||
|
||||
def _create_performance_row(self):
|
||||
"""Create the performance row with closed trades and session controls"""
|
||||
return html.Div([
|
||||
# Closed Trades Table
|
||||
html.Div([
|
||||
html.Div([
|
||||
html.H6([
|
||||
html.I(className="fas fa-history me-2"),
|
||||
"Closed Trades"
|
||||
], className="card-title mb-2"),
|
||||
html.Div(id="closed-trades-table", style={"height": "200px", "overflowY": "auto"})
|
||||
], className="card-body p-2")
|
||||
], className="card", style={"width": "70%"}),
|
||||
|
||||
# Session Controls
|
||||
html.Div([
|
||||
html.Div([
|
||||
html.H6([
|
||||
html.I(className="fas fa-cog me-2"),
|
||||
"Session Controls"
|
||||
], className="card-title mb-2"),
|
||||
html.Button([
|
||||
html.I(className="fas fa-trash me-1"),
|
||||
"Clear Session"
|
||||
], id="clear-session-btn", className="btn btn-warning btn-sm w-100")
|
||||
], className="card-body p-2")
|
||||
], className="card", style={"width": "28%", "marginLeft": "2%"})
|
||||
], className="d-flex")
|
||||
|
Reference in New Issue
Block a user