Link Temporal UI from ops console; propose SSO access WP-0025
Add nav/deep link to Temporal Web UI (configurable URL, default 127.0.0.1:8080 for port-forward). Document dual port-forward and draft ACTIVITY-WP-0025 for Keycloak SSO ingress without port-forward.
This commit is contained in:
parent
6c34e2c1f1
commit
7761acf86a
4 changed files with 283 additions and 3 deletions
|
|
@ -247,6 +247,7 @@ async def auth_status() -> dict[str, Any]:
|
|||
"operator_token_configured": operator_token_configured(),
|
||||
"mutation_header": HEADER_NAME,
|
||||
"mutations_require_token": operator_token_configured() or not allow,
|
||||
"temporal_ui_url": temporal_ui_url(),
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -256,6 +257,7 @@ _CSS = """
|
|||
:root { font-family: system-ui, sans-serif; color: #1a1a1a; }
|
||||
body { margin: 1.5rem; max-width: 1100px; }
|
||||
nav a { margin-right: 1rem; }
|
||||
nav a.external::after { content: " ↗"; font-size: 0.75em; opacity: 0.7; }
|
||||
table { border-collapse: collapse; width: 100%; margin: 1rem 0; }
|
||||
th, td { border: 1px solid #ccc; padding: 0.4rem 0.6rem; text-align: left; font-size: 0.9rem; }
|
||||
th { background: #f4f4f4; }
|
||||
|
|
@ -268,7 +270,22 @@ pre { background: #f8f8f8; padding: 0.75rem; overflow: auto; font-size: 0.8rem;
|
|||
"""
|
||||
|
||||
|
||||
def temporal_ui_url() -> str:
|
||||
"""Browser URL for Temporal Web UI (port-forward or future SSO ingress).
|
||||
|
||||
Override with ACTIVITY_CORE_TEMPORAL_UI_URL. Default assumes a local
|
||||
port-forward of actcore-temporal-ui to 127.0.0.1:8080 (see runbook).
|
||||
"""
|
||||
raw = (
|
||||
os.environ.get("ACTIVITY_CORE_TEMPORAL_UI_URL")
|
||||
or os.environ.get("TEMPORAL_UI_URL")
|
||||
or "http://127.0.0.1:8080"
|
||||
).strip()
|
||||
return raw.rstrip("/") or "http://127.0.0.1:8080"
|
||||
|
||||
|
||||
def _page(title: str, body: str) -> HTMLResponse:
|
||||
temporal_href = html.escape(temporal_ui_url(), quote=True)
|
||||
doc = f"""<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
|
|
@ -281,6 +298,8 @@ def _page(title: str, body: str) -> HTMLResponse:
|
|||
<strong>activity-core ops</strong>
|
||||
<a href="/ops/ui">Inventory</a>
|
||||
<a href="/ops/ui/status?since=sunday">Status</a>
|
||||
<a class="external" href="{temporal_href}" target="_blank" rel="noopener noreferrer"
|
||||
title="Temporal Web UI — port-forward actcore-temporal-ui :8080 until SSO ingress">Temporal UI</a>
|
||||
<a href="/ops/auth/status">Auth JSON</a>
|
||||
</nav>
|
||||
<hr/>
|
||||
|
|
@ -373,6 +392,11 @@ async def ui_index() -> HTMLResponse:
|
|||
<tbody>{''.join(rows) or '<tr><td colspan="6">No automations found</td></tr>'}</tbody>
|
||||
</table>
|
||||
<p class="muted">Schedule cron is read-only in MVP — edit definition files + sync.</p>
|
||||
<p class="muted">Temporal Web UI (workflow debugger):
|
||||
<a class="external" href="{html.escape(temporal_ui_url(), quote=True)}"
|
||||
target="_blank" rel="noopener noreferrer">{html.escape(temporal_ui_url())}</a>
|
||||
— requires port-forward of <code>svc/actcore-temporal-ui 8080:8080</code>
|
||||
until SSO ingress (ACTIVITY-WP-0025).</p>
|
||||
"""
|
||||
return _page("Inventory", body)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue