Skip to content

[Uptime] Add new context for uptime - #34006

Merged
justinkambic merged 19 commits into
elastic:masterfrom
justinkambic:uptime_context
Apr 12, 2019
Merged

justinkambic merged 19 commits into
elastic:masterfrom
justinkambic:uptime_context

Conversation

@justinkambic

@justinkambic justinkambic commented Mar 27, 2019 •

Copy link
Copy Markdown
Contributor

Summary

In the initial version of Uptime, we had several fields that were shared from the top-level application component all the way down to the most nested component in the UI. This is exactly what contexts are designed for, so going forward we should make use of a context to avoid the need for sharing so many props and & UptimeCommonProps everywhere.

The primary goals of this patch are as follows:

  • Delete UptimeCommonProps and the need to pass {...this.props} to so many child components
  • Add a new UptimeContext to the UI to provide these important global values

This PR is WIP.

Overview

There are 3 main changes in this PR:

  • Altogether removal of *Query components
    • Any business logic these components contained has been moved to the functional components
  • Addition of an UptimeContext for top-level global props
  • Removal of general-purpose interfaces and the need to pass entire state/props from top to bottom

Additionally, the GraphQL queries have been moved to a dedicated directory outside of the components folder.

Checklist

Use strikethroughs to remove checklist items you don't feel are applicable to this PR.

For maintainers

@justinkambic justinkambic added refactoring v8.0.0 Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability v7.2.0 labels Mar 27, 2019
@justinkambic justinkambic self-assigned this Mar 27, 2019
@elasticmachine

Copy link
Copy Markdown
Contributor

Pinging @elastic/uptime

@elasticmachine

Copy link
Copy Markdown
Contributor

💚 Build Succeeded

@andrewvc andrewvc mentioned this pull request Mar 27, 2019
11 tasks
@justinkambic
justinkambic force-pushed the uptime_context branch 2 times, most recently from 2009c64 to 0c76aa4 Compare April 6, 2019 05:49
@elasticmachine

Copy link
Copy Markdown
Contributor

💔 Build Failed

@elasticmachine

Copy link
Copy Markdown
Contributor

💔 Build Failed

@elasticmachine

Copy link
Copy Markdown
Contributor

💔 Build Failed

@elasticmachine

Copy link
Copy Markdown
Contributor

💚 Build Succeeded

@elasticmachine

Copy link
Copy Markdown
Contributor

💔 Build Failed

@elasticmachine

Copy link
Copy Markdown
Contributor

💔 Build Failed

@elasticmachine

Copy link
Copy Markdown
Contributor

💚 Build Succeeded

@justinkambic
justinkambic marked this pull request as ready for review April 10, 2019 12:36
@elasticmachine

Copy link
Copy Markdown
Contributor

💚 Build Succeeded

@mattapperson mattapperson left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@elasticmachine

Copy link
Copy Markdown
Contributor

💔 Build Failed

@justinkambic

Copy link
Copy Markdown
Contributor Author

jenkins test this

@elasticmachine

Copy link
Copy Markdown
Contributor

💔 Build Failed

@elasticmachine

Copy link
Copy Markdown
Contributor

💔 Build Failed

@elasticmachine

Copy link
Copy Markdown
Contributor

💚 Build Succeeded

@justinkambic
justinkambic merged commit 4e3d182 into elastic:master Apr 12, 2019
justinkambic added a commit to justinkambic/kibana that referenced this pull request Apr 12, 2019
@justinkambic justinkambic mentioned this pull request Apr 12, 2019
7 tasks
justinkambic added a commit that referenced this pull request Apr 12, 2019
@justinkambic

Copy link
Copy Markdown
Contributor Author

Backported to:
7.x/7.1.0 3b37b25
#35007

@justinkambic
justinkambic deleted the uptime_context branch April 12, 2019 17:57
patrykkopycinski pushed a commit to patrykkopycinski/kibana that referenced this pull request May 6, 2026
* Add new context for uptime.

* Implement Uptime context.

* Convert application class to functional component.

* Fix typings.

* Fix busted types.

* Update unit tests.

* Move query files. Update API/functional tests.

* Fix code formatting.

* Fix improper import syntax.

* Delete obsolete code.

* Add base path to app context.

* Add refresh tracker to app context.

* Clean up code.

* Fix unit conversion defect and add a unit test to check for incorrect values displayed.

* Fix broken code formatting.

* Clean up redundant code.

* Split context into separate contexts for refresh and settings.

* Fix unit test snapshot and props.

* Fix code formatting.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactoring review Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability v7.2.0 v8.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants