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

[Ingest Manager] Integrate beta messaging with Add Data #71147

Merged
merged 14 commits into from
Jul 9, 2020

Conversation

jen-huang
Copy link
Contributor

@jen-huang jen-huang commented Jul 8, 2020

Resolves #69048
Resolves #70384

Summary

This PR adds Ingest Manager Beta messaging to Kibana's Add Data tutorial directory and tutorial module pages:

  • Adds methods to HomePublicPluginSetup interface that allows for custom components to be injected into Home > Add data:
    • tutorial.registerDirectoryNotice() registers a component that will be displayed on main Add data directory page
    • tutorial.registerDirectoryHeaderLink() registers a component that will be displayed on the right of Add data directory page title area
    • registerModuleNotice() registers a component that will be displayed under the description of an Add data module tutorial page
  • Adds moduleName?: string; to TutorialSchema and surface the module name of existing tutorials, where applicable (I believe a few tutorials are not associated with modules, such as EMS Boundaries)
    • This field is used to look up whether we have a package with a matching name in Ingest Manager. Most tutorials already had a local moduleName variable which I simply surfaced. I attempted to add ones which didn't, and would appreciate reviews for those ones I added.
  • Adds home plugin as an optional dependency to Ingest Manager plugin
  • Creates Ingest Manager home integration components for all three methods above ^ and, if home plugin is available, registers them during Ingest Manager plugin setup() lifecycle
  • Adds has_seen_add_data_notice field to Ingest Manager global settings saved object
    • When Dismiss is clicked in the directory notice, has_seen_add_data_notice is set to true, preventing the notice from being seen again on refresh

Testing

  1. Go to Home > Add data, a dismissible callout should be seen about Ingest Manager Beta
  2. Click Dismiss, the callout should disappear and a link to Ingest Manager Beta appears on the right of page title
  3. Refresh the page, the callout should remain hidden and the link should remain visible
  4. Click into a tutorial card for a module that has a package associated with it, such as AWS Cloudwatch logs or MySQL logs
    • A messaging about Ingest Manager Beta should be shown below the tutorial description
  5. Click into a tutorial card for a module that does not have a package associated with it
    • No messaging should be shown about Ingest Manager in that tutorial description

If Ingest Manager is not available as a feature in the current space, no Ingest Manager Beta messaging should appear in Add data.

If you want to get the dismissible callout back, you can clear your setting by:

POST /api/ingest_manager/settings
{
  "has_seen_add_data_notice": false
}

Screenshots

Jul-08-2020 13-27-27

image

image

image

@jen-huang jen-huang self-assigned this Jul 8, 2020
@jen-huang jen-huang changed the title [WIP][Ingest Manager] Integrate beta messaging with Add Data [Ingest Manager] Integrate beta messaging with Add Data Jul 8, 2020
@jen-huang jen-huang added Feature:Add Data Add Data and sample data feature on Home release_note:skip Skip the PR/issue when compiling release notes Team:Fleet Team label for Observability Data Collection Fleet team v7.9.0 v8.0.0 labels Jul 8, 2020
@jen-huang jen-huang marked this pull request as ready for review July 8, 2020 20:40
@jen-huang jen-huang requested a review from a team as a code owner July 8, 2020 20:40
@jen-huang jen-huang requested a review from a team July 8, 2020 20:40
@elasticmachine
Copy link
Contributor

Pinging @elastic/ingest-management (Team:Ingest Management)

@jen-huang jen-huang added the REASSIGN from Team:Core UI Deprecated label for old Core UI team label Jul 8, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-core-ui (Team:Core UI)

@jen-huang jen-huang requested a review from a team July 8, 2020 20:40
Copy link
Contributor

@skh skh left a comment

Choose a reason for hiding this comment

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

This works as described, nice job! 👍

Also, thanks for the detailed testing description.

@jen-huang
Copy link
Contributor Author

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Build metrics

@kbn/optimizer bundle module count

id value diff baseline
ingestManager 363 +5 358

History

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

Copy link
Contributor

@myasonik myasonik left a comment

Choose a reason for hiding this comment

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

LGTM 🎉

@jen-huang jen-huang merged commit 9037018 into elastic:master Jul 9, 2020
@jen-huang jen-huang deleted the ingest/add-data branch July 9, 2020 19:54
jen-huang added a commit that referenced this pull request Jul 9, 2020
)

* Add methods to register directory notices and header links in tutorials, and use registered components when rendering tutorial directory

* Add methods to register module notices components in tutorial pages, and use registered components when rendering tutorial page

* Add `moduleName` field to server tutorial schema and test fixure

* Surface `moduleName` field from built in tutorials and registered apm tutorial

* Export component types

* Add KibanaContextProvider to home plugin app render

* Move setHttpClient to ingest manager plugin setup() method; add home as optional plugin dep; register tutorial module notice

* Fix key prop warnings

* Add dismissable tutorial directory notice and corresponding ingest manager global setting field

* Add tutorial directory header link and tie it to the state of the dismissible directory notice via observable

* Put spacing inside module notice component itself

* Check if ingest manager is available in current space

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
# Conflicts:
#	src/plugins/home/server/tutorials/oracle_metrics/index.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Add Data Add Data and sample data feature on Home REASSIGN from Team:Core UI Deprecated label for old Core UI team release_note:skip Skip the PR/issue when compiling release notes Team:Fleet Team label for Observability Data Collection Fleet team v7.9.0 v8.0.0
Projects
None yet
6 participants