mirror of
https://github.com/d0zingcat/deploy.git
synced 2026-06-08 15:10:57 +00:00
@@ -290,26 +290,26 @@ def render_bot_card(bot_name):
|
|||||||
error_df = pd.DataFrame(error_controllers)
|
error_df = pd.DataFrame(error_controllers)
|
||||||
st.dataframe(error_df, use_container_width=True, hide_index=True)
|
st.dataframe(error_df, use_container_width=True, hide_index=True)
|
||||||
|
|
||||||
# Logs sections
|
# Logs sections (available for both running and stopped bots)
|
||||||
with st.expander("📋 Error Logs"):
|
with st.expander("📋 Error Logs"):
|
||||||
if error_logs:
|
if error_logs:
|
||||||
for log in error_logs[:50]:
|
for log in error_logs[:50]:
|
||||||
timestamp = log.get("timestamp", "")
|
timestamp = log.get("timestamp", "")
|
||||||
message = log.get("msg", "")
|
message = log.get("msg", "")
|
||||||
logger_name = log.get("logger_name", "")
|
logger_name = log.get("logger_name", "")
|
||||||
st.text(f"{timestamp} - {logger_name}: {message}")
|
st.text(f"{timestamp} - {logger_name}: {message}")
|
||||||
else:
|
else:
|
||||||
st.info("No error logs available.")
|
st.info("No error logs available.")
|
||||||
|
|
||||||
with st.expander("📝 General Logs"):
|
with st.expander("📝 General Logs"):
|
||||||
if general_logs:
|
if general_logs:
|
||||||
for log in general_logs[:50]:
|
for log in general_logs[:50]:
|
||||||
timestamp = pd.to_datetime(int(log.get("timestamp", 0)), unit="s")
|
timestamp = pd.to_datetime(int(log.get("timestamp", 0)), unit="s")
|
||||||
message = log.get("msg", "")
|
message = log.get("msg", "")
|
||||||
logger_name = log.get("logger_name", "")
|
logger_name = log.get("logger_name", "")
|
||||||
st.text(f"{timestamp} - {logger_name}: {message}")
|
st.text(f"{timestamp} - {logger_name}: {message}")
|
||||||
else:
|
else:
|
||||||
st.info("No general logs available.")
|
st.info("No general logs available.")
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
with st.container(border=True):
|
with st.container(border=True):
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ def launch_new_bot(bot_name, image_name, credentials, selected_controllers, max_
|
|||||||
deploy_config = {
|
deploy_config = {
|
||||||
"instance_name": full_bot_name,
|
"instance_name": full_bot_name,
|
||||||
"credentials_profile": credentials,
|
"credentials_profile": credentials,
|
||||||
"controllers_config": [config.replace(".yml", "") for config in selected_controllers],
|
"controllers_config": selected_controllers,
|
||||||
"image": image_name,
|
"image": image_name,
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -204,7 +204,12 @@ with st.container(border=True):
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
# Handle both old and new config format
|
# 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
|
config_data = config.get("config", config) # New format has config nested
|
||||||
|
|
||||||
connector_name = config_data.get("connector_name", "Unknown")
|
connector_name = config_data.get("connector_name", "Unknown")
|
||||||
|
|||||||
Reference in New Issue
Block a user