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

[Discover] Redirect if no data views #123366

Merged
merged 8 commits into from
Jan 27, 2022

Conversation

majagrubic
Copy link
Contributor

@majagrubic majagrubic commented Jan 19, 2022

Summary

Addresses: #112109

This PR adds a redirect to existing Analytics overview page if no data and no data views are present.
As discussed in the issue above, the isNewKibanaInstance check should be extracted in a separate service. I will address this in a separate PR.

Checklist

Delete any items that are not applicable to this PR.

- [ ] Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support
- [ ] Documentation was added for features that require explanation or tutorials

  • Unit or functional tests were updated or added to match the most common scenarios
    - [ ] Any UI touched in this PR is usable by keyboard only (learn more about keyboard accessibility)
    - [ ] Any UI touched in this PR does not create any new axe failures (run axe in browser: FF, Chrome)
    - [ ] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the docker list
    - [ ] This renders correctly on smaller devices using a responsive layout. (You can test this in your browser)
    - [ ] This was checked for cross-browser compatibility

Risk Matrix

Delete this section if it is not applicable to this PR.

Before closing this PR, invite QA, stakeholders, and other developers to identify risks that should be tested prior to the change/feature release.

When forming the risk matrix, consider some of the following examples and how they may potentially impact the change:

Risk Probability Severity Mitigation/Notes
Multiple Spaces—unexpected behavior in non-default Kibana Space. Low High Integration tests will verify that all features are still supported in non-default Kibana Space and when user switches between spaces.
Multiple nodes—Elasticsearch polling might have race conditions when multiple Kibana nodes are polling for the same tasks. High Low Tasks are idempotent, so executing them multiple times will not result in logical error, but will degrade performance. To test for this case we add plenty of unit tests around this logic and document manual testing procedure.
Code should gracefully handle cases when feature X or plugin Y are disabled. Medium High Unit tests will verify that any feature flag or plugin combination still results in our service operational.
See more potential risk examples

For maintainers

@majagrubic
Copy link
Contributor Author

@elasticmachine merge upstream

@majagrubic majagrubic added v8.2.0 Feature:Discover Discover Application release_note:feature Makes this part of the condensed release notes labels Jan 20, 2022
@majagrubic majagrubic marked this pull request as ready for review January 20, 2022 13:33
@majagrubic majagrubic requested a review from a team as a code owner January 20, 2022 13:33
@majagrubic majagrubic added v8.1.0 and removed v8.2.0 labels Jan 20, 2022
@kertal
Copy link
Member

kertal commented Jan 24, 2022

@elasticmachine merge upstream

Copy link
Contributor

@dimaanj dimaanj left a comment

Choose a reason for hiding this comment

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

Tested on a-la-carte, LGTM.

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
discover 330.8KB 331.0KB +240.0B
Unknown metric groups

References to deprecated APIs

id before after diff
discover 211 207 -4

History

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

@majagrubic majagrubic requested a review from kertal January 27, 2022 05:23
Copy link
Member

@kertal kertal left a comment

Choose a reason for hiding this comment

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

Code LGTM, thx for the code-simplification 👍 . Tested a-la-carte, Chrome, Safari, works as expected.
I'd recommend to adapt the title + description of the PR, since it's redirecting when there's no data view available, but there could be data available

@kertal
Copy link
Member

kertal commented Jan 27, 2022

only question: what's your team label? Or is this still DataDiscovery.team work?

@majagrubic majagrubic added the Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience) label Jan 27, 2022
@majagrubic majagrubic changed the title [Discover] Redirect if new Kibana instance [Discover] Redirect if no data views Jan 27, 2022
@majagrubic majagrubic merged commit baa6510 into elastic:main Jan 27, 2022
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Jan 27, 2022
@majagrubic majagrubic deleted the discover-empty-state branch January 27, 2022 14:06
awahab07 pushed a commit to awahab07/kibana that referenced this pull request Jan 31, 2022
* [Discover] Redirect if new Kibana instance

* Add a functional test

* Remove state; add redirect

* Code polishing

Co-authored-by: Kibana Machine <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting Feature:Discover Discover Application release_note:feature Makes this part of the condensed release notes Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience) v8.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants