- Introduced `app.py` as the main entry point for the dashboard, providing real-time visualization and bot management interface. - Implemented layout components including header, navigation tabs, and content areas for market data, bot management, performance analytics, and system health. - Added callbacks for dynamic updates of market data charts and statistics, ensuring real-time interaction. - Created reusable UI components in `components` directory for modularity and maintainability. - Enhanced database operations for fetching market data and checking data availability. - Updated `main.py` to start the dashboard application with improved user instructions and error handling. - Documented components and functions for clarity and future reference.
29 lines
846 B
Python
29 lines
846 B
Python
"""
|
|
Dashboard UI Components Package
|
|
|
|
This package contains reusable UI components for the Crypto Trading Bot Dashboard.
|
|
Components are designed to be modular and can be composed to create complex layouts.
|
|
"""
|
|
|
|
from pathlib import Path
|
|
|
|
# Package metadata
|
|
__version__ = "0.1.0"
|
|
__package_name__ = "components"
|
|
|
|
# Make components directory available
|
|
COMPONENTS_DIR = Path(__file__).parent
|
|
|
|
# Component registry for future component discovery
|
|
AVAILABLE_COMPONENTS = [
|
|
"dashboard", # Main dashboard layout components
|
|
"charts", # Chart and visualization components
|
|
]
|
|
|
|
def get_component_path(component_name: str) -> Path:
|
|
"""Get the file path for a specific component."""
|
|
return COMPONENTS_DIR / f"{component_name}.py"
|
|
|
|
def list_components() -> list:
|
|
"""List all available components."""
|
|
return AVAILABLE_COMPONENTS.copy() |