Skip to content

Commit 2dbed2c

Browse files
committed
cleaning up a few dashboard things.
1 parent 8bf69ec commit 2dbed2c

4 files changed

Lines changed: 130 additions & 66 deletions

File tree

src/ursa_dashboard/app.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4911,6 +4911,15 @@ async def ui_dashboard() -> HTMLResponse:
49114911

49124912
logo_img_style = "" if str(logo_img_src).strip() else "display:none"
49134913

4914+
environment_runs_button = ""
4915+
with contextlib.suppress(Exception):
4916+
if list_environment_run_manifests(dashboard_group):
4917+
environment_runs_button = (
4918+
'<button class="btn" type="button" '
4919+
"onclick=\"window.location.href='/ui/environment-runs'\">"
4920+
"Environment Runs</button>"
4921+
)
4922+
49144923
body = f"""
49154924
<div class="app">
49164925
<div class="sidebar" id="leftPanel">
@@ -4930,7 +4939,7 @@ async def ui_dashboard() -> HTMLResponse:
49304939
<button class="btn" id="toggleLogsBtn" type="button">Hide logs</button>
49314940
<button class="btn" id="toggleArtifactsBtn" type="button">Hide artifacts</button>
49324941
<button class="btn" id="openSettingsBtn" type="button">Settings</button>
4933-
<button class="btn" type="button" onclick="window.location.href='/ui/environment-runs'">Environment Runs</button>
4942+
{environment_runs_button}
49344943
</div>
49354944
</div>
49364945

0 commit comments

Comments
 (0)