wu-sheng opened a new pull request, #80:
URL: https://github.com/apache/skywalking-horizon-ui/pull/80

   ## Why
   
   Three deployment/operability goals for restricted or standalone setups, plus 
two correctness fixes that fell out of them:
   
   - Run Horizon against an OAP whose **ui_template admin API is absent or 
disabled** — without it, today the config-template surface simply blocks.
   - Ship a **mount-free image**: only a handful of fields were 
env-overridable, so a real config had to be mounted/baked.
   - Make **Cluster Status tell the truth**: it reported whether a module's 
*selector* was on (config-presence), not whether the feature actually 
*responds* — so a loaded-but-broken or forked/renamed module read as a 
misleading green.
   
   ## What
   
   **1. `templates.mode: live | readonly`** (`HORIZON_TEMPLATES_MODE`). In 
`readonly` every dashboard / overview / alert-page / 3D-map / translation 
renders from the **local bundle** (presented as synthetic "remote" rows so all 
render consumers resolve unchanged), the ui_template API is never called, and 
the whole config surface is **read-only** — the BFF rejects writes even on a 
direct request (templates, overview-templates, **and** the alert page-setup). 
OAP's **query** API is still used + health-checked. Default stays `live`. The 
active mode shows in Cluster Status; the read-only banner is warning-yellow.
   
   **2. Env-native config — one committed `horizon.yaml`.** The 
`horizon.example.yaml` / local-copy split is gone: there is now a single 
committed, fully tokenized `horizon.yaml` (every field a `${HORIZON_…:default}` 
var) that the image bakes, `pnpm start` reads, and both release tarballs ship. 
So `docker run -e HORIZON_OAP_QUERY_URL=… -e HORIZON_AUTH_LOCAL_USERS='[…]' …` 
needs no `-v` mount. Lists/objects/secrets are **single-line** JSON env vars; 
precedence is env > file > built-in default; a recursive parity test guards 
that *every* schema field stays tokenized (it already caught one gap, 
`oap.mqe`). Secrets are never baked at build.
   
   **3. Reachability-based preflight.** The Cluster Status admin pane fires a 
safe GET at each feature's real admin REST path (`/debugging/config/dump`, 
`/runtime/rule/list`, `/dsl-debugging/status`, `/inspect/metrics`, 
`/ui-management/templates`) and colors each row by whether it **responds** — 
health is the live probe, not config-presence. A 404 (selector off, renamed, 
absent in a fork) reads `unreachable`; the config-dump selector check is 
demoted to an informational "selector detected" footnote. ui_template joins the 
table as a feature (mode-aware: "readonly · bundled" when not probed). 30s 
single-flight cache; per-row "checked Ns ago" anchored to the BFF's probe time; 
summary badge "N/M reachable" (yellow when not all live).
   
   **4. 3D map: no silent disk-bundle fallback.** It was the one surface that 
quietly served the bundle when its remote couldn't be resolved. It now renders 
**only** from the remote row (real in live, the synthetic bundled row in 
readonly) and 503-blocks otherwise — matching layer/overview/alert. A live 
ui_template outage surfaces as a block, not a stale bundle.
   
   **5. local-boot skill + docs.** The skill boots the repo `horizon.yaml` with 
the OAP target + dev users (`dev-users.json`) / LDAP (`dev-ldap.json`) injected 
via `HORIZON_*` env vars; the three per-scenario configs are removed. README + 
setup/overview + container-image + rbac + local-backend + ports updated to the 
single-file model.
   
   ## Validation
   
   - **Gate (CI mirror):** `type-check`, `build-ui`, `build-bff`, `lint`, 
`license:check` clean; **162 BFF + 116 UI** unit tests; BFF template i18n no 
drift; **all 8 UI locales complete**.
   - **Live OAP (public demo):** readonly (44 layers from the bundle, 
translated locales, query live, write→409), live regression (seed+read, 
mode=live), **env-native boot** (root `horizon.yaml` + env vars only → login 
200, OAP injected), reachability preflight (inspect's selector is on but only 
`/inspect/metrics` responds — the probe catches it), 3D map 503-block on 
unreachable, alarms-config 409 in readonly.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to