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"{details}")
st.markdown(f"Started: {start_time if start_time is not None else 'N/A'}") 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'}") st.markdown(f"Time remaining: {time_remaining if time_remaining is not None else 'N/A'}")
else: else:
st.markdown("Pending") st.markdown("Error")
def render_task_list(container, app_config: dict): 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.subheader('Task List')
st.write("Here you can see the status of your tasks, view the results, and delete tasks.") st.write("Here you can see the status of your tasks, view the results, and delete tasks.")
column_config = [ column_config = [
{ {
"name": "Name", "name": "Name",
@@ -144,21 +143,23 @@ def render_task_list(container, app_config: dict):
key=f"delete_{x['name']}") key=f"delete_{x['name']}")
} }
] ]
list_container = st.container(border=True)
if len(existing_jobs) == 0: with list_container.container():
st.write("No tasks available.") if len(existing_jobs) == 0:
else: st.write("No tasks available.")
# display header else:
cols = st.columns(len(column_config)) # display header
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)) cols = st.columns(len(column_config))
for j, col in enumerate(column_config): for i, col in enumerate(column_config):
with cols[j]: with cols[i]:
col["render_func"](job) st.write(col["name"])
st.divider() 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(): def update_job_list():
nonlocal existing_jobs 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) render_home(content_wrapper, config, authenticator if authentication_enabled else None)
else: else:
# make sure to remove cookie # make sure to remove cookie
print("rendering login...") st.markdown("Please login. If no login form is shown, please refresh the page.")
render_login() render_login()