NMS-20154: PrimeVue Generate System Report page - #8735
Conversation
…t 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.
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.
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.
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.
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.
…ename 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.
|
@joseanesONMS A few comments before reviewing further. Make sure to use the new Also in future, PR title should reference Run Need to fix integration and smoke tests. Will need to at least fix I want to look closer at this. Instead of the sort of hack of loading the generated report into an |
|
|
Replaces the legacy Generate System Report JSP form with a PrimeVue page backed by a new REST metadata endpoint.
Report generation is unchanged — it still streams from the existing SystemReportController — so this is a UI/metadata migration, not a change to what the report contains.
/api/v2/system-report/pluginsand/formattersexpose the visible report plugins and formatters as JSON; both are admin-gated./system-reportoffers plugin checkboxes with an All toggle, a report-type Select, an optional file name, and Generate; the route is admin-gated.operation=runto the existing streaming controller through a hidden iframe, and a failed generation (500, expired session, plugin error) is now surfaced instead of silently doing nothing.text(matching the legacy form), the file name is sanitized the way the server sanitizes it, and the Support menu entry is repointed to the new page.SystemReportRestServiceunit test and aSystemReport.vuecomponent test (form contract, filename sanitization, iframe-error path); fulluisuite green.