[OpenNMS/opennms] e23ed1: NMS-20154: Migrate the Generate System Report page...

joseanesONMS via opennms-cvs <[email protected]>
Newsgroups gmane.network.opennms.cvs
Message-ID <OpenNMS/opennms/push/refs/heads/develop/[email protected]>
  Branch: refs/heads/develop
  Home:   https://github.com/OpenNMS/opennms
  Commit: e23ed1a215fd0499c5ddac9e0a23b792276710f8
      https://github.com/OpenNMS/opennms/commit/e23ed1a215fd0499c5ddac9e0a23b792276710f8
  Author: joseanesONMS <[email protected]>
  Date:   2026-08-28 (Fri, 28 Aug 2026)

  Changed paths:
    M features/bsm/rest/impl/pom.xml
    M features/status/rest/pom.xml
    M opennms-openapi-docs/pom.xml
    M opennms-webapp-rest/pom.xml
    A opennms-webapp-rest/src/main/java/org/opennms/web/rest/v2/SystemReportRestService.java
    M opennms-webapp-rest/src/main/webapp/WEB-INF/applicationContext-cxf-rest-v2.xml
    M opennms-webapp-rest/src/main/webapp/WEB-INF/menu/menu-template-default.json
    M opennms-webapp-rest/src/main/webapp/WEB-INF/menu/menu-template.json
    A opennms-webapp-rest/src/test/java/org/opennms/web/rest/v2/SystemReportRestServiceTest.java
    M opennms-webapp/src/main/webapp/WEB-INF/applicationContext-spring-security.xml
    M smoke-test/src/test/java/org/opennms/smoketest/MenuHeaderIT.java
    A ui/src/containers/SystemReport.vue
    M ui/src/main/router/index.ts
    M ui/src/services/index.ts
    A ui/src/services/systemReportService.ts
    A ui/src/types/systemReport.ts
    A ui/tests/systemReport.test.ts

  Log Message:
  -----------
  NMS-20154: Migrate the Generate System Report page to Vue UI (#8824)

* NMS-20154: /api/v2/system-report metadata endpoints for the new report page

Adds a read-only SystemReportRestService exposing the visible report plugins and
formatters as JSON so a PrimeVue Generate System Report page can build its form.
The systemReport bean is wired into the REST v2 context through the SOA service
registry, mirroring the legacy dispatcher wiring, and the endpoints are gated to
ROLE_ADMIN since the report bundles logs and configuration. Report generation
itself continues to stream from the existing SystemReportController.

* NMS-20154: PrimeVue Generate System Report page

Replaces the legacy systemReport JSP form with a PrimeVue page at /system-report:
plugin checkboxes with an All master toggle, a report-type Select, and an optional
file name. The page loads its options from /api/v2/system-report and, on Generate,
posts operation=run to the existing SystemReportController through a hidden iframe
so the browser streams the report download without navigating away. The route is
admin-gated to match the endpoint.

* NMS-20154: wire systemReport via the root-context serviceRegistry bean

serviceRegistry is a root-context bean (applicationContext-soa.xml) and the CXF
/api/v2 servlet context has the root as its parent, so a direct ref resolves it —
matching the legacy dispatcher wiring. Replaces the earlier onmsgi:reference,
which had no matching OSGi service registration.

* NMS-20154: point the Support menu entry at the new system report page

Repoints the "Generate System Report" menu item from the legacy
admin/support/systemReportList.htm JSP to the PrimeVue page at
ui/index.html#/system-report.

* NMS-20154: report-service unit test and a generating-report notice

Adds a SystemReportRestService unit test covering the visible-only filtering and
DTO mapping for plugins and formatters. The page now shows a notice on Generate
that the report is being built and may take a while on a large system, since the
report is produced on demand (plugins run and logs/config are gathered and
compressed before the streamed download begins) and the browser cannot signal
when that download completes.

* NMS-20154: address review — surface generation failures, sanitize filename

The Generate flow now detects when the hidden download frame loads an error page
(a failed download never loads it) and surfaces the failure instead of silently
doing nothing. The optional filename is sanitized to word characters the same way
the server does, and omitted when it would collapse to an empty name. The default
report format returns to the legacy 'text', plugin checkbox ids are made
whitespace-safe, the context path is derived from the URL when the menu base is
unavailable, and a non-admin deep-link no longer flashes a load error before the
route guard redirects. Also drops the dead JSON-shape fallback in the service.

* NMS-20154: update the smoke assertion for the new system report page

The Support -> Generate System Report menu entry now opens the PrimeVue
page (ui/index.html#/system-report), which renders the /ui breadcrumb
(div.breadcrumbs) and an OnmsButton. MenuHeaderIT still waited on the
legacy JSP DOM (ol.breadcrumb 'System Reports' and a Bootstrap submit
input), so testMenuEntries timed out. Point it at the new page's
breadcrumb link and generate button.

* NMS-20154: use Onms-XXX wrappers and a REST download for system report

Address review on the Generate System Report page:
- Swap direct PrimeVue (Card, Checkbox, Select, InputText) for the
  @opennms/onms-ui wrappers (OnmsCard/OnmsCheckbox/OnmsSelect/
  OnmsInputText); the binary OnmsCheckbox drives per-plugin selection
  through an explicit add/remove toggle.
- Replace the hidden-iframe form POST to the legacy systemReport.htm
  with a POST /api/v2/system-report/generate that streams the report as
  an attachment, consumed via composables/useDownload. The endpoint
  ports FormatterView (resolve formatter, run selected plugins, sanitize
  filename) and rejects unknown/non-streaming formatters and empty
  plugin sets with 400s. Generation is admin-only in spring-security.
- Cover the endpoint (stream order, attachment header, filename
  sanitising, the 400 paths) and rewrite the page test for the new flow.

* NMS-20154: give the sibling v2 REST ITs the system-report class on their test classpath

features/status/rest and features/bsm/rest/impl boot opennms-webapp-rest's
shared applicationContext-cxf-rest-v2.xml in their ITs. That context now
instantiates SystemReportRestService and defines the systemReport bean
(class org.opennms.systemreport.SystemReport), which opennms-webapp-rest
declares provided (non-transitive), so those ITs failed to load the whole
context with a ClassNotFoundException. Add system-report as a test-scope
dependency in both modules, mirroring the existing topology-views/jsonStore
entries that cover the same shared-context requirement.

* NMS-20154: re-run CI (flaky smoke test AdminPasswordGateIT, unrelated)

* NMS-20154: put system-report on the openapi-docs classpath

The swagger scan reflects over SystemReportRestService's declared fields, so
the type of m_systemReport must be resolvable when opennms-openapi-docs builds.
webapp-rest declares the system-report feature as provided (non-transitive),
so add it here at provided scope too — matching the topology-views entry that
exists for the same reason and the sibling fixes in bsm/rest and status/rest.



To unsubscribe from these emails, change your notification settings at https://github.com/OpenNMS/opennms/settings/notifications


_______________________________________________
Please read the OpenNMS Mailing List FAQ:
http://www.opennms.org/wiki/index.php?page=MailingListFaq
opennms-cvs mailing list

To *unsubscribe* or change your subscription options, see the bottom of this page:
https://lists.sourceforge.net/lists/listinfo/opennms-cvs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.