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

[Maps] fix bug where toggling Scaling type does not re-fetch data #63326

Merged
merged 4 commits into from
Apr 13, 2020

Conversation

nreese
Copy link
Contributor

@nreese nreese commented Apr 13, 2020

Steps to view problem

  1. Create new map and add ES Documents layer for sample web logs source. Leave default "Scaling" value of "Show clusters". Click "Add layer"
  2. Set time range to "6 months ago to 6 months from now". These are both relative times for the "to" and "from"
  3. In the layer editor, toggle "Scaling" value between "Limit results to 10000" and "Show clusters".
  4. Notice how clusters do not show up when switching to "Show clusters".

This is caused because BlendedVectorLayer checks canSkipSourceUpdate to avoid fecthing count when no update is needed. The problem is that previous data requests from the first clusters source is still in the layer descriptor so syncData returns early and does not return geojson for clusters.

This PR resolves the problem by resetting __dataRequests when source prop change changes layer type.

@nreese nreese added release_note:fix [Deprecated-Use Team:Presentation]Team:Geo Former Team Label for Geo Team. Now use Team:Presentation v8.0.0 v7.8.0 labels Apr 13, 2020
@nreese nreese requested a review from kindsun April 13, 2020 01:55
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-gis (Team:Geo)

@nreese nreese requested a review from a team as a code owner April 13, 2020 12:22
@nreese nreese requested a review from kindsun April 13, 2020 15:37
@kibanamachine
Copy link
Contributor

💚 Build Succeeded

History

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

Copy link
Contributor

@kindsun kindsun left a comment

Choose a reason for hiding this comment

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

lgtm! thanks for the clean up

  • code review
  • tested locally in chrome

@nreese nreese merged commit 3623875 into elastic:master Apr 13, 2020
nreese added a commit to nreese/kibana that referenced this pull request Apr 13, 2020
…astic#63326)

* [Maps] fix bug where toggling Scaling type does not re-fetch data

* reset to empty array instead of deleting

* move setting of layer type to action creator instead of side effect of UPDATE_SOURCE_PROP

* review feedback
nreese added a commit that referenced this pull request Apr 13, 2020
…3326) (#63414)

* [Maps] fix bug where toggling Scaling type does not re-fetch data

* reset to empty array instead of deleting

* move setting of layer type to action creator instead of side effect of UPDATE_SOURCE_PROP

* review feedback
gmmorris added a commit to gmmorris/kibana that referenced this pull request Apr 14, 2020
* master: (132 commits)
  document code splitting for client code (elastic#62593)
  Escape single quotes surrounded by double quotes (elastic#63229)
  [Endpoint] Update cli mapping to match endpoint package (elastic#63372)
  update in-app links to metricbeat configuration docs (elastic#63295)
  investigation notes field (documentation / metadata) (elastic#63386)
  [Maps] fix bug where toggling Scaling type does not re-fetch data (elastic#63326)
  [Alerting] set correct parameter for unauthented email action (elastic#63086)
  [Telemetry] force staging urls in tests (elastic#63356)
  Migrate legacy maps service to NP & update refs (elastic#60942)
  Fix task manager query to return tasks to retry (elastic#63360)
  [Endpoint] Policy list support for URL pagination state (elastic#63291)
  [Canvas] Migrate saved object mappings and migrations to Kibana Platform (elastic#58891)
  [DOCS] Add ILM tutorial (elastic#59502)
  [Maps] Add SOURCE_TYPES enumeration (elastic#62975)
  [Maps] update geospatial filters to use geo_shape query for geo_point fields (elastic#62966)
  Move away from npStart for embeddables in canvas (elastic#62680)
  Use MapInput type from Maps plugin (elastic#61539)
  Update to pagination for workpad and templates (elastic#62050)
  [SIEM] Fix AlertsTable id (elastic#63368)
  Consistent terminology around cypress test data (elastic#63279)
  ...
gmmorris added a commit to gmmorris/kibana that referenced this pull request Apr 14, 2020
* master:
  document code splitting for client code (elastic#62593)
  Escape single quotes surrounded by double quotes (elastic#63229)
  [Endpoint] Update cli mapping to match endpoint package (elastic#63372)
  update in-app links to metricbeat configuration docs (elastic#63295)
  investigation notes field (documentation / metadata) (elastic#63386)
  [Maps] fix bug where toggling Scaling type does not re-fetch data (elastic#63326)
  [Alerting] set correct parameter for unauthented email action (elastic#63086)
  [Telemetry] force staging urls in tests (elastic#63356)
  Migrate legacy maps service to NP & update refs (elastic#60942)
  Fix task manager query to return tasks to retry (elastic#63360)
  [Endpoint] Policy list support for URL pagination state (elastic#63291)
  [Canvas] Migrate saved object mappings and migrations to Kibana Platform (elastic#58891)
  [DOCS] Add ILM tutorial (elastic#59502)
  [Maps] Add SOURCE_TYPES enumeration (elastic#62975)
  [Maps] update geospatial filters to use geo_shape query for geo_point fields (elastic#62966)
  Move away from npStart for embeddables in canvas (elastic#62680)
wayneseymour pushed a commit that referenced this pull request Apr 15, 2020
…3326)

* [Maps] fix bug where toggling Scaling type does not re-fetch data

* reset to empty array instead of deleting

* move setting of layer type to action creator instead of side effect of UPDATE_SOURCE_PROP

* review feedback
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Deprecated-Use Team:Presentation]Team:Geo Former Team Label for Geo Team. Now use Team:Presentation release_note:fix v7.8.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants