TCPDashboard/app_new.py
Vasily.onl 87843a1d35 3. 7 Enhance chart functionality with time range controls and stability improvements
- Updated `app_new.py` to run the application in debug mode for stability.
- Introduced a new time range control panel in `dashboard/components/chart_controls.py`, allowing users to select predefined time ranges and custom date ranges.
- Enhanced chart callbacks in `dashboard/callbacks/charts.py` to handle time range inputs, ensuring accurate market statistics and analysis based on user selections.
- Implemented logic to preserve chart state during updates, preventing resets of zoom/pan settings.
- Updated market statistics display to reflect the selected time range, improving user experience and data relevance.
- Added a clear button for custom date ranges to reset selections easily.
- Enhanced documentation to reflect the new time range features and usage guidelines.
2025-06-05 12:54:41 +08:00

44 lines
1.3 KiB
Python

"""
Crypto Trading Bot Dashboard - Modular Version
This is the main entry point for the dashboard application using the new modular structure.
"""
from dashboard import create_app
from utils.logger import get_logger
logger = get_logger("main")
def main():
"""Main entry point for the dashboard application."""
try:
# Create the dashboard app
app = create_app()
# Import and register all callbacks after app creation
from dashboard.callbacks import (
register_navigation_callbacks,
register_chart_callbacks,
register_indicator_callbacks,
register_system_health_callbacks
)
# Register all callback modules
register_navigation_callbacks(app)
register_chart_callbacks(app) # Now includes enhanced market statistics
register_indicator_callbacks(app) # Placeholder for now
register_system_health_callbacks(app) # Placeholder for now
logger.info("Dashboard application initialized successfully")
# Run the app (debug=False for stability, manual restart required for changes)
app.run(debug=False, host='0.0.0.0', port=8050)
except Exception as e:
logger.error(f"Failed to start dashboard application: {e}")
raise
if __name__ == '__main__':
main()