NMS-20108: On-Call Roles management via versioned REST API and PrimeVue UI - #8702
Closed
joseanesONMS wants to merge 4 commits into
Closed
NMS-20108: On-Call Roles management via versioned REST API and PrimeVue UI#8702joseanesONMS wants to merge 4 commits into
joseanesONMS wants to merge 4 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.
joseanesONMS
force-pushed
the
jira/NMS-20108-oncall-roles-pr
branch
from
July 30, 2026 20:26
0ac35c5 to
5938f18
Compare
Author
|
@marshallmassengill could you take a review pass when you get a chance? |
Author
|
Replaced by #8715 (in-repo branch so CI runs). |
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.
/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.idattribute is preserved, and a role whose schedule the runtime cannot evaluate reportsschedule-errorinstead of failing the list.BasicScheduleUtilsdispatches on (zero-padded widths, English month names, lowercase weekday, unpadded monthly day); overnightbegins>endsentries are rejected because the runtime never matches them.