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] Feature/refactor context initialization #54494

Merged

Conversation

shahzad31
Copy link
Contributor

@shahzad31 shahzad31 commented Jan 10, 2020

Summary

Fix: #54493

Context in uptime are properly initialized and have removed unused objects from context.

Checklist

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

For maintainers

@shahzad31 shahzad31 self-assigned this Jan 10, 2020
@shahzad31 shahzad31 added the Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability label Jan 10, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/uptime (Team:uptime)

@shahzad31 shahzad31 added v7.6.0 v8.0.0 technical debt Improvement of the software architecture and operational architecture release_note:skip Skip the PR/issue when compiling release notes labels Jan 10, 2020
@shahzad31 shahzad31 requested a review from andrewvc January 10, 2020 19:58
Copy link
Contributor

@justinkambic justinkambic left a comment

Choose a reason for hiding this comment

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

I think this looks really good, thanks for stepping up and handling this one. I had a few comments we should address but I think this will be a good thing to add.

export { UMSettingsContextValues, UptimeSettingsContext } from './uptime_settings_context';
export { UptimeRefreshContext, UptimeRefreshContextProvider } from './uptime_refresh_context';
export {
UMSettingsContextValues,
Copy link
Contributor

Choose a reason for hiding this comment

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

We can probably rename this UptimeSettingsContextValues.. I was prefixing lots of things with UM back in the early days but we refer to it internally and publicly as simply "Uptime" now. WDYT?

Copy link
Contributor

@andrewvc andrewvc left a comment

Choose a reason for hiding this comment

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

LGTM on the additional commits @justinkambic added

Copy link
Contributor

@justinkambic justinkambic left a comment

Choose a reason for hiding this comment

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

LGTM on code review and smoke testing locally. We'll merge this after it passes CI.

@@ -9,7 +9,7 @@ import React, { useContext, useEffect, useRef } from 'react';
import * as d3 from 'd3';
import { i18n } from '@kbn/i18n';
import { DonutChartLegend } from './donut_chart_legend';
import { UptimeSettingsContext } from '../../../contexts';
import { UptimeThemeContext } from '../../../contexts/uptime_theme_context';
Copy link
Contributor

Choose a reason for hiding this comment

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

We're exporting this from the index.ts of the contexts directory, so we can remove the filename from the import.

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

History

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

@justinkambic justinkambic merged commit 1ae2d00 into elastic:master Jan 15, 2020
justinkambic added a commit to justinkambic/kibana that referenced this pull request Jan 15, 2020
* update refactor

* refactor context initilization

* rename values

* fix tests

Co-authored-by: Justin Kambic <[email protected]>
shahzad31 added a commit to shahzad31/kibana that referenced this pull request Jan 15, 2020
* update refactor

* refactor context initilization

* rename values

* fix tests

Co-authored-by: Justin Kambic <[email protected]>
shahzad31 added a commit that referenced this pull request Jan 15, 2020
* update refactor

* refactor context initilization

* rename values

* fix tests

Co-authored-by: Justin Kambic <[email protected]>

Co-authored-by: Justin Kambic <[email protected]>
gmmorris added a commit to gmmorris/kibana that referenced this pull request Jan 15, 2020
* upstream/master: (72 commits)
  [ML] Calculate model memory limit API integration tests (elastic#54557)
  Skip flakey index template component integration tests. (elastic#54878)
  Add label and icon to nested fields in the doc table (elastic#54199)
  Reverse dependency of home plugin and apm/ml/cloud (elastic#52883)
  [SIEM][Detection Engine] Order JSON keys, fix scripts, update pre-packaged rules
  update invalid snapshot
  add readme note about alerting / manage_api_key cluster privilege (elastic#54639)
  [SIEM] New Overview Page (elastic#54783)
  [Uptime] Feature/refactor context initialization (elastic#54494)
  Upgrade EUI to v18.2.0 (elastic#54786)
  [SIEM] [Detection engine] from signals to timeline (elastic#54769)
  [Index Management] Add Mappings Editor to Index Template Wizard (elastic#47562)
  [SIEM][Detection Engine] Removes deprecated filter from mapping
  [Maps] Add categorical styling (elastic#54408)
  Add mapbox-gl-rtl-text library (elastic#54842)
  [SIEM][Detection Engine] Adds actions to Rule Details (elastic#54828)
  Lexicographically sort location tags (elastic#54832)
  [Maps] expand extent filter to tile boundaries (elastic#54276)
  [Maps] Use v7.6 Elastic Maps Service API (elastic#54399)
  [DOCS] Adds monitoring setting (elastic#54819)
  ...
jkelastic pushed a commit to jkelastic/kibana that referenced this pull request Jan 17, 2020
* update refactor

* refactor context initilization

* rename values

* fix tests

Co-authored-by: Justin Kambic <[email protected]>
@shahzad31 shahzad31 deleted the feature/refactor-context-initilization branch January 21, 2020 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_note:skip Skip the PR/issue when compiling release notes Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability technical debt Improvement of the software architecture and operational architecture v7.6.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Uptime] Context Initialization is not properly following react methodology
5 participants