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

[Drilldowns] Dashboard state fixes for drilldowns #61457

Merged
merged 11 commits into from
Apr 3, 2020

Conversation

Dosant
Copy link
Contributor

@Dosant Dosant commented Mar 26, 2020

Summary

Part of #61230
Some fixes to dashboard state to support drilldowns and navigation from one dashboard to another

Fixed issues:

  1. Change logic around deciding wether to use time from url or from saved object. Previously code looked only into if _g is present in the url at all. And didn't consider edge case if time or refreshInterval is missing in _g

  2. Fix initial syncing of time from savedobject causing redundant history record. _This changed caused order of _a and g params in url change. One test was affected by it because it relied on the order. I don't think it should be considered breaking as order app puts it's query params shouldn't matter.

  3. Fix another race condition between state syncing with url and angular controller $destroy. Similar fix was done before in Navigation from unsaved dashboard to recently used fails #57795, but this on covers case when we stay within dashboard app, but change dashboard

  4. Fix initial panel state migration causing redundant browser history records

Known not fixed issues:

  1. Looks like maps embeddable updates input during initial rendering and causes redundant history records breaking back button. [Drilldowns] Dashboard broken back button if embeddable update input during initial rendering  #61596

Checklist

Delete any items that are not applicable to this PR.

For maintainers

@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app-arch (Team:AppArch)

@Dosant Dosant added release_note:skip Skip the PR/issue when compiling release notes Feature:Drilldowns Embeddable panel Drilldowns Feature:Dashboard Dashboard related features v7.8.0 v8.0.0 labels Mar 26, 2020
@Dosant Dosant force-pushed the dev/drilldowns/dashboard-state-fixes branch from 8778384 to 71fe97c Compare March 27, 2020 10:28
@Dosant Dosant marked this pull request as ready for review March 27, 2020 12:28
@Dosant
Copy link
Contributor Author

Dosant commented Mar 30, 2020

@elasticmachine merge upstream

elasticmachine and others added 4 commits March 30, 2020 04:35
…s/dashboard-state-fixes

# Conflicts:
#	src/legacy/core_plugins/kibana/public/dashboard/np_ready/url_helper.test.ts
#	src/legacy/core_plugins/kibana/public/dashboard/np_ready/url_helper.ts
…ant/kibana into dev/drilldowns/dashboard-state-fixes
@flash1293
Copy link
Contributor

I have started reviewing this, will finish tomorrow morning.

Copy link
Contributor

@flash1293 flash1293 left a comment

Choose a reason for hiding this comment

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

Tested, added a few nits, but nothing important. The only actual issue is the last comment

@Dosant Dosant requested a review from flash1293 April 1, 2020 16:15
@Dosant Dosant mentioned this pull request Apr 2, 2020
7 tasks
Copy link
Contributor

@flash1293 flash1293 left a comment

Choose a reason for hiding this comment

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

LGTM, tested in Chrome and couldn't find strange history entries anymore.

Added one comment about the regex, but not mandatory to fix that one.

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

History

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

@Dosant Dosant added the v7.7.0 label Apr 3, 2020
@Dosant Dosant merged commit ea7a81d into elastic:master Apr 3, 2020
@Dosant Dosant added the bug Fixes for quality problems that affect the customer experience label Apr 3, 2020
Dosant added a commit to Dosant/kibana that referenced this pull request Apr 3, 2020
1. Change logic around deciding wether to use time from url or from saved object. Previously code looked only into if _g is present in the url at all. And didn't consider edge case if time or refreshInterval is missing in _g

2. Fix initial syncing of time from savedobject causing redundant history record. _This changed caused order of _a and g params in url change. One test was affected by it because it relied on the order. I don't think it should be considered breaking as order app puts it's query params shouldn't matter.

3. Fix another race condition between state syncing with url and angular controller $destroy. Similar fix was done before in elastic#57795, but this on covers case when we stay within dashboard app, but change dashboard

4. Fix initial panel state migration causing redundant browser history records

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Dosant added a commit to Dosant/kibana that referenced this pull request Apr 3, 2020
1. Change logic around deciding wether to use time from url or from saved object. Previously code looked only into if _g is present in the url at all. And didn't consider edge case if time or refreshInterval is missing in _g

2. Fix initial syncing of time from savedobject causing redundant history record. _This changed caused order of _a and g params in url change. One test was affected by it because it relied on the order. I don't think it should be considered breaking as order app puts it's query params shouldn't matter.

3. Fix another race condition between state syncing with url and angular controller $destroy. Similar fix was done before in elastic#57795, but this on covers case when we stay within dashboard app, but change dashboard

4. Fix initial panel state migration causing redundant browser history records

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
gmmorris added a commit to gmmorris/kibana that referenced this pull request Apr 3, 2020
* master:
  [Drilldowns] Dashboard state fixes for drilldowns (elastic#61457)
  allow null for filterQuery (elastic#62310)
  [ML] call job validation endpoint with complete payload (elastic#62331)
  removing configuration from agents (elastic#62290)
  Allow Enterprise license for service map (elastic#62371)
  docs: updates to apm agent config (elastic#61893)
  [Ingest] Fix package info request returning 500 (elastic#61712)
  move crypto to server utils (elastic#62344)
  Start indexing documents by default (elastic#62159)
  [Endpoint] Update host field accordion (elastic#61878)
  Add more definitions about Ingest Management (elastic#62049)
Dosant added a commit that referenced this pull request Apr 3, 2020
1. Change logic around deciding wether to use time from url or from saved object. Previously code looked only into if _g is present in the url at all. And didn't consider edge case if time or refreshInterval is missing in _g

2. Fix initial syncing of time from savedobject causing redundant history record. _This changed caused order of _a and g params in url change. One test was affected by it because it relied on the order. I don't think it should be considered breaking as order app puts it's query params shouldn't matter.

3. Fix another race condition between state syncing with url and angular controller $destroy. Similar fix was done before in #57795, but this on covers case when we stay within dashboard app, but change dashboard

4. Fix initial panel state migration causing redundant browser history records

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

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Dosant added a commit that referenced this pull request Apr 3, 2020
1. Change logic around deciding wether to use time from url or from saved object. Previously code looked only into if _g is present in the url at all. And didn't consider edge case if time or refreshInterval is missing in _g

2. Fix initial syncing of time from savedobject causing redundant history record. _This changed caused order of _a and g params in url change. One test was affected by it because it relied on the order. I don't think it should be considered breaking as order app puts it's query params shouldn't matter.

3. Fix another race condition between state syncing with url and angular controller $destroy. Similar fix was done before in #57795, but this on covers case when we stay within dashboard app, but change dashboard

4. Fix initial panel state migration causing redundant browser history records

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

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
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 Feature:Dashboard Dashboard related features Feature:Drilldowns Embeddable panel Drilldowns release_note:skip Skip the PR/issue when compiling release notes v7.7.0 v7.8.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants