feat(aci): Require at least one connected monitor in the alert builder#113246
feat(aci): Require at least one connected monitor in the alert builder#113246
Conversation
saponifi3d
left a comment
There was a problem hiding this comment.
lgtm, just a few small things / nits.
| function EditConnectedMonitorsContent({ | ||
| initialMode, | ||
| connectedIds, | ||
| setConnectedIds, |
There was a problem hiding this comment.
not related to this pr and a bit of a nit.. but might be nice to get this method from context or something so it's clearer where the connected id's are being stored.
| }); | ||
| }); | ||
|
|
||
| it('shows validation error when submitting with no projects or monitors selected', async () => { |
There was a problem hiding this comment.
should we also add that it's cleared if something has been added?
| } | ||
|
|
||
| // If any specific projects are selected, use the first one | ||
| const intitialSelectedProject = selection.projects.find(p => p > 0); |
There was a problem hiding this comment.
| const intitialSelectedProject = selection.projects.find(p => p > 0); | |
| const initialSelectedProject = selection.projects.find(p => p > 0); |
^ typo in initial
| async (data, onSubmitSuccess, onSubmitError, _event, formModel) => { | ||
| const errors = validateAutomationBuilderState(state); | ||
| const errors = validateAutomationBuilderState(state, data as AutomationFormData, { | ||
| validateConnectedMonitors: false, |
There was a problem hiding this comment.
might be nice to have a comment as to why we don't validate in the drawer; (seems like because we're enforcing on to be there, but it's a little unclear why we don't want to validate that)
There was a problem hiding this comment.
Good call, will add. We don't validate it in the drawer because we actually do want to create it without any connections (because when creating inline for a new monitor, the monitor hasn't been created yet)
Closes ISWF-2235
CleanShot.2026-04-16.at.15.16.00.mp4