move prefect badge from masthead to footer
This commit is contained in:
parent
8bb186269b
commit
03309e28a6
@ -719,10 +719,12 @@ def _scan_metrics() -> List[Dict[str, Any]]:
|
|||||||
|
|
||||||
@app.get("/metrics", response_class=HTMLResponse)
|
@app.get("/metrics", response_class=HTMLResponse)
|
||||||
async def metrics_page(request: Request) -> HTMLResponse:
|
async def metrics_page(request: Request) -> HTMLResponse:
|
||||||
|
async with httpx.AsyncClient(timeout=5.0) as client:
|
||||||
|
dep_id = await PREFECT.deployment_id(client)
|
||||||
return templates.TemplateResponse(
|
return templates.TemplateResponse(
|
||||||
request,
|
request,
|
||||||
"metrics.html",
|
"metrics.html",
|
||||||
{"prefect_api": PREFECT_API},
|
{"prefect_api": PREFECT_API, "deployment_id": dep_id},
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -572,6 +572,14 @@ button.submit:disabled { background: var(--faint); border-color: var(--faint); c
|
|||||||
border-top: 1px solid var(--rule);
|
border-top: 1px solid var(--rule);
|
||||||
}
|
}
|
||||||
.colophon span.k { color: var(--mute); }
|
.colophon span.k { color: var(--mute); }
|
||||||
|
.colophon .prefect-badge { display: inline-flex; align-items: center; gap: 4px; }
|
||||||
|
.colophon .prefect-badge .dot {
|
||||||
|
display: inline-block;
|
||||||
|
width: 6px; height: 6px;
|
||||||
|
border-radius: 50%;
|
||||||
|
background: var(--good);
|
||||||
|
}
|
||||||
|
.colophon .prefect-badge .dot.bad { background: var(--alarm); }
|
||||||
|
|
||||||
/* subtle htmx indicator */
|
/* subtle htmx indicator */
|
||||||
.htmx-indicator {
|
.htmx-indicator {
|
||||||
@ -655,6 +663,8 @@ button.submit:disabled { background: var(--faint); border-color: var(--faint); c
|
|||||||
.dataset-picker[open] .picker-toggle::before { content: "[ collapse ]"; color: var(--accent); }
|
.dataset-picker[open] .picker-toggle::before { content: "[ collapse ]"; color: var(--accent); }
|
||||||
.dataset-picker.intro .picker-toggle::before { content: "[ read ]"; }
|
.dataset-picker.intro .picker-toggle::before { content: "[ read ]"; }
|
||||||
.dataset-picker.intro[open] .picker-toggle::before { content: "[ collapse ]"; color: var(--accent); }
|
.dataset-picker.intro[open] .picker-toggle::before { content: "[ collapse ]"; color: var(--accent); }
|
||||||
|
.dataset-picker.metrics-inline .picker-toggle::before { content: "[ expand ]"; }
|
||||||
|
.dataset-picker.metrics-inline[open] .picker-toggle::before { content: "[ collapse ]"; color: var(--accent); }
|
||||||
|
|
||||||
.intro-body {
|
.intro-body {
|
||||||
display: grid;
|
display: grid;
|
||||||
@ -1345,7 +1355,8 @@ button.submit:disabled { background: var(--faint); border-color: var(--faint); c
|
|||||||
max-width: 30ch;
|
max-width: 30ch;
|
||||||
}
|
}
|
||||||
|
|
||||||
.metrics-page .empty {
|
.metrics-page .empty,
|
||||||
|
.metrics-inline .empty {
|
||||||
border: 1px dashed var(--rule-2);
|
border: 1px dashed var(--rule-2);
|
||||||
padding: 1.4rem;
|
padding: 1.4rem;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<meta name="viewport" content="width=device-width,initial-scale=1" />
|
<meta name="viewport" content="width=device-width,initial-scale=1" />
|
||||||
<title>embedding notebook — web1</title>
|
<title>embedding notebook — web1</title>
|
||||||
<link rel="stylesheet" href="/static/style.css?v=12" />
|
<link rel="stylesheet" href="/static/style.css?v=13" />
|
||||||
<script src="https://unpkg.com/htmx.org@2.0.4"></script>
|
<script src="https://unpkg.com/htmx.org@2.0.4"></script>
|
||||||
<script type="importmap">
|
<script type="importmap">
|
||||||
{
|
{
|
||||||
@ -30,8 +30,6 @@
|
|||||||
<h1 class="title">embedding notebook <em>— drift & projection</em></h1>
|
<h1 class="title">embedding notebook <em>— drift & projection</em></h1>
|
||||||
</div>
|
</div>
|
||||||
<div class="meta">
|
<div class="meta">
|
||||||
<span class="dot {% if not deployment_id %}bad{% endif %}"></span>
|
|
||||||
{% if deployment_id %}prefect · ver {{ deployment_id[:8] }}{% else %}prefect · unreachable{% endif %}
|
|
||||||
<a href="#metrics" class="nav-link">metrics ↓</a>
|
<a href="#metrics" class="nav-link">metrics ↓</a>
|
||||||
<button type="button" class="theme-toggle" id="theme-toggle" aria-label="toggle theme">◐</button>
|
<button type="button" class="theme-toggle" id="theme-toggle" aria-label="toggle theme">◐</button>
|
||||||
</div>
|
</div>
|
||||||
@ -393,6 +391,10 @@
|
|||||||
|
|
||||||
<footer class="colophon">
|
<footer class="colophon">
|
||||||
<span>© 2026 Mind the Math LLC</span>
|
<span>© 2026 Mind the Math LLC</span>
|
||||||
|
<span class="prefect-badge">
|
||||||
|
<span class="dot {% if not deployment_id %}bad{% endif %}"></span>
|
||||||
|
{% if deployment_id %}prefect · {{ deployment_id[:8] }}{% else %}prefect · unreachable{% endif %}
|
||||||
|
</span>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
<script src="/static/theme.js?v=11"></script>
|
<script src="/static/theme.js?v=11"></script>
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<meta name="viewport" content="width=device-width,initial-scale=1" />
|
<meta name="viewport" content="width=device-width,initial-scale=1" />
|
||||||
<title>metrics — embedding notebook</title>
|
<title>metrics — embedding notebook</title>
|
||||||
<link rel="stylesheet" href="/static/style.css?v=5" />
|
<link rel="stylesheet" href="/static/style.css?v=13" />
|
||||||
<link rel="icon" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='3' fill='%231f4e5f'/%3E%3C/svg%3E" />
|
<link rel="icon" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='3' fill='%231f4e5f'/%3E%3C/svg%3E" />
|
||||||
<script>
|
<script>
|
||||||
(function(){try{
|
(function(){try{
|
||||||
@ -90,6 +90,10 @@
|
|||||||
|
|
||||||
<footer class="colophon">
|
<footer class="colophon">
|
||||||
<span>© 2026 Mind the Math LLC</span>
|
<span>© 2026 Mind the Math LLC</span>
|
||||||
|
<span class="prefect-badge">
|
||||||
|
<span class="dot {% if not deployment_id %}bad{% endif %}"></span>
|
||||||
|
{% if deployment_id %}prefect · {{ deployment_id[:8] }}{% else %}prefect · unreachable{% endif %}
|
||||||
|
</span>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
<script src="/static/theme.js?v=5"></script>
|
<script src="/static/theme.js?v=5"></script>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user