mirror of
https://github.com/aljazceru/hummingbot-dashboard.git
synced 2026-01-24 23:54:21 +01:00
(feat) refactor deploy pages
This commit is contained in:
@@ -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()
|
||||
|
||||
19
frontend/pages/orchestration/launch_bot_v2_st/README.md
Normal file
19
frontend/pages/orchestration/launch_bot_v2_st/README.md
Normal file
@@ -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.
|
||||
9
frontend/pages/orchestration/launch_bot_v2_st/app.py
Normal file
9
frontend/pages/orchestration/launch_bot_v2_st/app.py
Normal file
@@ -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()
|
||||
Reference in New Issue
Block a user