diff --git a/pages/orchestration/instances/app.py b/pages/orchestration/instances/app.py index 4b80d3a..d5d3eed 100644 --- a/pages/orchestration/instances/app.py +++ b/pages/orchestration/instances/app.py @@ -290,26 +290,26 @@ def render_bot_card(bot_name): error_df = pd.DataFrame(error_controllers) st.dataframe(error_df, use_container_width=True, hide_index=True) - # Logs sections - with st.expander("📋 Error Logs"): - if error_logs: - for log in error_logs[:50]: - timestamp = log.get("timestamp", "") - message = log.get("msg", "") - logger_name = log.get("logger_name", "") - st.text(f"{timestamp} - {logger_name}: {message}") - else: - st.info("No error logs available.") + # Logs sections (available for both running and stopped bots) + with st.expander("📋 Error Logs"): + if error_logs: + for log in error_logs[:50]: + timestamp = log.get("timestamp", "") + message = log.get("msg", "") + logger_name = log.get("logger_name", "") + st.text(f"{timestamp} - {logger_name}: {message}") + else: + st.info("No error logs available.") - with st.expander("📝 General Logs"): - if general_logs: - for log in general_logs[:50]: - timestamp = pd.to_datetime(int(log.get("timestamp", 0)), unit="s") - message = log.get("msg", "") - logger_name = log.get("logger_name", "") - st.text(f"{timestamp} - {logger_name}: {message}") - else: - st.info("No general logs available.") + with st.expander("📝 General Logs"): + if general_logs: + for log in general_logs[:50]: + timestamp = pd.to_datetime(int(log.get("timestamp", 0)), unit="s") + message = log.get("msg", "") + logger_name = log.get("logger_name", "") + st.text(f"{timestamp} - {logger_name}: {message}") + else: + st.info("No general logs available.") except Exception as e: with st.container(border=True): diff --git a/pages/orchestration/launch_bot_v2/app.py b/pages/orchestration/launch_bot_v2/app.py index dd15d3d..286fce3 100644 --- a/pages/orchestration/launch_bot_v2/app.py +++ b/pages/orchestration/launch_bot_v2/app.py @@ -58,7 +58,7 @@ def launch_new_bot(bot_name, image_name, credentials, selected_controllers, max_ deploy_config = { "instance_name": full_bot_name, "credentials_profile": credentials, - "controllers_config": [config.replace(".yml", "") for config in selected_controllers], + "controllers_config": selected_controllers, "image": image_name, } @@ -204,7 +204,12 @@ with st.container(border=True): continue # Handle both old and new config format - config_name = config.get("config_name", config.get("id", "Unknown")) + config_name = config.get("id") + if not config_name: + # Skip configs without an ID + st.warning(f"Config missing 'id' field: {config}") + continue + config_data = config.get("config", config) # New format has config nested connector_name = config_data.get("connector_name", "Unknown")