From a19b87db62353f68265efdb37d8b45ae33294e19 Mon Sep 17 00:00:00 2001 From: cardosofede Date: Wed, 30 Oct 2024 22:23:21 -0300 Subject: [PATCH] (feat) get the instance of backend api correctly --- frontend/pages/config/utils.py | 5 ++--- .../orchestration/launch_bot_v2_st/README.md | 19 ------------------- .../launch_bot_v2_st/__init__.py | 0 .../orchestration/launch_bot_v2_st/app.py | 8 -------- 4 files changed, 2 insertions(+), 30 deletions(-) delete mode 100644 frontend/pages/orchestration/launch_bot_v2_st/README.md delete mode 100644 frontend/pages/orchestration/launch_bot_v2_st/__init__.py delete mode 100644 frontend/pages/orchestration/launch_bot_v2_st/app.py diff --git a/frontend/pages/config/utils.py b/frontend/pages/config/utils.py index 591cc68..8d90252 100644 --- a/frontend/pages/config/utils.py +++ b/frontend/pages/config/utils.py @@ -3,8 +3,7 @@ import datetime import pandas as pd import streamlit as st -from backend.services.backend_api_client import BackendAPIClient -from CONFIG import BACKEND_API_HOST, BACKEND_API_PORT +from frontend.st_utils import get_backend_api_client def get_max_records(days_to_download: int, interval: str) -> int: @@ -16,7 +15,7 @@ def get_max_records(days_to_download: int, interval: str) -> int: @st.cache_data def get_candles(connector_name="binance", trading_pair="BTC-USDT", interval="1m", days=7): - backend_client = BackendAPIClient(BACKEND_API_HOST, BACKEND_API_PORT) + backend_client = get_backend_api_client() end_time = datetime.datetime.now() - datetime.timedelta(minutes=15) start_time = end_time - datetime.timedelta(days=days) diff --git a/frontend/pages/orchestration/launch_bot_v2_st/README.md b/frontend/pages/orchestration/launch_bot_v2_st/README.md deleted file mode 100644 index 18f4d94..0000000 --- a/frontend/pages/orchestration/launch_bot_v2_st/README.md +++ /dev/null @@ -1,19 +0,0 @@ -### 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 deleted file mode 100644 index e69de29..0000000 diff --git a/frontend/pages/orchestration/launch_bot_v2_st/app.py b/frontend/pages/orchestration/launch_bot_v2_st/app.py deleted file mode 100644 index 0766de0..0000000 --- a/frontend/pages/orchestration/launch_bot_v2_st/app.py +++ /dev/null @@ -1,8 +0,0 @@ -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()