From 2f2230c4358cb7b26a7fa6319e67bae44327f4c4 Mon Sep 17 00:00:00 2001 From: cardosofede Date: Mon, 8 Jul 2024 17:50:16 +0300 Subject: [PATCH 01/15] (feat) update credentials.yml --- credentials.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/credentials.yml b/credentials.yml index eabdf258..acd1eae3 100644 --- a/credentials.yml +++ b/credentials.yml @@ -1,13 +1,14 @@ -cookie: - expiry_days: 30 - key: random_signature_key - name: random_cookie_name credentials: usernames: admin: email: admin@gmail.com name: Admin User - password: abc # To be replaced with hashed password: hashed_passwords = stauth.Hasher(['abc', 'def']).generate() -preauthorized: # the preferred way to add users since there is no need for manual hashing of passwords + logged_in: False + password: abc +cookie: + expiry_days: 30 + key: some_signature_key # Must be string + name: some_cookie_name +pre-authorized: emails: - admin@admin.com From a42b845053a4a69c1d5f529fbe9d0853f165338f Mon Sep 17 00:00:00 2001 From: cardosofede Date: Mon, 8 Jul 2024 17:50:42 +0300 Subject: [PATCH 02/15] (feat) improve main.py to use the latest version of stauth --- main.py | 61 ++++++++++++++++++++++++--------------------------------- 1 file changed, 26 insertions(+), 35 deletions(-) diff --git a/main.py b/main.py index d037b1a6..8f4d88f6 100644 --- a/main.py +++ b/main.py @@ -1,9 +1,9 @@ import streamlit as st +import yaml from st_pages import Page, Section, show_pages -from streamlit_authenticator import Authenticate - +from yaml import SafeLoader +import streamlit_authenticator as stauth from CONFIG import AUTH_SYSTEM_ENABLED -from backend.utils.os_utils import read_yaml_file, dump_dict_to_yaml def main_page(): @@ -100,35 +100,26 @@ def main_page(): st.write("If you encounter any bugs or have suggestions for improvement, please create an issue in the [Hummingbot Dashboard Github](https://github.com/hummingbot/dashboard).") -# config = read_yaml_file("credentials.yml") -# -# if "authenticator" not in st.session_state: -# st.session_state.authenticator = Authenticate( -# config['credentials'], -# config['cookie']['name'], -# config['cookie']['key'], -# config['cookie']['expiry_days'], -# config['preauthorized'] -# ) - -# if not AUTH_SYSTEM_ENABLED: -main_page() -# elif st.session_state["authentication_status"]: -# config["credentials"] = st.session_state.authenticator_handler.credentials -# dump_dict_to_yaml(config, "credentials.yml") -# with st.sidebar: -# st.write(f'Welcome {st.session_state["name"]}!') -# st.session_state.authenticator.logout(location='sidebar') # Updated logout call -# main_page() -# else: -# show_pages([ -# Page("main.py", "Hummingbot Dashboard", "๐Ÿ“Š"), -# ]) -# name, authentication_status, username = st.session_state.authenticator.login(location='main') # Updated login call -# if st.session_state["authentication_status"] == False: -# st.error('Username/password is incorrect') -# elif st.session_state["authentication_status"] == None: -# st.warning('Please enter your username and password') -# st.write("---") -# st.write("If you are pre-authorized, you can login with your pre-authorized mail!") -# st.session_state.authenticator.register_user(location='main') # Updated register user call +if not AUTH_SYSTEM_ENABLED: + main_page() +else: + with open('credentials.yml') as file: + config = yaml.load(file, Loader=SafeLoader) + authenticator = stauth.Authenticate( + config['credentials'], + config['cookie']['name'], + config['cookie']['key'], + config['cookie']['expiry_days'], + config['pre-authorized'] + ) + authenticator.login() + if st.session_state["authentication_status"]: + authenticator.logout(location="sidebar") + st.sidebar.write(f'Welcome *{st.session_state["name"]}*') + main_page() + else: + show_pages([Page("main.py", "Hummingbot Dashboard", "๐Ÿ“Š"),]) + if st.session_state["authentication_status"] is False: + st.error('Username/password is incorrect') + elif st.session_state["authentication_status"] is None: + st.warning('Please enter your username and password') \ No newline at end of file From a12f74a6961bb03c43b1f123908583760e411379 Mon Sep 17 00:00:00 2001 From: cardosofede Date: Mon, 8 Jul 2024 17:52:09 +0300 Subject: [PATCH 03/15] (feat) remove pre-auth --- credentials.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/credentials.yml b/credentials.yml index acd1eae3..78fcbd71 100644 --- a/credentials.yml +++ b/credentials.yml @@ -8,7 +8,4 @@ credentials: cookie: expiry_days: 30 key: some_signature_key # Must be string - name: some_cookie_name -pre-authorized: - emails: - - admin@admin.com + name: some_cookie_name # Must be string \ No newline at end of file From 0a57d3bc911fac7a3a9dd261bc6434ea8e04ad3e Mon Sep 17 00:00:00 2001 From: cardosofede Date: Mon, 8 Jul 2024 18:35:48 +0300 Subject: [PATCH 04/15] (feat) simplify main.py --- main.py | 154 ++++++++++++++------------------------------------------ 1 file changed, 39 insertions(+), 115 deletions(-) diff --git a/main.py b/main.py index 8f4d88f6..ef1159b7 100644 --- a/main.py +++ b/main.py @@ -1,125 +1,49 @@ import streamlit as st -import yaml -from st_pages import Page, Section, show_pages -from yaml import SafeLoader -import streamlit_authenticator as stauth -from CONFIG import AUTH_SYSTEM_ENABLED +from frontend.st_utils import auth_system -def main_page(): - show_pages( - [ - Page("main.py", "Hummingbot Dashboard", "๐Ÿ“Š"), - Section("Bot Orchestration", "๐Ÿ™"), - Page("frontend/pages/orchestration/instances/app.py", "Instances", "๐Ÿฆ…"), - Page("frontend/pages/orchestration/launch_bot_v2/app.py", "Deploy V2", "๐Ÿš€"), - Page("frontend/pages/orchestration/credentials/app.py", "Credentials", "๐Ÿ”‘"), - Page("frontend/pages/orchestration/portfolio/app.py", "Portfolio", "๐Ÿ’ฐ"), - # Page("frontend/pages/orchestration/launch_bot_v2_st/app.py", "Deploy ST", "๐Ÿ™Œ"), - # Page("pages/file_manager/app.py", "File Explorer", "๐Ÿ—‚"), - Section("Config Generator", "๐ŸŽ›๏ธ"), - Page("frontend/pages/config/pmm_simple/app.py", "PMM Simple", "๐Ÿ‘จโ€๐Ÿซ"), - Page("frontend/pages/config/pmm_dynamic/app.py", "PMM Dynamic", "๐Ÿ‘ฉโ€๐Ÿซ"), - Page("frontend/pages/config/dman_maker_v2/app.py", "D-Man Maker V2", "๐Ÿค–"), - Page("frontend/pages/config/bollinger_v1/app.py", "Bollinger V1", "๐Ÿ“ˆ"), - Page("frontend/pages/config/macd_bb_v1/app.py", "MACD_BB V1", "๐Ÿ“Š"), - Page("frontend/pages/config/supertrend_v1/app.py", "SuperTrend V1", "๐Ÿ‘จโ€๐Ÿ”ฌ"), - Page("frontend/pages/config/xemm_controller/app.py", "XEMM Controller", "โšก๏ธ"), - # Page("frontend/pages/config/position_builder/app.py", "Position Builder", "๐Ÿ”ญ"), - Section("Data", "๐Ÿ’พ"), - Page("frontend/pages/data/download_candles/app.py", "Download Candles", "๐Ÿ’น"), - # Page("pages/create/create.py", "Create", "โš”๏ธ"), - # Page("pages/optimize/optimize.py", "Optimize", "๐Ÿงช"), - # Page("pages/analyze/analyze.py", "Analyze", "๐Ÿ”ฌ"), - Section("Community Pages", "๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ฆ"), - # Page("frontend/pages/performance/strategy_performance/app.py", "Strategy Performance", "๐Ÿš€"), - Page("frontend/pages/data/token_spreads/app.py", "Token Spreads", "๐Ÿง™"), - Page("frontend/pages/data/tvl_vs_mcap/app.py", "TVL vs Market Cap", "๐Ÿฆ‰"), - ] - ) - - # Readme Section - readme_container = st.container() - with readme_container: - st.markdown("# ๐Ÿ“Š Hummingbot Dashboard") +def main(): + # readme section + with st.container(): + st.markdown("# ๐Ÿ“Š hummingbot dashboard") st.markdown(""" - Hummingbot Dashboard is an open source application that helps you create, backtest, and optimize various - types of algo trading strategies. Afterwards, you can deploy them as [Hummingbot](http://hummingbot.org) + hummingbot dashboard is an open source application that helps you create, backtest, and optimize various + types of algo trading strategies. afterwards, you can deploy them as [hummingbot](http://hummingbot.org) instances in either paper or live trading mode.""") - st.write("---") - - st.header("Getting Started") - - st.write( - "Watch the [Hummingbot Dashboard Tutorial playlist](https://www.youtube.com/watch?v=a-kenMqRB00) to get started!") - - # Container for the videos - container = st.container() - + st.header("Getting started") + st.write("watch the [hummingbot dashboard tutorial playlist](https://www.youtube.com/watch?v=a-kenmqrb00) to get started!") video_titles = [ - "1 - Introduction to Dashboard", - "2 - Setting up the Environment", - "3 - Managing Credentials", - "4 - Using the Master Bot Profile", - "5 - Deploying Bots and Running Strategies", - "7 - Controllers, Backtesting, and Optimization", - "8 - Deploying Best Strategies from Backtests", - "9 - Conclusions and Next Steps" + "1 - introduction to dashboard", + "2 - setting up the environment", + "3 - managing credentials", + "4 - using the master bot profile", + "5 - deploying bots and running strategies", + "7 - controllers, backtesting, and optimization", + "8 - deploying best strategies from backtests", + "9 - conclusions and next steps" ] - # List of YouTube video links + # list of youtube video links video_links = [ - "https://www.youtube.com/embed/a-kenMqRB00", - "https://www.youtube.com/embed/AbezIhb6iJg", - "https://www.youtube.com/embed/VmlD_WQVe4M", - "https://www.youtube.com/embed/MPQTnlDXPno", - "https://www.youtube.com/embed/915E-C2LWdg", - "https://www.youtube.com/embed/bAi2ok7_boo", - "https://www.youtube.com/embed/BJf3ml-9JIQ", - "https://www.youtube.com/embed/ug_SSZb2HYE", + "https://www.youtube.com/embed/a-kenmqrb00", + "https://www.youtube.com/embed/abezihb6ijg", + "https://www.youtube.com/embed/vmld_wqve4m", + "https://www.youtube.com/embed/mpqtnldxpno", + "https://www.youtube.com/embed/915e-c2lwdg", + "https://www.youtube.com/embed/bai2ok7_boo", + "https://www.youtube.com/embed/bjf3ml-9jiq", + "https://www.youtube.com/embed/ug_sszb2hye", ] - - # Ensure the lists have the same length - assert len(video_titles) == len(video_links), "Mismatch between titles and links." - - # Create a carousel-like feature - video_selection = st.selectbox("Choose a video:", options=video_titles) - - # Get the index of the selected video title - selected_index = video_titles.index(video_selection) - - # Display the selected video - st.video(video_links[selected_index]) - - st.write("---") - - st.header("Feedback and Issues") - - st.write("Please give us feedback in the **#dashboard** channel of the [Hummingbot Discord](https://discord.gg/hummingbot)! ๐Ÿ™") - - st.write("If you encounter any bugs or have suggestions for improvement, please create an issue in the [Hummingbot Dashboard Github](https://github.com/hummingbot/dashboard).") - - -if not AUTH_SYSTEM_ENABLED: - main_page() -else: - with open('credentials.yml') as file: - config = yaml.load(file, Loader=SafeLoader) - authenticator = stauth.Authenticate( - config['credentials'], - config['cookie']['name'], - config['cookie']['key'], - config['cookie']['expiry_days'], - config['pre-authorized'] - ) - authenticator.login() - if st.session_state["authentication_status"]: - authenticator.logout(location="sidebar") - st.sidebar.write(f'Welcome *{st.session_state["name"]}*') - main_page() - else: - show_pages([Page("main.py", "Hummingbot Dashboard", "๐Ÿ“Š"),]) - if st.session_state["authentication_status"] is False: - st.error('Username/password is incorrect') - elif st.session_state["authentication_status"] is None: - st.warning('Please enter your username and password') \ No newline at end of file + # ensure the lists have the same length + assert len(video_titles) == len(video_links), "mismatch between titles and links." + with st.container(): + video_selection = st.selectbox("choose a video:", options=video_titles) + selected_index = video_titles.index(video_selection) + st.video(video_links[selected_index]) + st.write("---") + st.header("feedback and issues") + st.write("please give us feedback in the **#dashboard** channel of the [hummingbot discord](https://discord.gg/hummingbot)! ๐Ÿ™") + st.write("if you encounter any bugs or have suggestions for improvement, please create an issue in the [hummingbot dashboard github](https://github.com/hummingbot/dashboard).") + +auth_system() +main() From 51d24f5837c735f3f4b7ecb29308b43e9d06e4ac Mon Sep 17 00:00:00 2001 From: cardosofede Date: Mon, 8 Jul 2024 18:36:05 +0300 Subject: [PATCH 05/15] (feat) clean up imports --- frontend/pages/orchestration/instances/app.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/frontend/pages/orchestration/instances/app.py b/frontend/pages/orchestration/instances/app.py index e854da4f..d506e95b 100644 --- a/frontend/pages/orchestration/instances/app.py +++ b/frontend/pages/orchestration/instances/app.py @@ -4,10 +4,8 @@ from streamlit_elements import elements, mui from types import SimpleNamespace -from CONFIG import BACKEND_API_HOST, BACKEND_API_PORT from frontend.components.bot_performance_card import BotPerformanceCardV2 from frontend.components.dashboard import Dashboard -from backend.services.backend_api_client import BackendAPIClient from frontend.st_utils import initialize_st_page, get_backend_api_client # Constants for UI layout From 56fa94b18029a9f4e5fa6e51de034df990426ca1 Mon Sep 17 00:00:00 2001 From: cardosofede Date: Mon, 8 Jul 2024 18:36:23 +0300 Subject: [PATCH 06/15] (feat) add permission to manage public and private pages --- frontend/pages/permissions.py | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 frontend/pages/permissions.py diff --git a/frontend/pages/permissions.py b/frontend/pages/permissions.py new file mode 100644 index 00000000..d196a850 --- /dev/null +++ b/frontend/pages/permissions.py @@ -0,0 +1,34 @@ +from st_pages import Page, Section + + +def main_page(): + return [Page("main.py", "Hummingbot Dashboard", "๐Ÿ“Š"),] + + +def public_pages(): + return [ + Section("Config Generator", "๐ŸŽ›๏ธ"), + Page("frontend/pages/config/pmm_simple/app.py", "PMM Simple", "๐Ÿ‘จโ€๐Ÿซ"), + Page("frontend/pages/config/pmm_dynamic/app.py", "PMM Dynamic", "๐Ÿ‘ฉโ€๐Ÿซ"), + Page("frontend/pages/config/dman_maker_v2/app.py", "D-Man Maker V2", "๐Ÿค–"), + Page("frontend/pages/config/bollinger_v1/app.py", "Bollinger V1", "๐Ÿ“ˆ"), + Page("frontend/pages/config/macd_bb_v1/app.py", "MACD_BB V1", "๐Ÿ“Š"), + Page("frontend/pages/config/supertrend_v1/app.py", "SuperTrend V1", "๐Ÿ‘จโ€๐Ÿ”ฌ"), + Page("frontend/pages/config/xemm_controller/app.py", "XEMM Controller", "โšก๏ธ"), + Section("Data", "๐Ÿ’พ"), + Page("frontend/pages/data/download_candles/app.py", "Download Candles", "๐Ÿ’น"), + Section("Community Pages", "๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ฆ"), + Page("frontend/pages/data/token_spreads/app.py", "Token Spreads", "๐Ÿง™"), + Page("frontend/pages/data/tvl_vs_mcap/app.py", "TVL vs Market Cap", "๐Ÿฆ‰"), + ] + + +def private_pages(): + return [ + Section("Bot Orchestration", "๐Ÿ™"), + Page("frontend/pages/orchestration/instances/app.py", "Instances", "๐Ÿฆ…"), + Page("frontend/pages/orchestration/launch_bot_v2/app.py", "Deploy V2", "๐Ÿš€"), + Page("frontend/pages/orchestration/credentials/app.py", "Credentials", "๐Ÿ”‘"), + Page("frontend/pages/orchestration/portfolio/app.py", "Portfolio", "๐Ÿ’ฐ"), + + ] From 6e3b025301c6269035574f63978e27125369555f Mon Sep 17 00:00:00 2001 From: cardosofede Date: Mon, 8 Jul 2024 18:36:45 +0300 Subject: [PATCH 07/15] (feat) add auth function that can be reused --- frontend/st_utils.py | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/frontend/st_utils.py b/frontend/st_utils.py index 6336e334..2706248a 100644 --- a/frontend/st_utils.py +++ b/frontend/st_utils.py @@ -1,11 +1,17 @@ import os.path +import streamlit_authenticator as stauth import pandas as pd from pathlib import Path import inspect import streamlit as st -from st_pages import add_page_title +import yaml +from st_pages import add_page_title, show_pages +from yaml import SafeLoader + +from CONFIG import AUTH_SYSTEM_ENABLED +from frontend.pages.permissions import main_page, private_pages, public_pages def initialize_st_page(title: str, icon: str, layout="wide", initial_sidebar_state="expanded"): @@ -81,3 +87,32 @@ def get_backend_api_client(): st.error("Docker is not running. Please make sure Docker is running.") st.stop() return backend_api_client + + +def auth_system(): + if not AUTH_SYSTEM_ENABLED: + show_pages(main_page() + private_pages() + public_pages()) + else: + with open('credentials.yml') as file: + config = yaml.load(file, Loader=SafeLoader) + if "authenticator" not in st.session_state: + st.session_state.authenticator = stauth.Authenticate( + config['credentials'], + config['cookie']['name'], + config['cookie']['key'], + config['cookie']['expiry_days'], + config['pre-authorized'] + ) + st.session_state.authenticator.login() + if st.session_state["authentication_status"]: + st.session_state.authenticator.logout(location="sidebar") + st.sidebar.write(f'Welcome *{st.session_state["name"]}*') + show_pages(main_page() + private_pages() + public_pages()) + + else: + show_pages(main_page() + public_pages()) + st.session_state.authenticator.login() + if st.session_state["authentication_status"] is False: + st.error('Username/password is incorrect') + elif st.session_state["authentication_status"] is None: + st.warning('Please enter your username and password') From 41d55f8933e245186af62dc2b1e065fd1cc08421 Mon Sep 17 00:00:00 2001 From: cardosofede Date: Mon, 8 Jul 2024 18:36:59 +0300 Subject: [PATCH 08/15] (feat) revert pre-authorized --- credentials.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/credentials.yml b/credentials.yml index 78fcbd71..acd1eae3 100644 --- a/credentials.yml +++ b/credentials.yml @@ -8,4 +8,7 @@ credentials: cookie: expiry_days: 30 key: some_signature_key # Must be string - name: some_cookie_name # Must be string \ No newline at end of file + name: some_cookie_name +pre-authorized: + emails: + - admin@admin.com From 3c3ee37bef617ebf03f736d2056ca704e7538849 Mon Sep 17 00:00:00 2001 From: cardosofede Date: Tue, 9 Jul 2024 16:22:21 +0300 Subject: [PATCH 09/15] (feat) format CONFIG and make auth env --- CONFIG.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/CONFIG.py b/CONFIG.py index 527f29b1..5a774d50 100644 --- a/CONFIG.py +++ b/CONFIG.py @@ -2,12 +2,11 @@ from dotenv import load_dotenv - load_dotenv() MINER_COINS = ["Algorand", "Avalanche", "DAO Maker", "Faith Tribe", "Fear", "Frontier", - "Harmony", "Hot Cross", "HUMAN Protocol", "Oddz", "Shera", "Firo", - "Vesper Finance", "Youclout", "Nimiq"] + "Harmony", "Hot Cross", "HUMAN Protocol", "Oddz", "Shera", "Firo", + "Vesper Finance", "Youclout", "Nimiq"] MINER_EXCHANGES = ["Binance", "FTX", "Coinbase Exchange", "Huobi Global", "OKX", "KuCoin", "Kraken", "Bybit (Spot)", "FTX.US", "Crypto.com Exchange", "Binance US", "MEXC Global", "Gate.io", "BitMart", "Bitfinex", "AscendEX (BitMax)", @@ -18,7 +17,7 @@ CERTIFIED_EXCHANGES = ["ascendex", "binance", "bybit", "gate.io", "hitbtc", "huobi", "kucoin", "okx", "gateway"] CERTIFIED_STRATEGIES = ["xemm", "cross exchange market making", "pmm", "pure market making"] -AUTH_SYSTEM_ENABLED = False +AUTH_SYSTEM_ENABLED = os.getenv("AUTH_SYSTEM_ENABLED", False) BACKEND_API_HOST = os.getenv("BACKEND_API_HOST", "127.0.0.1") BACKEND_API_PORT = os.getenv("BACKEND_API_PORT", 8000) From eb64ca6f46da86b76c80e07036e7517aec7b74c1 Mon Sep 17 00:00:00 2001 From: cardosofede Date: Tue, 9 Jul 2024 16:45:28 +0300 Subject: [PATCH 10/15] (feat) update main.py with new video --- main.py | 44 ++++++++------------------------------------ 1 file changed, 8 insertions(+), 36 deletions(-) diff --git a/main.py b/main.py index ef1159b7..66d0ad72 100644 --- a/main.py +++ b/main.py @@ -5,45 +5,17 @@ def main(): # readme section with st.container(): - st.markdown("# ๐Ÿ“Š hummingbot dashboard") + st.markdown("# ๐Ÿ“Š Hummingbot Dashboard") st.markdown(""" - hummingbot dashboard is an open source application that helps you create, backtest, and optimize various - types of algo trading strategies. afterwards, you can deploy them as [hummingbot](http://hummingbot.org) + Hummingbot Dashboard is an open source application that helps you create, backtest, and optimize various + types of algo trading strategies. afterwards, you can deploy them as [Hummingbot](http://hummingbot.org) instances in either paper or live trading mode.""") st.write("---") - st.header("Getting started") - st.write("watch the [hummingbot dashboard tutorial playlist](https://www.youtube.com/watch?v=a-kenmqrb00) to get started!") - video_titles = [ - "1 - introduction to dashboard", - "2 - setting up the environment", - "3 - managing credentials", - "4 - using the master bot profile", - "5 - deploying bots and running strategies", - "7 - controllers, backtesting, and optimization", - "8 - deploying best strategies from backtests", - "9 - conclusions and next steps" - ] - # list of youtube video links - video_links = [ - "https://www.youtube.com/embed/a-kenmqrb00", - "https://www.youtube.com/embed/abezihb6ijg", - "https://www.youtube.com/embed/vmld_wqve4m", - "https://www.youtube.com/embed/mpqtnldxpno", - "https://www.youtube.com/embed/915e-c2lwdg", - "https://www.youtube.com/embed/bai2ok7_boo", - "https://www.youtube.com/embed/bjf3ml-9jiq", - "https://www.youtube.com/embed/ug_sszb2hye", - ] - # ensure the lists have the same length - assert len(video_titles) == len(video_links), "mismatch between titles and links." - with st.container(): - video_selection = st.selectbox("choose a video:", options=video_titles) - selected_index = video_titles.index(video_selection) - st.video(video_links[selected_index]) - st.write("---") - st.header("feedback and issues") - st.write("please give us feedback in the **#dashboard** channel of the [hummingbot discord](https://discord.gg/hummingbot)! ๐Ÿ™") - st.write("if you encounter any bugs or have suggestions for improvement, please create an issue in the [hummingbot dashboard github](https://github.com/hummingbot/dashboard).") + st.header("Watch the Hummingbot Dashboard Tutorial!") + st.video("https://youtu.be/7eHiMPRBQLQ?si=PAvCq0D5QDZz1h1D") + st.header("Feedback and issues") + st.write("Please give us feedback in the **#dashboard** channel of the [hummingbot discord](https://discord.gg/hummingbot)! ๐Ÿ™") + st.write("If you encounter any bugs or have suggestions for improvement, please create an issue in the [hummingbot dashboard github](https://github.com/hummingbot/dashboard).") auth_system() main() From edcad77039df3fc64de220e239691f2d2c4857a3 Mon Sep 17 00:00:00 2001 From: cardosofede Date: Tue, 9 Jul 2024 16:49:08 +0300 Subject: [PATCH 11/15] (feat) update container text --- main.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index 66d0ad72..1313baa0 100644 --- a/main.py +++ b/main.py @@ -7,9 +7,8 @@ def main(): with st.container(): st.markdown("# ๐Ÿ“Š Hummingbot Dashboard") st.markdown(""" - Hummingbot Dashboard is an open source application that helps you create, backtest, and optimize various - types of algo trading strategies. afterwards, you can deploy them as [Hummingbot](http://hummingbot.org) - instances in either paper or live trading mode.""") + Hummingbot Dashboard is an open source application that helps you create, backtest, and optimize various types + of algo trading strategies. Afterwards, you can deploy them as [Hummingbot](http://hummingbot.org)""") st.write("---") st.header("Watch the Hummingbot Dashboard Tutorial!") st.video("https://youtu.be/7eHiMPRBQLQ?si=PAvCq0D5QDZz1h1D") From bcac0366eb4b43a6649f7d40b7883400311356a3 Mon Sep 17 00:00:00 2001 From: cardosofede Date: Tue, 9 Jul 2024 16:50:36 +0300 Subject: [PATCH 12/15] (feat) remove container --- main.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/main.py b/main.py index 1313baa0..dfea0e38 100644 --- a/main.py +++ b/main.py @@ -4,11 +4,9 @@ def main(): # readme section - with st.container(): - st.markdown("# ๐Ÿ“Š Hummingbot Dashboard") - st.markdown(""" - Hummingbot Dashboard is an open source application that helps you create, backtest, and optimize various types - of algo trading strategies. Afterwards, you can deploy them as [Hummingbot](http://hummingbot.org)""") + st.markdown("# ๐Ÿ“Š Hummingbot Dashboard") + st.markdown("""Hummingbot Dashboard is an open source application that helps you create, backtest, and optimize + various types of algo trading strategies. Afterwards, you can deploy them as [Hummingbot](http://hummingbot.org)""") st.write("---") st.header("Watch the Hummingbot Dashboard Tutorial!") st.video("https://youtu.be/7eHiMPRBQLQ?si=PAvCq0D5QDZz1h1D") From 9beb1d6bf821a4eec8635bc4c03de1e73e8d80fd Mon Sep 17 00:00:00 2001 From: cardosofede Date: Tue, 9 Jul 2024 17:29:48 +0300 Subject: [PATCH 13/15] (feat) add space to improve formatting --- main.py | 1 + 1 file changed, 1 insertion(+) diff --git a/main.py b/main.py index dfea0e38..5f8a5367 100644 --- a/main.py +++ b/main.py @@ -14,5 +14,6 @@ def main(): st.write("Please give us feedback in the **#dashboard** channel of the [hummingbot discord](https://discord.gg/hummingbot)! ๐Ÿ™") st.write("If you encounter any bugs or have suggestions for improvement, please create an issue in the [hummingbot dashboard github](https://github.com/hummingbot/dashboard).") + auth_system() main() From 256e193f16d0124447743036aa371bdd9a6c3ffb Mon Sep 17 00:00:00 2001 From: cardosofede Date: Tue, 9 Jul 2024 18:53:41 +0300 Subject: [PATCH 14/15] (feat) remove unnecessary space --- frontend/pages/permissions.py | 1 - 1 file changed, 1 deletion(-) diff --git a/frontend/pages/permissions.py b/frontend/pages/permissions.py index d196a850..2c4b2a1e 100644 --- a/frontend/pages/permissions.py +++ b/frontend/pages/permissions.py @@ -30,5 +30,4 @@ def private_pages(): Page("frontend/pages/orchestration/launch_bot_v2/app.py", "Deploy V2", "๐Ÿš€"), Page("frontend/pages/orchestration/credentials/app.py", "Credentials", "๐Ÿ”‘"), Page("frontend/pages/orchestration/portfolio/app.py", "Portfolio", "๐Ÿ’ฐ"), - ] From 61f4c576bbfed6ebd9e2095cf6b2fd320757b27f Mon Sep 17 00:00:00 2001 From: cardosofede Date: Thu, 11 Jul 2024 18:13:07 +0300 Subject: [PATCH 15/15] (feat) remove unnecessary imports --- frontend/pages/orchestration/credentials/app.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/frontend/pages/orchestration/credentials/app.py b/frontend/pages/orchestration/credentials/app.py index 666f0545..dae5b3c3 100644 --- a/frontend/pages/orchestration/credentials/app.py +++ b/frontend/pages/orchestration/credentials/app.py @@ -1,9 +1,6 @@ -from CONFIG import BACKEND_API_HOST, BACKEND_API_PORT -from backend.services.backend_api_client import BackendAPIClient from frontend.st_utils import initialize_st_page, get_backend_api_client import streamlit as st - initialize_st_page(title="Credentials", icon="๐Ÿ”‘") # Page content