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

   ## Why
   
   Horizon had no way to see OAP's per-service lifecycle events (agent 
restarts, Kubernetes events, and other `queryEvents` records). These are most 
useful scoped to a single service — "what happened to *this* service's 
instances?" — so they belong next to the service you're already looking at, not 
on a separate global page.
   
   ## What
   
   A **per-service Events popout**, opened from the **Events** button on a 
layer drill-down's service banner (permission-gated on a new `events:read` 
verb). It renders that service's events as an **instance × time swimlane**:
   
   - One row per **service instance**, each in its own generated color 
(distinct at any instance count).
   - Each event is a bar spanning start→end; an event with no end is a 
**diamond marker**; **Error** events carry a red ring; overlapping events on 
one instance **stack into sub-lanes**.
   - Owns its own time window — `6h` / `1d` / `2d` presets + a **custom range** 
up to 7 days — at second precision, off the global ticker.
   - Scrolling is fully internal: sticky time-axis header + sticky instance 
column, **horizontal scroll** for long ranges (opened at the newest events), 
the axis marks the **date at day boundaries**.
   - A **search box** filters instances by name (for services running hundreds 
of them).
   - Clicking a bar opens a **detail panel** (instance, Started / Ended / 
Duration, message, reported parameters).
   - The newest events are fetched up to a configurable cap 
(`performance.limits.maxPageSize.events`, default 200) with an explicit **"all 
in range shown / more available — narrow the range"** indicator.
   
   **BFF:** a thin `POST /api/events` wrapping OAP `queryEvents` (SECOND step, 
DES, layer/service filters, server-side page-size clamp, absolute-window cap), 
gated by `events:read` (granted to the viewer / maintainer / operator built-in 
roles).
   
   **Docs / i18n / tests:** CHANGELOG + operator docs 
(`docs/operate/events.md`) + both RBAC docs updated; all new UI strings 
translated across the 8 locales; unit tests cover the BFF query shaping and the 
Gantt packing.
   
   ## Validation
   
   - `pnpm -r type-check`, `pnpm -r lint`, `license:check`, `build` (UI + BFF) 
— all green.
   - Unit tests: **307 pass** (BFF 174, UI 133), incl. new `events.test.ts` 
(query shaping) and `ganttLayout.test.ts` (swimlane packing).
   - **Live-OAP:** validated against the public Apache demo OAP 
(`demo.skywalking.apache.org`) — the `POST /api/events` route (filters, 
page-size clamp, DES order, window clamp) and the rendered popout (swimlane, 
date axis, custom range, detail, search) were confirmed in-browser. The public 
demo reports only service-scoped events (empty `serviceInstance`), so the 
**multi-instance layout** (per-instance rows, sub-lane stacking) was verified 
with injected synthetic data; the packing/render logic is also unit-covered.


-- 
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