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

Add enrich policy endpoint definitions and support for registering X-Pack processors to Console #48258

Merged
merged 5 commits into from
Oct 16, 2019

Conversation

jakelandis
Copy link
Contributor

Summary

This commit adds support to console for Enrich policies. https://www.elastic.co/guide/en/elasticsearch/reference/master/enrich-apis.html

Checklist

Use strikethroughs to remove checklist items you don't feel are applicable to this PR.

For maintainers

@jakelandis jakelandis added Feature:Console Dev Tools Console Feature v8.0.0 v7.5.0 labels Oct 15, 2019
@cjcenizal cjcenizal added Feature:Dev Tools Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more labels Oct 15, 2019
@elasticmachine
Copy link
Contributor

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

@cjcenizal cjcenizal added chore release_note:skip Skip the PR/issue when compiling release notes labels Oct 15, 2019
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@cjcenizal cjcenizal self-requested a review October 15, 2019 19:04
Copy link
Contributor

@cjcenizal cjcenizal left a comment

Choose a reason for hiding this comment

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

Thanks for doing this Jake! I'll implement my one suggestion and push to your branch unless you object.

}
}
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you want to prepopulate the type body with the required fields when a user selects match or geo_match from the autocomplete suggestions? If so, you can specify __template fields for these types like this:

{
  "enrich.put_policy": {
    "data_autocomplete_rules": {
      "geo_match": {
        "__template": {
          "indices": "",
          "match_field": "",
          "enrich_fields": []
        },
        "indices": "",
        "match_field": "",
        "enrich_fields": []
      },
      "match": {
        "__template": {
          "indices": "",
          "match_field": "",
          "enrich_fields": []
        },
        "indices": "",
        "match_field": "",
        "enrich_fields": []
      }
    }
  }
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes! thanks for adding it.

@cjcenizal
Copy link
Contributor

@jakelandis I've added the Enrich Processor definition. Does this look right to you?

image

@jakelandis
Copy link
Contributor Author

@cjcenizal - looking good. There are some common ones that apply to every processor "if", "ignore_failure", "on_failure", and "tag". Full doc here: https://www.elastic.co/guide/en/elasticsearch/reference/master/enrich-processor.html . Those should be included in the auto-complete help as well:

(screen shot from the drop processor, which only has the common options)
image

@cjcenizal
Copy link
Contributor

Thanks Jake! They are already included here: https://github.com/elastic/kibana/pull/48258/files#diff-53e7286e790789c23a871939f1bb6e16R8.

Here's a screenshot as proof (values shown are the default value that gets filled in once you select the autocomplete suggestion):

image

@jakelandis
Copy link
Contributor Author

@cjcenizal - thanks ! tested locally and changes LGTM. (however, I am not particularly qualified to comment on the js changes)

Copy link
Contributor

@cjcenizal cjcenizal left a comment

Choose a reason for hiding this comment

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

Let's get this merged to make feature freeze. @jloleysens Could you please take a look at this, even if it's merged by the time you get eyes on it?

@elasticmachine
Copy link
Contributor

💔 Build Failed

@cjcenizal
Copy link
Contributor

Retest

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@cjcenizal
Copy link
Contributor

Retest

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@cjcenizal cjcenizal merged commit ec38b0e into elastic:master Oct 16, 2019
@cjcenizal cjcenizal changed the title console: add enrich policy Add enrich policy endpoint definitions and support for registering X-Pack processors to Console Oct 16, 2019
@cjcenizal cjcenizal requested a review from jloleysens October 16, 2019 03:35
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

cjcenizal added a commit that referenced this pull request Oct 16, 2019
…Pack processors to Console (#48258) (#48358)

* Add template to put enrich policy override.
* Expose addProcessorDefinition method on Console plugin API.
* Add enrichProcessorDefinition.
Copy link
Contributor

@jloleysens jloleysens left a comment

Choose a reason for hiding this comment

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

@jakelandis and @cjcenizal

Thanks for the changes, the look good and make sense to me! Retroactive approval from my side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Feature:Console Dev Tools Console Feature Feature:Dev Tools 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.5.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants