diff --git a/frontend/pages/orchestration/launch_bot_v2/app.py b/frontend/pages/orchestration/launch_bot_v2/app.py index 304bf20..bf1e15b 100644 --- a/frontend/pages/orchestration/launch_bot_v2/app.py +++ b/frontend/pages/orchestration/launch_bot_v2/app.py @@ -1,4 +1,10 @@ -from frontend.components.deploy_v2_with_controllers import LaunchV2WithControllers +from types import SimpleNamespace + +import streamlit as st +from streamlit_elements import elements, mui + +from frontend.components.dashboard import Dashboard +from frontend.components.launch_strategy_v2 import LaunchStrategyV2 from frontend.st_utils import initialize_st_page CARD_WIDTH = 6 @@ -7,6 +13,19 @@ NUM_CARD_COLS = 2 initialize_st_page(title="Launch Bot", icon="🙌") +if "launch_bots_board" not in st.session_state: + board = Dashboard() + launch_bots_board = SimpleNamespace( + dashboard=board, + launch_bot=LaunchStrategyV2(board, 0, 0, 12, 10), + ) + st.session_state.launch_bots_board = launch_bots_board -launcher = LaunchV2WithControllers() -launcher() +else: + launch_bots_board = st.session_state.launch_bots_board + + +with elements("create_bot"): + with mui.Paper(elevation=3, style={"padding": "2rem"}, spacing=[2, 2], container=True): + with launch_bots_board.dashboard(): + launch_bots_board.launch_bot() diff --git a/frontend/pages/orchestration/launch_bot_v2_st/README.md b/frontend/pages/orchestration/launch_bot_v2_st/README.md new file mode 100644 index 0000000..18f4d94 --- /dev/null +++ b/frontend/pages/orchestration/launch_bot_v2_st/README.md @@ -0,0 +1,19 @@ +### Description + +This page helps you deploy and manage Hummingbot instances: + +- Starting and stopping Hummingbot Broker +- Creating, starting and stopping bot instances +- Managing strategy and script files that instances run +- Fetching status of running instances + +### Maintainers + +This page is maintained by Hummingbot Foundation as a template other pages: + +* [cardosfede](https://github.com/cardosfede) +* [fengtality](https://github.com/fengtality) + +### Wiki + +See the [wiki](https://github.com/hummingbot/dashboard/wiki/%F0%9F%90%99-Bot-Orchestration) for more information. \ No newline at end of file diff --git a/frontend/pages/orchestration/launch_bot_v2_st/__init__.py b/frontend/pages/orchestration/launch_bot_v2_st/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/frontend/pages/orchestration/launch_bot_v2_st/app.py b/frontend/pages/orchestration/launch_bot_v2_st/app.py new file mode 100644 index 0000000..50c2c08 --- /dev/null +++ b/frontend/pages/orchestration/launch_bot_v2_st/app.py @@ -0,0 +1,9 @@ +from frontend.components.deploy_v2_with_controllers import LaunchV2WithControllers +from frontend.st_utils import initialize_st_page + + +initialize_st_page(title="Launch Bot ST", icon="🙌") + + +launcher = LaunchV2WithControllers() +launcher()