Skip to content

feat(aci): connect automation creation form to API #93893

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ameliahsu
Copy link
Member

connected automation form to the API with a new createAutomation() hook and a getNewAutomationData() helper that combines the form data and automation builder state into the request type that the API expects

@ameliahsu ameliahsu requested a review from a team as a code owner June 18, 2025 23:43
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Jun 18, 2025
@@ -59,6 +59,10 @@ export default function AutomationForm({model}: {model: FormModel}) {
});
const connectedMonitors = monitors.filter(monitor => connectedIds.has(monitor.id));

useEffect(() => {
model.setValue('detectorIds', Array.from(connectedIds));
Copy link
Member

Choose a reason for hiding this comment

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

can we update the model when the connectedIds changes instead of in an effect. Overall, the goal is usually to have as few useEffects as possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scope: Frontend Automatically applied to PRs that change frontend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants