Skip to content
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] Processor forms for processors A-D #72849

Merged

Conversation

jloleysens
Copy link
Contributor

Summary

Added forms for the following processors:

  • Append Processor
  • Bytes Processor
  • Circle Processor
  • Convert Processor
  • CSV Processor
  • Date Processor
  • Date Index Name Processor
  • Dissect Processor
  • Dot Expander Processor
  • Drop Processor

How to test

  1. Start Kibana with basic license
  2. Go to ingest pipelines plugin in management section
  3. Add a processor for each of the forms listed above (attempt to submit to see which fields are required)
  4. Create the pipeline

Notes

  • Have not spent time on optimising the layout of the forms. We can definitely discuss this here
  • Copy review is still needed
  • Trying to devise a good form of test coverage for these forms
  • I intend to add processor forms in batches of ~10 so that each form gets proper review and testing

Checklist

For maintainers

- Also refactored options to live in scoped objects to avoid
  overriding type (important fix!)
- Have not polished copy or form layout.
- date_index_name
- dissect
- dot_expander
- drop

Fields refactored:

- Field
- Ignore missing
@jloleysens jloleysens added v8.0.0 Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more release_note:skip Skip the PR/issue when compiling release notes v7.10.0 Feature:Ingest Node Pipelines Ingest node pipelines management labels Jul 22, 2020
@jloleysens jloleysens requested a review from a team as a code owner July 22, 2020 13:46
@elasticmachine
Copy link
Contributor

Pinging @elastic/es-ui (Team:Elasticsearch UI)

@jloleysens
Copy link
Contributor Author

@elasticmachine merge upstream

@jloleysens
Copy link
Contributor Author

@elasticmachine merge upstream

Copy link
Contributor

@alisonelizabeth alisonelizabeth left a comment

Choose a reason for hiding this comment

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

This is looking great @jloleysens! I did a light code review and verified all the processor types against the docs. I have not yet thoroughly tested adding the processor types and then creating/saving the pipeline. I also think it'd be great to get some of the ES engineers to review these forms for a sanity check.


Bugs

  • There were a few processor types where the field field wasn't marked as required: csv, date_index_name, and dissect.
  • ? If I select the append processor type (for example), fill out the required fields and update, then go back to edit it and change processor types, any fields that were common retained the value. I think I would expect the fields to be cleared in this scenario.

UX feedback

  • It'd be great if we could make the "Condition" field more usable, similarly with "Pattern" (possibly others). I think both of these could potentially be fairly long, which could make the text field hard to work with.
  • I'm not used to seeing radio groups 😄 . This may be a personal preference, but what do you think about using a dropdown for the shape types instead (circle processor)?
  • I think we could borrow some of the UX in the mappings editor, where we use the toggle for optional fields. Also, I think it's really helpful to have help text next to each field as well. The doc link may not be applicable.

Example:
Screen Shot 2020-07-27 at 12 02 33 PM

  • I noticed some of the optional fields have "(optional)" in the field name, and some do not. This point may not be applicable though if we follow the mappings editor UX.
  • How difficult would it be to use a human-readable name for the processor type in the dropdown? For example, "date index name" instead of "date_index_name".

Other

  • I noticed the ability to add an on_failure processor at the processor level is missing. Are you planning to add support for this?

<UseField
componentProps={{
euiFieldProps: {
options: [
Copy link
Contributor

Choose a reason for hiding this comment

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

@jloleysens
Copy link
Contributor Author

@elasticmachine merge upstream

@jloleysens
Copy link
Contributor Author

@elasticmachine merge upstream

…nes/processor-forms-a-d

* 'master' of github.com:elastic/kibana: (26 commits)
  [Telemetry][API Integration] size_in_bytes to be a number (elastic#74664)
  [ILM] Convert node details flyout to TS (elastic#73707)
  [Ingest Node Pipelines] Sentence-case processor names (elastic#74645)
  Bump angular dependency from 1.7.9 to 1.8.0 (elastic#74482)
  [ML] Fixing schema for custom rule conditions (elastic#74676)
  [ML] Refactor in preparation for new es client (elastic#74552)
  [ML] Adding initial file analysis overrides (elastic#74376)
  Allow any hostname for chromium proxy bypass (elastic#74693)
  [ML] ML on Kibana Management: Add ability to pass a group ID filter to job management page (elastic#74533)
  [Metrics UI] Fix No Data preview pluralization (elastic#74399)
  [Bug][Security_Solution][Telemetry] Capitalize S in macOS (elastic#74688)
  Remove karma tests  from legacy maps (elastic#74668)
  [Ingest Manager] stop creating events-* index pattern and placeholder index (elastic#74683)
  [Enterprise Search] Update the browser/document title on plugin navigation (elastic#74392)
  [visualizations] Add i18n translation for 'No results found' (elastic#74619)
  [maps] convert vector style properties to TS (elastic#74553)
  bump geckodriver binary to 0.27 (elastic#74638)
  fix: update apm agents to catch abort requests (elastic#74658)
  [Security Solution] Resolver children pagination (elastic#74603)
  add memoryStatus to df analytics page and analytics table in management (elastic#74570)
  ...
- Added help text for all fields
- Updated layout so that required fields are always on first
- Replaced circle radio group with a select drop down
@alisonelizabeth
Copy link
Contributor

I tend to agree that it would be better if we cleared the form. (What if we switch to a form with the same name but the field type is different? I can't see a field that would trigger this at the moment, but it is technically possible).

IMO it would be the best if we provide the user with a fresh set of fields whenever they change type, and as a bonus if they go back to the type they were on it would be nice if those fields get repopulated if they are editing an existing processor.

👍 I will open up a separate issue to address this.

I have addressed all of these points in the latest commits except for adopting the toggle for optional fields of the mappings editor. After looking at the existing forms I thought the added toggle created a bit too much overhead for what is mostly very small forms.

One thing I would like to experiment with is putting the "common" fields (if, tag and ignore_failure) into their own section, possibly behind a toggle. WDYT @alisonelizabeth and @mdefazio ?

I'll defer to Michael, but I think that makes sense and would be interested in seeing how that would look.

Currently the only way to add an on-failure processor is through the more menu on the processor itself. I think this is sufficient for now as we may need a bit more thinking around how we would want to introduce that concept into a form.

👍

Copy link
Contributor

@alisonelizabeth alisonelizabeth left a comment

Choose a reason for hiding this comment

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

Latest changes LGTM. Nice job!

I had two suggestions, but not blocking:

  • The append processor accepts an array for the value field. It might make more sense to use the combo box here instead of a text input.
  • It might be nice to add some client validation for the dot_expander processor, to ensure the field contains at least one . character.

Another thought - I don't want to speak for the docs team, but I wonder if it would be easier for them to review the copy as part of this PR, rather than all of the forms at once.

@jloleysens
Copy link
Contributor Author

@esdocs

Would it be possible to get review on new copy added in this PR? Most of the new copy added is in x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/components/manage_processor_form/processors.

@jloleysens
Copy link
Contributor Author

@alisonelizabeth Excellent points I'll address both of them (append and dot expander) and reach out to es-docs for review.

@jloleysens
Copy link
Contributor Author

@elasticmachine merge upstream

@jloleysens jloleysens closed this Aug 13, 2020
@jloleysens jloleysens reopened this Aug 13, 2020
@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Build metrics

@kbn/optimizer bundle module count

id value diff baseline
ingestPipelines 390 +15 375

async chunks size

id value diff baseline
ingestPipelines 643.9KB +33.9KB 610.0KB

page load bundle size

id value diff baseline
ingestPipelines 32.7KB +489.0B 32.2KB

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@jloleysens jloleysens merged commit 50f3328 into elastic:master Aug 13, 2020
@jloleysens jloleysens deleted the ingest-pipelines/processor-forms-a-d branch August 13, 2020 12:57
jloleysens added a commit to jloleysens/kibana that referenced this pull request Aug 13, 2020
* First few processors of the first batch

- Also refactored options to live in scoped objects to avoid
  overriding type (important fix!)
- Have not polished copy or form layout.

* add type to shared imports

* Refactors for repeated fields and added forms

- date_index_name
- dissect
- dot_expander
- drop

Fields refactored:

- Field
- Ignore missing

* Fix broken imports and some other small refactors

* added text editor field and updated pattern and if fields

* Large copy improvements and updates and other small refactors

- Added help text for all fields
- Updated layout so that required fields are always on first
- Replaced circle radio group with a select drop down

* update circle shape type field to select

* Added "long" option for convert type

* fix path import

* fix types and i18n

* add validation for dot expander fix append value to be a combobox

* fix i18n

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
@sebelga
Copy link
Contributor

sebelga commented Aug 13, 2020

Currently still investigating a good solution. I've also reached out to @sebelga and I think this should be addressed as a separate PR as we probably won't need to do this work at the individual form level.

I created #74950 to track this enhancement @jloleysens @alisonelizabeth

gmmorris added a commit to gmmorris/kibana that referenced this pull request Aug 13, 2020
* upstream/master: (45 commits)
  [Metrics UI] Fix inventory footer misalignment (elastic#74707)
  Remove legacy optimizer (elastic#73154)
  Update design-specific GH code-owners (elastic#74877)
  skip test Reporting paginates content elastic#74922
  [Metrics UI] Add Jest tests for alert previews (elastic#74890)
  Fixed tooltip (elastic#74074)
  [Ingest Pipelines] Processor forms for processors A-D (elastic#72849)
  [Observability] change ingest manager link (elastic#74928)
  [Task manager] Prevents edge case where already running tasks are reschedule every polling interval (elastic#74606)
  [Security Solution] Fix the status of timelines' bulk actions (elastic#74560)
  Data plugin: Suggested enhance pattern (elastic#74505)
  Use jest.useFakeTimers instead of hard coded timeout for tooltip tests. (elastic#74642)
  [Security Solution][lists] Adds tests for exception lists and items part 2 (elastic#74815)
  [Security Solution][Resolver] fix presentation role on edgeline (elastic#74869)
  [Security Solution][Detections] Refactor ML calls for newest ML permissions (elastic#74582)
  [bin/kibana-plugin] support KP plugins instead (elastic#74604)
  Reduce number of indexed fields in index pattern saved object (elastic#74817)
  [reporting] Pass along generic parameters in high-order route handler (elastic#74892)
  Migrated last pieces of legacy fixture code (elastic#74470)
  Empty index patterns page re-design  (elastic#68819)
  ...
jloleysens added a commit that referenced this pull request Aug 14, 2020
* First few processors of the first batch

- Also refactored options to live in scoped objects to avoid
  overriding type (important fix!)
- Have not polished copy or form layout.

* add type to shared imports

* Refactors for repeated fields and added forms

- date_index_name
- dissect
- dot_expander
- drop

Fields refactored:

- Field
- Ignore missing

* Fix broken imports and some other small refactors

* added text editor field and updated pattern and if fields

* Large copy improvements and updates and other small refactors

- Added help text for all fields
- Updated layout so that required fields are always on first
- Replaced circle radio group with a select drop down

* update circle shape type field to select

* Added "long" option for convert type

* fix path import

* fix types and i18n

* add validation for dot expander fix append value to be a combobox

* fix i18n

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
@jrodewig jrodewig requested review from jrodewig and lockewritesdocs and removed request for jrodewig August 19, 2020 17:13
@jrodewig
Copy link
Contributor

Hey @jloleysens -- @lockewritesdocs agreed to look at the UI copy for this one. I'll handle #75054. Thanks for bringing this to our attention!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Ingest Node Pipelines Ingest node pipelines management release_note:skip Skip the PR/issue when compiling release notes Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more v7.10.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants