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

[Uptime] Shim UI exports for new platform #44722

Merged
merged 33 commits into from
Oct 3, 2019

Conversation

justinkambic
Copy link
Contributor

Summary

Per #44682 we are beginning work on the Uptime app's migration to the new platform.

The goal of this patch is to shim any usage of legacy ui exports in preparation for the move of the Uptime plugin to the new platform. In place of the old framework, we leverage the updated exports provided by the new platform's core.

Testing this PR

This patch should cause the plugin to run in the same manner as in master. As such there shouldn't need to be any test modifications or additions.

You should smoke test this by loading the application and running it normally. Ensure you can filter, search, drill into a monitor, etc., but aside from that there are no special functionality additions or reductions.

Part of your review should be an attempt to ensure that we are no longer referencing legacy ui exports, aside from those required to keep the application functioning as we straddle the old and new platforms.

@justinkambic justinkambic added Feature:New Platform v8.0.0 Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability release_note:skip Skip the PR/issue when compiling release notes labels Sep 3, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/uptime

@justinkambic justinkambic self-assigned this Sep 3, 2019
@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@justinkambic
Copy link
Contributor Author

@elasticmachine merge upstream

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Copy link
Contributor

@rudolf rudolf left a comment

Choose a reason for hiding this comment

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

The shape of your shim looks good. I found one more import that will have to be injected from the top of your shim at some point instead of being imported from 'ui/*': https://github.com/elastic/kibana/blob/master/x-pack/legacy/plugins/uptime/public/components/functional/kuery_bar/index.tsx#L9

ui/index_patterns has been moved to the data plugin, so you can also start consuming it from the data plugin by injecting it into your shim instead of the 'ui/*' import:
https://github.com/elastic/kibana/blob/master/x-pack/legacy/plugins/uptime/public/components/functional/kuery_bar/index.tsx#L13

@justinkambic
Copy link
Contributor Author

@rudolf have a look at a9c696d.

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@justinkambic
Copy link
Contributor Author

@elasticmachine merge upstream

Copy link
Contributor

@rudolf rudolf left a comment

Choose a reason for hiding this comment

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

Your NP shim looks great! 👍

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@justinkambic justinkambic merged commit 324f328 into elastic:master Oct 3, 2019
jloleysens added a commit to jloleysens/kibana that referenced this pull request Oct 3, 2019
…ysens/kibana into console-fix-menu-actions-alignment

* 'console-fix-menu-actions-alignment' of github.com:jloleysens/kibana: (59 commits)
  [Canvas] i18n for page manager, page preview, and shape preview (elastic#46865)
  [SIEM] hide siem data on empty string or _all (elastic#47166)
  [Uptime] Shim UI exports for new platform (elastic#44722)
  [Monitoring] Metricbeat Migration Wizard Tests (elastic#47139)
  [Logs UI] Support partitioned log rate results in API (elastic#46751)
  [APM] Remove beta badge from transaction breakdown (elastic#47163)
  test: 💍 convert Interpreter font function tests to Jest (elastic#47193)
  visualizations 👉 NP-ready (elastic#47142)
  [Uptime] Update pings chart colors (elastic#46780)
  Add scroll into view to avoid tooltip overlap (elastic#47106)
  Variety of quick a11y fixes (elastic#46569)
  [Graph] Empty workspace overlay (elastic#45547)
  [ML] Converts index and saved search selection to React (elastic#47117)
  [Uptime] Change default status filter in ping list to all on monitor page  (elastic#47108)
  refactor: 💡 convert Interpreter .js -> .ts (elastic#44545)
  Add TypeScript rules to STYLEGUIDE [skip ci] (elastic#47125)
  chore(NA): fix logic behind cleaning x-pack node modules on build (elastic#47091)
  [SIEM] Update Settings Text (elastic#47147)
  Add KQL functionality in the find function of the saved objects (elastic#41136)
  [Maps] Add 'InjectedData' class and revise so File Upload Features are assigned to new InjectedData instances (elastic#46381)
  ...
justinkambic added a commit that referenced this pull request Oct 3, 2019
* Remove depdency on legacy interface.

* Remove custom interface, use common breadcrumb type.

* Add HTML template for app react entry point.

* Update app props.

* Add constant for react app entry point.

* Remove dependency on legacy capabilities provider.

* Delete legacy kibana framework adapter.

* Add New Platform adapter, reference in startup code.

* Remove dependency on legacy capabilities function.

* Delete reference to obsolete interface.

* Fix busted types in new adapter.

* Add new plugin class, delete old bootstrap code.

* Provide default for potentially-undefined value.

* Delete obsolete file.

* Update plugin constructor and start interfaces.

* Add @ts-ignore for unused constructor parameter.

* Import autocomplete provider from new platform.
@justinkambic
Copy link
Contributor Author

Backported to:
7.x/7.5.0 fa16d78
#47218

@justinkambic justinkambic deleted the uptime_shim-ui-exports branch October 3, 2019 22:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:New Platform release_note:skip Skip the PR/issue when compiling release notes Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability v7.5.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants