wu-sheng opened a new pull request, #9: URL: https://github.com/apache/skywalking-horizon-ui/pull/9
## What Unifies the **layer dashboards** and **overview templates** admin pages on one authoring model and adds create + delete, building on the browser-local-draft work already in 0.6.0. ### Authoring model (shared) - Edits live as a **browser-local draft**; the live page stays on the published OAP version until you publish. - **Reset to ▾** loads Bundled/Remote into the editor; **Preview ▾** opens the real page rendering Local/Bundled/Remote; **Check diff & push** publishes (create-or-update on OAP). ### Create (overview) - "+ New dashboard" writes a **local draft** (id = template name, checked unique), edit/preview, then push. - **Remote-only** dashboards (pushed, no bundled default) now render on the live page + sidebar, not just the editor — `buildBundle` surfaces them, and the admin picker merges server + remote-only + local drafts. ### Delete / disable - OAP has **no hard DELETE**, so delete soft-disables: local-only drafts are removed from the browser; on-OAP templates are disabled and drop from the picker live-state, sidebar, and live page. - **Layer disable** hides the layer — the `/api/menu` route now honors disabled templates. A disabled layer offers **Reactivate** (re-enables from the bundled default via the OAP update path, which clears the disabled flag). - New `POST /api/admin/templates/disable` route (RBAC `overview:write`). Styled in-app confirm dialogs replace the native `window.confirm`. ### Overview editor rebuild - Layer-style **12-column canvas**: drag-reorder, corner-resize, click-to-edit drawer (shows on selection, hides on Esc/deselect), selectable section-breaks + title, dashed selectable hints. Mirrors the live grid (fixed row height) so layout matches the real page (e.g. topology + alarms side-by-side). - Composite-metrics KPI rows are stacked cards so they read in the narrow drawer. ### Reliability - Clear **"Cannot reach the server"** message when the BFF is down (API client no longer double-reads the response body → no more "body stream already read"). - Fixed the sidebar **scrolling to the bottom on every navigation** (the "Debug events" toggle's active state was being used as the scroll target). ### Docs - Rewrote the layer + overview template admin sections for the draft → preview → push model, create, and delete/disable. ## Validation - `pnpm --filter ui run type-check`, `pnpm --filter @skywalking-horizon-ui/bff run type-check`, eslint, and `license-eye header check` (0 invalid) all pass. - Exercised against the demo OAP: disabling a layer is excluded from `/api/menu`; create→push→render verified. ## Note for reviewers Re-enabling a disabled template relies on OAP's `changeTemplate` (PUT) writing `disabled=false` via `DashboardSetting.toEntity()`. Reactivate uses that update path. Confirm against your OAP version — older builds may not reset the flag on update. -- 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]
