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

"Fit Data Bounds" neglects filter settings #23261

Closed
DennisSnoek opened this issue Sep 18, 2018 · 21 comments · Fixed by #25040
Closed

"Fit Data Bounds" neglects filter settings #23261

DennisSnoek opened this issue Sep 18, 2018 · 21 comments · Fixed by #25040
Assignees
Labels
bug Fixes for quality problems that affect the customer experience [Deprecated-Use Team:Presentation]Team:Geo Former Team Label for Geo Team. Now use Team:Presentation regression Team:Visualizations Visualization editors, elastic-charts and infrastructure v6.7.0 v7.0.0 v7.2.0 v8.0.0

Comments

@DennisSnoek
Copy link

DennisSnoek commented Sep 18, 2018

Dear sir/madam,

We use ElasticCloud with ElasticSearch v6.4.0 and Kibana v6.4.0 (windows 10, google chrome)

Recently we updated our elastic cloud to version 6.4.0. In our dashboards we use the "coordinate map" several times and we make use of filters. When I selected certain data by filtering and than press the button "Fit Data Bounds" in a related coordinate map, it is not zooming to my selected data, while in version 6.3.0 this was working fine.
When I open the exact same coordinate map in "visualise" the "Fit Data Bounds" button is working fine (with the exact same data). This is true for several "coordinate maps".

So it seems that there is a minor bug in the execution of "Fit Data Bounds" button in the "dashboard" environment in version 6.4.0.

Can this issue be solved? I look forward hearing from you

Steps to reproduce:

  1. load data with geo info
  2. show data in coordinate map
  3. use "fit data bounds" to zoom in at the data (for example after using a filter)

Expected behavior:
Zooming at the location of the data

  • works in the "visualise" environment where the coordinate map is developed
  • does not work in the "dashboard" where the coordinate map is exploited

Screenshots (if relevant):
From "visualise" environment:
image

From dashboard environment (with exact same data and filter settings as far as i can see):
image

also posted here in elastic discussion

@tylersmalley tylersmalley added the [Deprecated-Use Team:Presentation]Team:Geo Former Team Label for Geo Team. Now use Team:Presentation label Sep 18, 2018
@tylersmalley
Copy link
Contributor

@elastic/kibana-gis

@DennisSnoek
Copy link
Author

Dear Tyler, Thomas or somebody else,

Is somebody working on this issue? Or does someone have a glue what can be the problem? Look forward hearing from someone.

With kind regards, Dennis

@thomasneirynck thomasneirynck added bug Fixes for quality problems that affect the customer experience and removed triage_needed labels Oct 2, 2018
@thomasneirynck
Copy link
Contributor

need to check if this is related to #17727 Looking into it.

@thomasneirynck
Copy link
Contributor

@thomasneirynck thomasneirynck added regression Team:Visualizations Visualization editors, elastic-charts and infrastructure labels Oct 5, 2018
@thomasneirynck
Copy link
Contributor

@DennisSnoek I can reproduce this issue.

In 6.4, fitting on a map when there are no filters applied, does not take into account the filter. This works correctly in older versions of Kibana.

@elastic/kibana-app any ideas on what might have changed from 6.3->6.4 that could have introduced this issue?

@thomasneirynck
Copy link
Contributor

thomasneirynck commented Oct 5, 2018

@timroes @ppisljar Is it possible that the angular refactors (re)-introduced this bug? (e.g. b04c2dc and the subsequent work)

The code for the initial fix, #17727, is no longer present in 6.4 onwards.

@wouterbac1
Copy link

Dear thomasneirynck, have you made any progress on investigating this issue. My customers are strongly complaining that this feature is no longer working in 6.4

@thomasneirynck
Copy link
Contributor

@ppisljar or @timroes did you have a chance to take a look at this?

@stacey-gammon
Copy link
Contributor

@rayafratkina - we decided to remove blocker label since this already existed in 6.4, right? Going to do so... lmk if I'm wrong!

@ppisljar ppisljar self-assigned this Nov 1, 2018
@rayafratkina
Copy link
Contributor

I am cool with removing the label, but we should still try to fix sooner rather than later...

@ppisljar
Copy link
Member

ppisljar commented Nov 2, 2018

@thomasneirynck i tried to take a look into this today, but i can not reproduce on latest master, here are the steps i am taking:

  • create new tile map visualization (makelogs) where data is there only for US
  • add it to dashboard, click 'fit bounds' ... and map updates its position and zoom to show only the US
  • use draw rectange to apply a filter over alaska only
  • click fit bounds again, it correctly zooms in to alaska

there are some errors shown (Cannot read property 'reduce' of undefined) however everything seems to function as expected.

i am taking a look into that error ... will keep you posted

@ppisljar ppisljar mentioned this issue Nov 2, 2018
2 tasks
@lukeelmers lukeelmers self-assigned this Nov 2, 2018
@lukeelmers
Copy link
Member

Okay I tested this too. Here are my findings:

  • 6.3.2 - works as expected
  • 6.4.2 - bug is present
  • master - appears to be working, but a different error appears as @ppisljar describes
  • PR fixing map bounds #25040 - bug is again present, though the undefined error is gone. (I'm looking at this and will comment on the PR in more detail)

