Skip to content

NMS-20169: Migrate Graph Collections (KSC Reports) to Vue UI - #8750

Open
joseanesONMS wants to merge 2 commits into
developfrom
jira/NMS-20169-graph-collections
Open

NMS-20169: Migrate Graph Collections (KSC Reports) to Vue UI#8750
joseanesONMS wants to merge 2 commits into
developfrom
jira/NMS-20169-graph-collections

Conversation

@joseanesONMS

Copy link
Copy Markdown
Contributor

Converts the legacy AngularJS/JSP "Graph Collections" (KSC Reports) page to a PrimeVue SPA under /ui with full report and per-graph CRUD. Reports render through the existing resource-graph chart components unchanged, so there are no new chart widgets.

  • A KSC graph's {resourceId, graphtype, timespan} feed the existing Graph.vue directly; the only new rendering code is a TypeScript port of KSC_PerformanceReportFactory.getBeginEndTime covering all 25 timespans (unit-tested).
  • KscRestService gains DELETE /ksc/{id}, whole-report replace via POST /ksc/{id}, and a JSON-accepting POST /ksc that assigns the next id server-side.
  • GET /ksc now returns full reports rather than terse ones, so the list shows a graph count and edits load every graph.
  • Report editing is admin-only in the Vue UI (matching the legacy page); the REST endpoints keep the platform ROLE_REST contract.
  • The Dashboards menu entry points at the Vue route; the JSP page stays reachable as "Graph Collections (Legacy)".

Testing: KscRestServiceIT covers create/update/delete/list against a temporary database; Vitest covers the timespan port, resourceId decoding, and the store's CRUD paths.

Replace the legacy AngularJS/JSP KSC pages with a PrimeVue single-page
flow under /ui, reusing the resource-graph chart components verbatim so a
report's graphs render with the same visualizations and no new chart code.
Each KSC graph carries {resourceId, graphtype, timespan}, which feed the
existing Graph.vue directly; the only new rendering logic is a TypeScript
port of KSC_PerformanceReportFactory.getBeginEndTime that resolves the 25
symbolic timespans to concrete start/end times.

Add the CRUD surface the editor needs to KscRestService: DELETE a report,
replace a whole report, and let POST assign the next id server-side (and
accept JSON). The list endpoint returns full reports (not terse) so the
list shows a graph count and edits load every graph. Report editing is
reserved for administrators in the Vue UI (matching the legacy page); the
REST endpoints keep the platform ROLE_REST contract like the existing
create/add-graph endpoints. The Dashboards "Graph Collections" menu entry
now points at the Vue route; the legacy page stays reachable as "Graph
Collections (Legacy)".

- New pages: list (view/edit/duplicate/delete/create/reload) and a report
  view that lays graphs out honoring graphs_per_line.
- Report and per-graph editor dialogs; the graph editor picks a resource
  (node -> child) then a prefab graph, with inline validation. Edit and
  Duplicate load the full report by id so Save never drops graphs.
- kscStore/kscService over rest/ksc; a failed list load surfaces an error
  instead of reading as an empty configuration.
- Tests: KscRestServiceIT covers create/update/delete/list; Vitest covers
  the timespan port, resourceId decoding, and the store's CRUD paths.
@joseanesONMS
joseanesONMS force-pushed the jira/NMS-20169-graph-collections branch from c415e63 to 54718a9 Compare August 5, 2026 18:34
@github-actions
github-actions Bot requested a review from mershad-manesh August 5, 2026 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants