small fixes

This commit is contained in:
2024-12-31 15:22:28 +01:00
parent 8c3500b787
commit a2993aaa0c
2 changed files with 18 additions and 17 deletions
+17 -16
View File
@@ -101,10 +101,8 @@ def render_status(job_data: dict, app_config: dict):
st.markdown(f"{details}")
st.markdown(f"Started: {start_time if start_time is not None else 'N/A'}")
st.markdown(f"Time remaining: {time_remaining if time_remaining is not None else 'N/A'}")
else:
st.markdown("Pending")
st.markdown("Error")
def render_task_list(container, app_config: dict):
@@ -121,6 +119,7 @@ def render_task_list(container, app_config: dict):
st.subheader('Task List')
st.write("Here you can see the status of your tasks, view the results, and delete tasks.")
column_config = [
{
"name": "Name",
@@ -144,21 +143,23 @@ def render_task_list(container, app_config: dict):
key=f"delete_{x['name']}")
}
]
list_container = st.container(border=True)
if len(existing_jobs) == 0:
st.write("No tasks available.")
else:
# display header
cols = st.columns(len(column_config))
for i, col in enumerate(column_config):
with cols[i]:
st.write(col["name"])
for i, job in enumerate(existing_jobs):
with list_container.container():
if len(existing_jobs) == 0:
st.write("No tasks available.")
else:
# display header
cols = st.columns(len(column_config))
for j, col in enumerate(column_config):
with cols[j]:
col["render_func"](job)
st.divider()
for i, col in enumerate(column_config):
with cols[i]:
st.write(col["name"])
for i, job in enumerate(existing_jobs):
cols = st.columns(len(column_config))
for j, col in enumerate(column_config):
with cols[j]:
col["render_func"](job)
st.divider()
def update_job_list():
nonlocal existing_jobs
+1 -1
View File
@@ -71,7 +71,7 @@ if authentication_status is True:
render_home(content_wrapper, config, authenticator if authentication_enabled else None)
else:
# make sure to remove cookie
print("rendering login...")
st.markdown("Please login. If no login form is shown, please refresh the page.")
render_login()