Skip to content

NMS-20128: PrimeVue Manage Minions page - #8727

Open
joseanesONMS wants to merge 3 commits into
developfrom
jira/NMS-20128-minions
Open

NMS-20128: PrimeVue Manage Minions page#8727
joseanesONMS wants to merge 3 commits into
developfrom
jira/NMS-20128-minions

Conversation

@joseanesONMS

Copy link
Copy Markdown
Contributor

Migrates the Manage Minions admin page from the legacy AngularJS list to a PrimeVue /ui screen. Reuses the existing /api/v2/minions REST unchanged — no backend, model, or schema change.

  • The menu entry is repointed to the new page and gated to ROLE_ADMIN; MenuHeaderIT is updated to assert the new page.
  • Edit is read-before-write (GET then PUT) so server-maintained status, version, and last-seen survive an edit, and unexposed minion properties round-trip.
  • The ID column links to the minion's auto-created requisition node via the same foreignId lookup the legacy page used.
  • The table adds column sort, a client-side global search, loading/empty/error states, and a refresh button.
  • The list fetch is bounded (2,000) with a "showing first N" note rather than an unbounded fetch; search and paging are client-side, which suits the small minion counts.
  • Delete treats an already-removed minion (404) as success.
  • Component, service, store, and container tests are added.

Migrates the legacy AngularJS minions page to a PrimeVue /ui page over the
existing v2 /api/v2/minions CRUD — no backend or JSON contract change, and
the v1 REST stays. Table of minions (id, label, location, type, status,
version, last updated, property count) with edit and delete; the editor
changes label, location and the key/value properties (with duplicate-key
validation) while the server-maintained fields round-trip via spread, and
delete confirms and warns about re-registration. The menu entry points at
the new page.
Swap direct PrimeVue for the Onms-XXX seam wrappers across the minions
table and editor dialog: Button->OnmsButton (text/outlined mapped to
variant), Dialog->OnmsDialog, InputText->OnmsInputText,
DataTable->OnmsTable, Column->OnmsColumn, Tag->OnmsTag, and the
IconField/InputIcon/InputText search box collapses into OnmsSearchInput.
Message and IftaLabel have no wrapper yet and stay on PrimeVue. No
behaviour change.
@joseanesONMS

Copy link
Copy Markdown
Contributor Author

@synqotik @marshallmassengill — ready for review. This page now uses the @opennms/onms-ui Onms-XXX wrappers instead of direct PrimeVue (Button, Dialog, InputText, DataTable, Column, Tag; the IconField/InputIcon search box is now OnmsSearchInput). Message and IftaLabel have no wrapper yet, so they stay on PrimeVue. pnpm lint is clean (ran lint:fix), and the vue-tsc build and the UI test suite pass. No behaviour change.

…sDialog width prop

Refresh and remove-property buttons now use OnmsIconButton with icon
components instead of a fallthrough icon="pi ..."; dialog sizing routes through
the OnmsDialog width prop (min(Npx, 95vw)); drop :loading, which OnmsTable does
not declare (the #empty slot already handles the loading state). Removes
reliance on $attrs riding into PrimeVue.
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.

1 participant