-
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
[Maps] Provide ability to create MapEmbeddable directly from a map configuration #43878
Conversation
Pinging @elastic/kibana-gis |
Why does abstract Embeddable constructor reset the Why does the embeddable constructor even take |
💔 Build Failed |
We discussed offline but will summarize here for documentation.
It's setting up a listener on the parent so that when the parent changes, this child's input changes too, so it gets any new inherited or explicit input variables.
It only overwrites it if there is a parent, and will continue to update it when the parent changes. There might be a better way to code this to make this easier to understand. Do something like, if there is a parent, then only get input from the parent, don't take it as a constructor argument. I'm slightly suspicious that reseting the input is actually the right thing to do vs updating only the input parameters given by the parent explicitly (e.g. How to fix itThe issue was that the updates coming from the container were overwriting the updating initially passed in from the constructor. One way to fix that is to call But like I said, there might be an issue here where we really should only be calling cc @streamich |
💚 Build Succeeded |
💔 Build Failed |
retest |
💚 Build Succeeded |
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.
Best option for a near-term win. Nice work!
- code review
- tested locally in chrome
💚 Build Succeeded |
…nfiguration (elastic#43878) * [Maps] Provide ability to create MapEmbeddable directly from a map configuration * call updateInput instead of passing modified input to MapEmbeddable constructor * cleanup i18n translations * update map embeddable documenation to reflect createFromState examples
## Summary This PR uses the Embeddables API to embed a [Connections Map](#41504) on the Network Page of the SIEM App. A [Map Configuration](#43878) is generated on page load for configured Kibana Index Patterns that match the `siem:defaultIndex` setting in Kibana Advanced Settings, with a `Source`, `Destination`, and `Line` layer being created for each configured Kibana Index Pattern. Features includes: * Global KQL Bar Filtering * Global Timerange Filtering * Global Refresh * Click on a feature on the map to view details in tooltip * Line Selection: shows `Total Source/Destination Bytes` and `Total Documents` in tooltip * Source/Destination Selection: shows `host.name` and `host.ip` * Send filter to Global KQL Bar from Source/Destination feature tooltip (`host.name` and `host.ip`) * Informative error when index patterns aren't configured that links to specific beats setup documentation (e.g. [auditbeat setup docs](https://www.elastic.co/guide/en/beats/auditbeat/current/load-kibana-dashboards.html)) #### Dark Theme: ![image](https://user-images.githubusercontent.com/2946766/63667505-4dbe1900-c791-11e9-9b1e-9b690eafc405.png) #### Light Theme: ![image](https://user-images.githubusercontent.com/2946766/63667685-f2d8f180-c791-11e9-840e-6d3fbe0adaf2.png) ### Visual Feature Catalogue® <details><summary>Global KQL Bar Filtering</summary> ![pewpew_global_kql_filter](https://user-images.githubusercontent.com/2946766/63803146-72210f00-c8d1-11e9-951a-18571bbf9069.gif) </details> <details><summary>Global Timerange Filtering + Refreshing</summary> ![pewpew_global_time_filter](https://user-images.githubusercontent.com/2946766/63803214-9b419f80-c8d1-11e9-8349-e4f40fa39200.gif) </details> <details><summary>Filter on `host.name` or `host.ip` From Map Tooltip</summary> ![pewpew_filter_on_property](https://user-images.githubusercontent.com/2946766/63803302-d6dc6980-c8d1-11e9-990d-c364b53e247b.gif) </details> <details><summary>Using Field Formatters in Tooltip to link to Host/Network Details</summary> ![pewpew_field_formatter_links](https://user-images.githubusercontent.com/2946766/63803333-e65bb280-c8d1-11e9-9743-81165e0f78d7.gif) </details> <details><summary>Error displayed when Index Patterns aren't available</summary> ![image](https://user-images.githubusercontent.com/2946766/63804367-418ea480-c8d4-11e9-9357-73418a197809.png) </details> ### Checklist Use ~~strikethroughs~~ to remove checklist items you don't feel are applicable to this PR. - [x] This was checked for cross-browser compatibility, [including a check against IE11](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility) * Tested and all functionality works in Chrome/FF/Safari * IE11 fails to load map with `mapbox-gl.js` exception. Details: #44155 - [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/master/packages/kbn-i18n/README.md) - [ ] [Documentation](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#writing-documentation) was added for features that require explanation or tutorials * Not yet, but will work with @benskelker on this. - [x] [Unit or functional tests](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility) were updated or added to match the most common scenarios - [ ] ~This was checked for [keyboard-only and screenreader accessibility](https://developer.mozilla.org/en-US/docs/Learn/Tools_and_testing/Cross_browser_testing/Accessibility#Accessibility_testing_checklist)~ ### For maintainers - [ ] ~This was checked for breaking API changes and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)~ - [x] This includes a feature addition or change that requires a release note and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)
## Summary This PR uses the Embeddables API to embed a [Connections Map](elastic#41504) on the Network Page of the SIEM App. A [Map Configuration](elastic#43878) is generated on page load for configured Kibana Index Patterns that match the `siem:defaultIndex` setting in Kibana Advanced Settings, with a `Source`, `Destination`, and `Line` layer being created for each configured Kibana Index Pattern. Features includes: * Global KQL Bar Filtering * Global Timerange Filtering * Global Refresh * Click on a feature on the map to view details in tooltip * Line Selection: shows `Total Source/Destination Bytes` and `Total Documents` in tooltip * Source/Destination Selection: shows `host.name` and `host.ip` * Send filter to Global KQL Bar from Source/Destination feature tooltip (`host.name` and `host.ip`) * Informative error when index patterns aren't configured that links to specific beats setup documentation (e.g. [auditbeat setup docs](https://www.elastic.co/guide/en/beats/auditbeat/current/load-kibana-dashboards.html)) #### Dark Theme: ![image](https://user-images.githubusercontent.com/2946766/63667505-4dbe1900-c791-11e9-9b1e-9b690eafc405.png) #### Light Theme: ![image](https://user-images.githubusercontent.com/2946766/63667685-f2d8f180-c791-11e9-840e-6d3fbe0adaf2.png) ### Visual Feature Catalogue® <details><summary>Global KQL Bar Filtering</summary> ![pewpew_global_kql_filter](https://user-images.githubusercontent.com/2946766/63803146-72210f00-c8d1-11e9-951a-18571bbf9069.gif) </details> <details><summary>Global Timerange Filtering + Refreshing</summary> ![pewpew_global_time_filter](https://user-images.githubusercontent.com/2946766/63803214-9b419f80-c8d1-11e9-8349-e4f40fa39200.gif) </details> <details><summary>Filter on `host.name` or `host.ip` From Map Tooltip</summary> ![pewpew_filter_on_property](https://user-images.githubusercontent.com/2946766/63803302-d6dc6980-c8d1-11e9-990d-c364b53e247b.gif) </details> <details><summary>Using Field Formatters in Tooltip to link to Host/Network Details</summary> ![pewpew_field_formatter_links](https://user-images.githubusercontent.com/2946766/63803333-e65bb280-c8d1-11e9-9743-81165e0f78d7.gif) </details> <details><summary>Error displayed when Index Patterns aren't available</summary> ![image](https://user-images.githubusercontent.com/2946766/63804367-418ea480-c8d4-11e9-9357-73418a197809.png) </details> ### Checklist Use ~~strikethroughs~~ to remove checklist items you don't feel are applicable to this PR. - [x] This was checked for cross-browser compatibility, [including a check against IE11](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility) * Tested and all functionality works in Chrome/FF/Safari * IE11 fails to load map with `mapbox-gl.js` exception. Details: elastic#44155 - [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/master/packages/kbn-i18n/README.md) - [ ] [Documentation](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#writing-documentation) was added for features that require explanation or tutorials * Not yet, but will work with @benskelker on this. - [x] [Unit or functional tests](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility) were updated or added to match the most common scenarios - [ ] ~This was checked for [keyboard-only and screenreader accessibility](https://developer.mozilla.org/en-US/docs/Learn/Tools_and_testing/Cross_browser_testing/Accessibility#Accessibility_testing_checklist)~ ### For maintainers - [ ] ~This was checked for breaking API changes and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)~ - [x] This includes a feature addition or change that requires a release note and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)
## Summary This PR uses the Embeddables API to embed a [Connections Map](elastic#41504) on the Network Page of the SIEM App. A [Map Configuration](elastic#43878) is generated on page load for configured Kibana Index Patterns that match the `siem:defaultIndex` setting in Kibana Advanced Settings, with a `Source`, `Destination`, and `Line` layer being created for each configured Kibana Index Pattern. Features includes: * Global KQL Bar Filtering * Global Timerange Filtering * Global Refresh * Click on a feature on the map to view details in tooltip * Line Selection: shows `Total Source/Destination Bytes` and `Total Documents` in tooltip * Source/Destination Selection: shows `host.name` and `host.ip` * Send filter to Global KQL Bar from Source/Destination feature tooltip (`host.name` and `host.ip`) * Informative error when index patterns aren't configured that links to specific beats setup documentation (e.g. [auditbeat setup docs](https://www.elastic.co/guide/en/beats/auditbeat/current/load-kibana-dashboards.html)) #### Dark Theme: ![image](https://user-images.githubusercontent.com/2946766/63667505-4dbe1900-c791-11e9-9b1e-9b690eafc405.png) #### Light Theme: ![image](https://user-images.githubusercontent.com/2946766/63667685-f2d8f180-c791-11e9-840e-6d3fbe0adaf2.png) ### Visual Feature Catalogue® <details><summary>Global KQL Bar Filtering</summary> ![pewpew_global_kql_filter](https://user-images.githubusercontent.com/2946766/63803146-72210f00-c8d1-11e9-951a-18571bbf9069.gif) </details> <details><summary>Global Timerange Filtering + Refreshing</summary> ![pewpew_global_time_filter](https://user-images.githubusercontent.com/2946766/63803214-9b419f80-c8d1-11e9-8349-e4f40fa39200.gif) </details> <details><summary>Filter on `host.name` or `host.ip` From Map Tooltip</summary> ![pewpew_filter_on_property](https://user-images.githubusercontent.com/2946766/63803302-d6dc6980-c8d1-11e9-990d-c364b53e247b.gif) </details> <details><summary>Using Field Formatters in Tooltip to link to Host/Network Details</summary> ![pewpew_field_formatter_links](https://user-images.githubusercontent.com/2946766/63803333-e65bb280-c8d1-11e9-9743-81165e0f78d7.gif) </details> <details><summary>Error displayed when Index Patterns aren't available</summary> ![image](https://user-images.githubusercontent.com/2946766/63804367-418ea480-c8d4-11e9-9357-73418a197809.png) </details> ### Checklist Use ~~strikethroughs~~ to remove checklist items you don't feel are applicable to this PR. - [x] This was checked for cross-browser compatibility, [including a check against IE11](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility) * Tested and all functionality works in Chrome/FF/Safari * IE11 fails to load map with `mapbox-gl.js` exception. Details: elastic#44155 - [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/master/packages/kbn-i18n/README.md) - [ ] [Documentation](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#writing-documentation) was added for features that require explanation or tutorials * Not yet, but will work with @benskelker on this. - [x] [Unit or functional tests](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility) were updated or added to match the most common scenarios - [ ] ~This was checked for [keyboard-only and screenreader accessibility](https://developer.mozilla.org/en-US/docs/Learn/Tools_and_testing/Cross_browser_testing/Accessibility#Accessibility_testing_checklist)~ ### For maintainers - [ ] ~This was checked for breaking API changes and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)~ - [x] This includes a feature addition or change that requires a release note and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)
## Summary This PR uses the Embeddables API to embed a [Connections Map](#41504) on the Network Page of the SIEM App. A [Map Configuration](#43878) is generated on page load for configured Kibana Index Patterns that match the `siem:defaultIndex` setting in Kibana Advanced Settings, with a `Source`, `Destination`, and `Line` layer being created for each configured Kibana Index Pattern. Features includes: * Global KQL Bar Filtering * Global Timerange Filtering * Global Refresh * Click on a feature on the map to view details in tooltip * Line Selection: shows `Total Source/Destination Bytes` and `Total Documents` in tooltip * Source/Destination Selection: shows `host.name` and `host.ip` * Send filter to Global KQL Bar from Source/Destination feature tooltip (`host.name` and `host.ip`) * Informative error when index patterns aren't configured that links to specific beats setup documentation (e.g. [auditbeat setup docs](https://www.elastic.co/guide/en/beats/auditbeat/current/load-kibana-dashboards.html)) #### Dark Theme: ![image](https://user-images.githubusercontent.com/2946766/63667505-4dbe1900-c791-11e9-9b1e-9b690eafc405.png) #### Light Theme: ![image](https://user-images.githubusercontent.com/2946766/63667685-f2d8f180-c791-11e9-840e-6d3fbe0adaf2.png) ### Visual Feature Catalogue® <details><summary>Global KQL Bar Filtering</summary> ![pewpew_global_kql_filter](https://user-images.githubusercontent.com/2946766/63803146-72210f00-c8d1-11e9-951a-18571bbf9069.gif) </details> <details><summary>Global Timerange Filtering + Refreshing</summary> ![pewpew_global_time_filter](https://user-images.githubusercontent.com/2946766/63803214-9b419f80-c8d1-11e9-8349-e4f40fa39200.gif) </details> <details><summary>Filter on `host.name` or `host.ip` From Map Tooltip</summary> ![pewpew_filter_on_property](https://user-images.githubusercontent.com/2946766/63803302-d6dc6980-c8d1-11e9-990d-c364b53e247b.gif) </details> <details><summary>Using Field Formatters in Tooltip to link to Host/Network Details</summary> ![pewpew_field_formatter_links](https://user-images.githubusercontent.com/2946766/63803333-e65bb280-c8d1-11e9-9743-81165e0f78d7.gif) </details> <details><summary>Error displayed when Index Patterns aren't available</summary> ![image](https://user-images.githubusercontent.com/2946766/63804367-418ea480-c8d4-11e9-9357-73418a197809.png) </details> ### Checklist Use ~~strikethroughs~~ to remove checklist items you don't feel are applicable to this PR. - [x] This was checked for cross-browser compatibility, [including a check against IE11](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility) * Tested and all functionality works in Chrome/FF/Safari * IE11 fails to load map with `mapbox-gl.js` exception. Details: #44155 - [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/master/packages/kbn-i18n/README.md) - [ ] [Documentation](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#writing-documentation) was added for features that require explanation or tutorials * Not yet, but will work with @benskelker on this. - [x] [Unit or functional tests](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility) were updated or added to match the most common scenarios - [ ] ~This was checked for [keyboard-only and screenreader accessibility](https://developer.mozilla.org/en-US/docs/Learn/Tools_and_testing/Cross_browser_testing/Accessibility#Accessibility_testing_checklist)~ ### For maintainers - [ ] ~This was checked for breaking API changes and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)~ - [x] This includes a feature addition or change that requires a release note and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)
## Summary This PR uses the Embeddables API to embed a [Connections Map](#41504) on the Network Page of the SIEM App. A [Map Configuration](#43878) is generated on page load for configured Kibana Index Patterns that match the `siem:defaultIndex` setting in Kibana Advanced Settings, with a `Source`, `Destination`, and `Line` layer being created for each configured Kibana Index Pattern. Features includes: * Global KQL Bar Filtering * Global Timerange Filtering * Global Refresh * Click on a feature on the map to view details in tooltip * Line Selection: shows `Total Source/Destination Bytes` and `Total Documents` in tooltip * Source/Destination Selection: shows `host.name` and `host.ip` * Send filter to Global KQL Bar from Source/Destination feature tooltip (`host.name` and `host.ip`) * Informative error when index patterns aren't configured that links to specific beats setup documentation (e.g. [auditbeat setup docs](https://www.elastic.co/guide/en/beats/auditbeat/current/load-kibana-dashboards.html)) #### Dark Theme: ![image](https://user-images.githubusercontent.com/2946766/63667505-4dbe1900-c791-11e9-9b1e-9b690eafc405.png) #### Light Theme: ![image](https://user-images.githubusercontent.com/2946766/63667685-f2d8f180-c791-11e9-840e-6d3fbe0adaf2.png) ### Visual Feature Catalogue® <details><summary>Global KQL Bar Filtering</summary> ![pewpew_global_kql_filter](https://user-images.githubusercontent.com/2946766/63803146-72210f00-c8d1-11e9-951a-18571bbf9069.gif) </details> <details><summary>Global Timerange Filtering + Refreshing</summary> ![pewpew_global_time_filter](https://user-images.githubusercontent.com/2946766/63803214-9b419f80-c8d1-11e9-8349-e4f40fa39200.gif) </details> <details><summary>Filter on `host.name` or `host.ip` From Map Tooltip</summary> ![pewpew_filter_on_property](https://user-images.githubusercontent.com/2946766/63803302-d6dc6980-c8d1-11e9-990d-c364b53e247b.gif) </details> <details><summary>Using Field Formatters in Tooltip to link to Host/Network Details</summary> ![pewpew_field_formatter_links](https://user-images.githubusercontent.com/2946766/63803333-e65bb280-c8d1-11e9-9743-81165e0f78d7.gif) </details> <details><summary>Error displayed when Index Patterns aren't available</summary> ![image](https://user-images.githubusercontent.com/2946766/63804367-418ea480-c8d4-11e9-9357-73418a197809.png) </details> ### Checklist Use ~~strikethroughs~~ to remove checklist items you don't feel are applicable to this PR. - [x] This was checked for cross-browser compatibility, [including a check against IE11](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility) * Tested and all functionality works in Chrome/FF/Safari * IE11 fails to load map with `mapbox-gl.js` exception. Details: #44155 - [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/master/packages/kbn-i18n/README.md) - [ ] [Documentation](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#writing-documentation) was added for features that require explanation or tutorials * Not yet, but will work with @benskelker on this. - [x] [Unit or functional tests](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility) were updated or added to match the most common scenarios - [ ] ~This was checked for [keyboard-only and screenreader accessibility](https://developer.mozilla.org/en-US/docs/Learn/Tools_and_testing/Cross_browser_testing/Accessibility#Accessibility_testing_checklist)~ ### For maintainers - [ ] ~This was checked for breaking API changes and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)~ - [x] This includes a feature addition or change that requires a release note and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)
fixes #43834
Adds
createFromState
method toMapEmbeddableFactory
so map embeddables can be created from javascript objects instead of requiring saved objects. This will be useful for applications like SIEM and APM that want to embed maps that are programmatically defined and do not need to be saved in.kibana
index.Usage
cc @spong @ogupte