wu-sheng opened a new pull request, #25: URL: https://github.com/apache/skywalking-horizon-ui/pull/25
## Summary Adds a per-layer **Pod Logs** tab that live-tails a Kubernetes pod's container logs, fetched on demand from the K8s API through OAP (`listContainers` / `ondemandPodLogs`) and never persisted. Instance-pinned: pick a pod → pick a container → Start; the trailing SECOND-precision window streams into a read-only Monaco pane on a chosen interval until paused. - **BFF** — new `GET/POST /api/layer/:key/pod-logs(/containers)` routes (`logs:read`), epoch-seconds → ms conversion, `errorReason` passthrough for the feature-disabled and stale-pod cases. - **Caps** — `podLogs` component flag added to the `k8s_service`, `mesh`, `mesh_dp` bundled layer templates. `mergeComponentFallback` back-fills component flags a remote OAP-stored template predates, so the tab surfaces on existing deployments **without a re-push**. - **UI** — sidebar tab + caps-gated route, layer-template admin toggle, topbar auto-refresh + time-picker opt-out (the page runs its own tail loop, same as Traces / Logs). - **Filtering** — Include / Exclude forward to OAP's `keywordsOfContent` / `excludingKeywordsOfContent` (full-line regex; placeholder hints `.*error.*`), matching booster-ui. - **i18n** — the new view is fully wrapped in `t()`; 22 keys seeded across all eight locales. Also bundles the template-admin **reset-from-bundled** fix: Save / Check diff & push now gate on editor-vs-remote (not just vs the load snapshot), so a reset to bundled is publishable when bundled ≠ remote (layer + overview editors); the unpublished-edits nudge is suppressed on the admin editor routes; and the save / flash message moved to its own row so it no longer overlaps the action buttons. `CHANGELOG.md` records the feature + bundled-template changes; `CLAUDE.md` gains a changelog policy (new features + bundled-template changes go in the changelog; released sections take bug fixes only). ## Validation - Validated end-to-end against the public demo OAP (`demo.skywalking.apache.org`): container listing + log tail resolve for a live `K8S_SERVICE` pod; `MESH` / `MESH_DP` resolve for live pods that carry namespace+pod metadata. - Confirmed OAP resolves the pod from the instance's `namespace` + `pod` **properties** (`OndemandLogQuery.java`), not the display name; the two distinct error paths (`namespace and podName can't be null or empty` vs `No pod can be found`) are surfaced verbatim. - `pnpm type-check` (UI + BFF), eslint (UI + BFF), `license-eye header check`, and api-client build all green; i18n key coverage verified (no missing keys). ## Test plan - [ ] On a Kubernetes-deployed layer (K8S_SERVICE / MESH / MESH_DP), open **Pod Logs**, pick a running pod + container, press Start, and confirm the tail streams and refreshes on the chosen interval. - [ ] Pause/resume; switch container / window / interval mid-tail. - [ ] Add Include / Exclude regex (e.g. `.*error.*`) and confirm filtering. - [ ] Pick a rotated/dead pod and confirm the error banner shows the OAP reason. - [ ] Confirm the global time picker + auto-refresh are greyed on the tab. - [ ] Confirm the tab does NOT appear on non-K8s layers. - [ ] Verify the view renders in a non-English locale. -- 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]
