Skip to content

NMS-20131: PrimeVue Manage Surveillance Categories page - #8729

Open
joseanesONMS wants to merge 2 commits into
developfrom
jira/NMS-20131-surveillance-categories
Open

NMS-20131: PrimeVue Manage Surveillance Categories page#8729
joseanesONMS wants to merge 2 commits into
developfrom
jira/NMS-20131-surveillance-categories

Conversation

@joseanesONMS

Copy link
Copy Markdown
Contributor

Migrates the Manage Surveillance Categories admin page to a PrimeVue /ui screen. Reuses the existing /rest/categories CRUD and the granular node-membership endpoints unchanged — no backend change.

  • The menu entry is repointed; MenuHeaderIT is updated to assert the new page.
  • Node assignment is a server-paged, searchable node table (reusing the Node List's nodeService, so it scales to large inventories) with a per-row membership toggle applied immediately.
  • Requisitioned nodes are locked by default behind an opt-in override, with a warning that a provisioning sync overwrites their categories.
  • Category create/edit and description update are supported; delete shows a generic "may break references" warning (no surveillance-views.xml cross-check — that would require a backend endpoint that does not exist today).
  • Category names block URL- and FIQL-unsafe characters (client-side).
  • Empty, error, and loading states are handled throughout.
  • Component, service, store, and container tests are added.

>
<template #header>
<span class="panel-header">
<i class="pi pi-question-circle" aria-hidden="true" />

@synqotik synqotik Aug 4, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sure to merge/rebase from/onto the latest develop.

Then, use OnmsIcon or OnmsIconButton here instead of pi-question-circle.

Basically, rewrite everything to use the Onms- components instead of any direct PrimeVue components.

<TableCard class="categories-table">
<div class="header">
<div class="card-title">Surveillance Categories</div>
<Button

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use OnmsIconButton, OnmsTable

@@ -0,0 +1,145 @@
<template>
<Dialog

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use OnmsDialog.

<Message v-if="errorText" severity="error" :closable="false" data-test="dialog-error">{{ errorText }}</Message>

<FormField v-if="!isEditing">
<IftaLabel>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use OnmsInputText

Migrates the legacy surveillance-categories admin page to a PrimeVue /ui
page reusing existing REST — no backend change: category CRUD via the v1
/rest/categories service and node membership via its granular
/rest/categories/{name}/nodes/{nodeId} sub-resource. Table of categories
with create (name + description), description edit (the name is the
immutable identifier), delete, and a Manage Nodes dialog that assigns and
unassigns nodes with a PickList, applying only the diff against the
membership API. Member nodes are read with the node search that actually
filters by membership (category.name==NAME); the menu entry points at the
new page.
Replace the direct PrimeVue components (Button, DataTable, Column,
Dialog, InputText, Checkbox, ToggleSwitch, IconField/InputIcon) across
the four Manage Categories components with their Onms-* seam wrappers,
and swap the help-panel question-circle for OnmsIcon. Message and
IftaLabel stay on PrimeVue as no seam wrapper exists for them.
@joseanesONMS
joseanesONMS force-pushed the jira/NMS-20131-surveillance-categories branch from f09a904 to 6f00327 Compare August 4, 2026 19:44
@joseanesONMS

Copy link
Copy Markdown
Contributor Author

@synqotik — done. Rebased onto develop and migrated all four Manage Categories components off direct PrimeVue onto the Onms-* seam wrappers:

  • ButtonsOnmsButton (Add/Manage Nodes/Edit/Delete/Cancel/Save/Close), with the + glyph now an OnmsIcon.
  • TablesOnmsTable / OnmsColumn; the nodes table keeps its lazy-load spinner.
  • DialogsOnmsDialog (sizing via the width prop).
  • InputsOnmsInputText; the node search is now OnmsSearchInput.
  • Toggle/CheckboxOnmsToggleSwitch / OnmsCheckbox.
  • Help-panel pi-question-circleOnmsIcon.

Message and IftaLabel stay on PrimeVue as no seam wrapper exists for them yet. Lint clean and the ManageCategories tests pass.

@joseanesONMS
joseanesONMS requested a review from synqotik August 4, 2026 19:45
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