Multi-processor support & associated CRUD operations #168
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.
Description
This PR updates the 'Enrich data' section on ingest-related workflow inputs to support multiple processors, including the ability to add and delete them. Specifically:
UiConfig
prop to pass to all of the downstream form inputs, instead of the workflow. This way, we can decouple the form from being tied to the backend-persisted workflow config. Now, we can have a flexible, updatableUiConfig
that we can add/remove fields (including adding/removing processors) without saving/updating in the backend. We add callbacks to the base fn to re-generate the form values & form schema when changes are made. When the users finally save, we will take this dynamicUiConfig
field and update the underlying backend workflow with itaddProcessor()
anddeleteProcessor()
fns to theProcessorsList
, and using that functionality in the existing 'Add processor' button, and the new delete button. Both of these fns will take the existing config (getting any updated/interim values along the way), update the config, and letting the baseResizableWorkspace
component re-generate the form values / form schemauseFormikContext()
instead of passing formik props explicitly intoWorkflowInputs
andProcessorsList
Note: the ability to choose some preset processors and/or provide a more useful generated ingest processor will be in subsequent PRs. This is just focusing on allowing the ability to update the list and persist it correctly.
Demo video, showing add/delete of processors, and when saving, showing the changes persisted on refresh:
screen-capture.37.webm
Issues Resolved
Makes progress on #23
Check List
--signoff
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.