NMS-20108: On-Call Roles management via versioned REST API and PrimeVue UI - #8715
Open
joseanesONMS wants to merge 5 commits into
Open
NMS-20108: On-Call Roles management via versioned REST API and PrimeVue UI#8715joseanesONMS wants to merge 5 commits into
joseanesONMS wants to merge 5 commits into
Conversation
Adds an admin-only versioned /api/v2/on-call-roles API over the existing groups.xml role storage (list/get/create/update/rename/delete plus a computed month calendar from GroupManager.getRoleScheduleEntries), and a PrimeVue Manage On-Call Roles page with a schedule calendar and one-off coverage editor. The admin menu entry now points at the new page. Roles stay in groups.xml: hand-edited entries (including recurring weekly, daily and monthly schedules) are picked up on read via GroupManager.update(), round-trip unmodified, and remain editable; schedule validation applies only to entries added through the API. New overnight duty entries (begin after end) are rejected because DutySchedule never matches them at runtime.
Review fixes for the on-call roles API and page. New schedule entries are canonicalized to the exact forms the scheduler dispatches on (zero-padded widths, JVM-default-locale month names, lowercase weekly days, unpadded monthly days), closing the gap where the API accepted entries notifd silently ignored. The optional time id attribute now round-trips, partial updates can change supervisor or membership-group independently, and a role whose schedule cannot be evaluated no longer breaks the whole list response. The calendar reports the server time zone and the dialog renders and labels all times in it, so what is entered matches what notifd evaluates. Coverage edits re-read the stored role before mutating and match removals by content, narrowing the window where a concurrent edit could be overwritten; removing a recurring (hand-edited) entry asks for confirmation since this editor cannot recreate one. Dialogs show API rejections inline like the users and groups pages.
…rver locale Formatting with the default locale made specific-schedule writes fail only in months whose abbreviation breaks the 20-character width (janv. but not mai), and stored strings the API itself could not re-parse. Dates are now always stored in the fixed-width Locale.ROOT form; if the default locale cannot parse that form back, the write is rejected up front with a clear message, since notifd would silently ignore the entry at runtime.
A role whose stored schedule the runtime cannot evaluate now reports a schedule-error field instead of silently showing an empty currently-on-call list, and the roles table renders it as a warning tag — an unevaluable rota is a notifd outage, not an idle one. The name regex scans for forbidden characters instead of a newline-bypassable full-string match.
Author
|
@marshallmassengill could you take a review pass when you get a chance? |
… in MenuHeaderIT The menu entry now lands on the Vue page, so the smoke test waits for its page title instead of the legacy JSP breadcrumb.
joseanesONMS
force-pushed
the
jira/NMS-20108-oncall-roles-pr
branch
from
July 30, 2026 23:37
bc553c8 to
8e55125
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rewrites Admin → On-Call Roles as a PrimeVue page backed by a new versioned REST API, keeping groups.xml as the system of record.
Adds admin-only
/api/v2/on-call-roles: list/get/create/update/rename/delete plus a computed month calendar that reuses the exact interval resolution notifd uses;time-zoneis reported so clients render times in server time.Hand-edited roles round-trip untouched and stay editable: file changes are picked up on read, schedule entries already stored skip new-entry validation, the optional time
idattribute is preserved, and a role whose schedule the runtime cannot evaluate reportsschedule-errorinstead of failing the list.New entries are validated and canonicalized to the exact forms
BasicScheduleUtilsdispatches on (zero-padded widths, English month names, lowercase weekday, unpadded monthly day); overnightbegins>endsentries are rejected because the runtime never matches them.The page shows the legacy list columns plus an explicit supervisor-fallback indicator, a month calendar with one-off coverage add/remove (content-matched removal, refetch-before-mutate, confirmation before removing recurring entries), rename/delete with referential warnings, and inline field validation with API errors shown in the dialogs.
The admin menu entry now points at the new page. 16 integration tests cover the API; store, validation and dialog behavior are covered by vitest.
Replaces fork PR NMS-20108: On-Call Roles management via versioned REST API and PrimeVue UI #8702 with an in-repo branch so CI runs.