-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[Ingest Pipelines] Load from json #70297
Conversation
- refactored the pipeline processsors editor components for portability - added CIT for load from json component
Pinging @elastic/es-ui (Team:Elasticsearch UI) |
@elasticmachine merge upstream |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job @jloleysens ! Tested locally and works as expected. I left a few comments in the code, no real blockers.
I had a few comments on the UX, not related to the changes on this PR but leaving them here anyways 😊
- When clicking the expand on the JSON, there is no way to go back to normal view, unless we know we can hit ESCAPE. I am not sure I see the value to be able to go fullscreen.
- Flyout to edit: I personally think it's strange to have the JSON editor in white background and prefer the gray background that we have everywhere. Also, I would prefer to use the FlyoutFooter bar for the actions ("Cancel" + "Update"), like the mappings editor.
- Do you think we could reduce the height of the JSON editor so we can see the "Invalid JSON" error below it? As you can see here, the JSON is invalid, but I don't see it and the button is grayed out, and unless you scroll you don't know why.
- I think it would be better to limit the width of the flyout as we do in the mappings editor.
x-pack/plugins/ingest_pipelines/public/application/components/pipeline_form/pipeline_form.tsx
Show resolved
Hide resolved
...lugins/ingest_pipelines/public/application/components/pipeline_form/pipeline_form_fields.tsx
Outdated
Show resolved
Hide resolved
...plication/components/pipeline_processors_editor/components/load_from_json/modal_provider.tsx
Outdated
Show resolved
Hide resolved
...plication/components/pipeline_processors_editor/components/load_from_json/modal_provider.tsx
Outdated
Show resolved
Hide resolved
@elasticmachine merge upstream |
- Update form schema and form schema types - simplify the save handler - refactor processors_title to processors_header
@elasticmachine merge upstream |
@elasticmachine merge upstream |
Hm, the fleet functional test keeps failing. That or another, unrelated functional test (lens). Retrying... |
@elasticmachine merge upstream |
💚 Build SucceededBuild metrics
History
To update your PR or re-run it, just comment with: |
* master: (32 commits) [Ingest Pipelines] Load from json (elastic#70297) [Rum Dashbaord] Rum selected service view (elastic#70579) [Uptime] Prevent duplicate requests on load for index status (elastic#70585) [ML] Changing shared module setup function parameters (elastic#70589) [Ingest Manager] Add ability to sort to agent configs and package configs (elastic#70676) [Alerting] document requirements for developing new action types (elastic#69164) Fixed adding an extra space character on selecting alert variable in action text fields (elastic#70028) [Maps] show vector tile labels on top (elastic#69444) chore(NA): upgrade to lodash@4 (elastic#69868) Add Snapshot Restore README with quick-testing steps. (elastic#70494) [EPM] Use higher priority than default templates (elastic#70640) [Maps] Fix cannot select Solid fill-color when removing fields (elastic#70621) [kbn/optimizer] only build specified themes (elastic#70389) Fix saved query modal overlay (elastic#68826) Update component templates list to render empty prompt inside of content container. Show detail panel when deep-linked, even if there are no component templates. (elastic#70633) [Security Solution] Renames the `Investigate in Resolver` Timeline action (elastic#70634) fix 400 error on initial signals search (elastic#70618) [Maps] fix unable to edit heatmap metric (elastic#70606) Update network idle timeout (elastic#70629) [APM] Disable flaky useFetcher test (elastic#70638) ...
* master: (199 commits) [Telemetry] Add documentation about Application Usage (elastic#70624) [Ingest Manager] Improve agent unenrollment with unenroll action (elastic#70031) Handle timeouts on creating templates (elastic#70635) [Lens] Add ability to set colors for y-axis series (elastic#70311) [Uptime] Use elastic charts donut (elastic#70364) [Ingest Manager] Update registry URL to point to snapshot registry (elastic#70687) [Composable template] Create / Edit wizard (elastic#70220) [APM] Optimize services overview (elastic#69648) [Ingest Pipelines] Load from json (elastic#70297) [Rum Dashbaord] Rum selected service view (elastic#70579) [Uptime] Prevent duplicate requests on load for index status (elastic#70585) [ML] Changing shared module setup function parameters (elastic#70589) [Ingest Manager] Add ability to sort to agent configs and package configs (elastic#70676) [Alerting] document requirements for developing new action types (elastic#69164) Fixed adding an extra space character on selecting alert variable in action text fields (elastic#70028) [Maps] show vector tile labels on top (elastic#69444) chore(NA): upgrade to lodash@4 (elastic#69868) Add Snapshot Restore README with quick-testing steps. (elastic#70494) [EPM] Use higher priority than default templates (elastic#70640) [Maps] Fix cannot select Solid fill-color when removing fields (elastic#70621) ...
* WiP load from json modal ready, need to refactor more stuff * First iteration of load from JSON functionality - refactored the pipeline processsors editor components for portability - added CIT for load from json component * added comment * update deserialize with tests and make it more fault tolerant * use flyout footer * remove console.error and make the json editor a lot shorter * address PR feedback - Update form schema and form schema types - simplify the save handler - refactor processors_title to processors_header * remove unused translations Co-authored-by: Elastic Machine <[email protected]>
* WiP load from json modal ready, need to refactor more stuff * First iteration of load from JSON functionality - refactored the pipeline processsors editor components for portability - added CIT for load from json component * added comment * update deserialize with tests and make it more fault tolerant * use flyout footer * remove console.error and make the json editor a lot shorter * address PR feedback - Update form schema and form schema types - simplify the save handler - refactor processors_title to processors_header * remove unused translations Co-authored-by: Elastic Machine <[email protected]> Co-authored-by: Elastic Machine <[email protected]>
Summary
Added basic load from JSON functionality similar to what mappings editor offers.
How to test
Load JSON
buttonAnd click
Load and overwrite
.Notes
This functionality only does basic check to see wether we can properly deserialise the pipeline object. We still ultimately rely on ES to validate the pipeline processors for us.
Screenshots
New load json button
load json modal
error message about invalid pipeline object
Invalid json error state, load button disabled
Checklist