6.3.2...
6 3 2

6.4.2...
6 4 2

master...
master

@marcosnr
Copy link

FYI, same error and screenshot following "getting started on kibana" video, adding sample data of flights, then adding a point map and trying to zoom... using elasticcloud default cluster template...Version: 6.5.1 latest

@wouterbac1
Copy link

Hi I updated the Elastic Cloud to version 6.5.4. However, the bug is still present. I though it was supposed to be fixed since version 6.5.2...

@lukeelmers
Copy link
Member

@wouterbac1 Thanks for pointing this out. I see the fix made v6.5.1.

After testing on Elastic Cloud using 6.5.1 I too am seeing the same toast error (Cannot read property 'reduce' of undefined) in the UI (in both "visualize" and "dashboard" apps), however, the actual functionality of fitting to the bounds and creating a filter based on a rectangle or polygon seems to be working as expected.

So it seems to me the error notification is a false positive (er, false negative?), and is a therefore a new regression we need to investigate -- but that the functionality described in this issue has still been fixed.

That said, I might be missing something... Aside from the error in the UI, are you experiencing any broken functionality on your end, as it relates to map zooming/fitting & filtering, either in visualize or dashboards?

@wouterbac1
Copy link

wouterbac1 commented Dec 28, 2018 via email

@lukeelmers
Copy link
Member

I tested again and am actually seeing different behavior when comparing a 6.5.1 cloud deployment (where this fix was released) to 6.5.4 (where @wouterbac1 initially saw the issue resurface) -- although I see no differences when comparing a kibana_dashboard_only user with an admin user. In both cases the results are consistent across users (see below).

Considering this no longer works on 6.5.4, I will reopen this as it remains a regression.

@ppisljar I'll defer to you on whether you think the toast UI error should be treated as a separate issue or not... feels like they are the same to me.

@wouterbac1 Feel free to chime in if I'm missing any information here or if your findings are different. Thanks again for catching this!

6.5.1

  • issue described here is fixed (zooming to bounds works correctly), for both admin and kibana_dashboard_only users
  • a toast error displays in the UI (Cannot read property 'reduce'...)
    kapture 2019-01-02 at 9 28 09 6 5 1

6.5.4

  • issue described here is not fixed (zooming to bounds does not work), for both admin and kibana_dashboard_only users
  • however, no toast error displays in the UI
    kapture 2019-01-02 at 9 31 22 6 5 4

@lukeelmers lukeelmers reopened this Jan 2, 2019
@LeeDr
Copy link

LeeDr commented Jan 30, 2019

Added blocker and v6.7.0 labels. We can reconsider if it can't be fixed in time.

@lukeelmers
Copy link
Member

lukeelmers commented Feb 5, 2019

Okay, I took a little time to revisit this. After further review & testing, I'm not convinced this issue was ever resolved in the first place (not even in 6.5.1/#25040, where it appeared to work, but still had a UI error notification as demonstrated above).

  • ✅ 6.3.2
  • 🚫 6.4.3 (First reported regression)
  • ❓6.5.1 (Appears fixed, except with a new error in the UI)
  • 🚫 6.5.4
  • 🚫 6.6.0
  • 🚫 6.x (6.7.0)
  • 🚫 master (7.0.0)

I can consistently reproduce the errors as follows:

  1. Create & save a new coordinate map vis.
  2. Create a new dashboard, add the saved map vis to it, and save the dashboard.
  3. Draw a rectangle or custom polygon on the map from the dashboard view & click the "fit to bounds" button.
  4. Nothing happens.
  5. Everything works in the visualize editor without issue, except in the case where a filter is added in the dashboard & pinned to all apps. Then you can reproduce the error back in visualize too (but only with the pinned filter, not with new ones).

I think there are some state issues happening where the request to ES is not setting the correct geo_bounding_box.

I'll continue to look into this and post back with updates, but it is unlikely this will be ready in time for 6.7. More likely 6.7.1, and we can backport aggressively to include in patch releases for older versions.

@lukeelmers
Copy link
Member

The cause of this issue appears to be that global filters[0] are not being applied during the call to ES that happens when you click to fit map data to the geo_bounding_box.

The regression occurred in 6.4 because we refactored the way searchSource was shared with visualizations, in an effort to keep out unused globals. The coordinate map vis is one of the only ones that is actually using searchSource to make a request in this very specific situation, hence the error.

We decided that, for the time being, we'll work around this limitation by attaching global queries/filters to the vis object, so that they can be accessed & added to searchSource within the visualization itself. This is not a long-term solution -- but it will resolve the issue in the meantime until we can do a more significant refactor.

[0] e.g. ones that are used in dashboard and/or pinned and then used in the visualize app

@lukeelmers lukeelmers removed the blocker label Feb 7, 2019
@lukeelmers
Copy link
Member

I've removed the blocker label here as we will not hold up a 6.7 release for this issue. That said, we are still expecting a fix for this to be merged in time for that release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience [Deprecated-Use Team:Presentation]Team:Geo Former Team Label for Geo Team. Now use Team:Presentation regression Team:Visualizations Visualization editors, elastic-charts and infrastructure v6.7.0 v7.0.0 v7.2.0 v8.0.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.