diff --git a/apps/gittensory-miner-ui/README.md b/apps/gittensory-miner-ui/README.md index a0ce711092..893c586246 100644 --- a/apps/gittensory-miner-ui/README.md +++ b/apps/gittensory-miner-ui/README.md @@ -9,3 +9,9 @@ The miner package invariant is client-side only with no required phone-home to b local miner CLI can serve later — not a Wrangler deploy target. Phase 6 data views (run history, portfolio cards) land in follow-up issues after this empty shell. + +## Configuration + +| Env var | Required | Description | +| --------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `VITE_MINER_UI_GRAFANA_URL` | No | If set (and non-empty), renders a footer link to your ORB/Grafana dashboard at this URL. Unset ⇒ no link. Must be `VITE_`-prefixed so Vite exposes it to the client bundle. It is a plain navigational link — no token or credential is ever appended. | diff --git a/apps/gittensory-miner-ui/src/components/grafana-footer-link.tsx b/apps/gittensory-miner-ui/src/components/grafana-footer-link.tsx new file mode 100644 index 0000000000..d99ed3249a --- /dev/null +++ b/apps/gittensory-miner-ui/src/components/grafana-footer-link.tsx @@ -0,0 +1,23 @@ +// Optional footer link to an operator's ORB/Grafana dashboard (#5194). Rendered only when the operator sets +// VITE_MINER_UI_GRAFANA_URL (Vite exposes only VITE_-prefixed vars to the client bundle; a bare name would be +// undefined at build time). The URL is a plain navigational link — no auth/session token or credential is ever +// appended, and it is rendered as a normal href attribute (React escapes it, so a misconfigured value cannot +// inject markup). Renders nothing when the var is unset or empty. +export function GrafanaFooterLink() { + const url = import.meta.env.VITE_MINER_UI_GRAFANA_URL; + // Own the whole