[Uptime] refactor Synthetics Integration package UI#102080
Merged
dominiqueclarke merged 10 commits intoelastic:masterfrom Jun 16, 2021
Merged
[Uptime] refactor Synthetics Integration package UI#102080dominiqueclarke merged 10 commits intoelastic:masterfrom
dominiqueclarke merged 10 commits intoelastic:masterfrom
Conversation
…efactor-synthetics-package-ui
Contributor
|
Pinging @elastic/uptime (Team:uptime) |
Contributor
|
@elasticmachine merge upstream |
Contributor
💚 Build SucceededMetrics [docs]Module Count
Async chunks
History
To update your PR or re-run it, just comment with: |
dominiqueclarke
commented
Jun 16, 2021
Contributor
Author
dominiqueclarke
left a comment
There was a problem hiding this comment.
I did some additional manual testing, checking for visual performance degradation as we discussed. Performance due to rerenders on context changes does not appear to be a noticeable issue, since each context only impacts a small part of the UI.
kibanamachine
added a commit
to kibanamachine/kibana
that referenced
this pull request
Jun 16, 2021
* refactor contexts * add http, tcp, and icmp folders * adjust types * adjust useUpdatePolicy hook * adjust synthetics policy create and edit wrappers * adjust validation * fix typo and types * remove typo Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Contributor
💚 Backport successful
This backport PR will be merged automatically after passing CI. |
kibanamachine
added a commit
that referenced
this pull request
Jun 16, 2021
* refactor contexts * add http, tcp, and icmp folders * adjust types * adjust useUpdatePolicy hook * adjust synthetics policy create and edit wrappers * adjust validation * fix typo and types * remove typo Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Dominique Clarke <doclarke71@gmail.com>
jloleysens
added a commit
to jloleysens/kibana
that referenced
this pull request
Jun 17, 2021
…egrations-to-global-search * 'master' of github.com:elastic/kibana: (46 commits) [Lens] Add some more documentation for dynamic coloring (elastic#101369) hide not searchable results when no term (elastic#102401) [Lens] Fix Formula functional test with multiple suggestions (elastic#102378) Fix trusted apps modified by field displayed as a date field (elastic#102377) [Lens] Docs for time shift (elastic#102048) update readme of logs-metrics-ui (elastic#101968) Refactor observability plugin breadcrumbs (elastic#102290) [Index Patterns] Move rollup config to index pattern management v2 (elastic#102285) [Security Solution][Endpoint] Isolate Action should only be available to Platinum+ licenses (elastic#102374) [build] Updates Ironbank templates (elastic#102407) Update security best practices document (elastic#100814) [Enterprise Search] Set up initial KibanaPageTemplate (elastic#102170) [Reporting/Docs] Add section to troubleshooting guide to explain the StatusCodeError logs (elastic#102278) [DOCS] Updating Elastic Security Overview topic (elastic#101922) [Uptime] refactor Synthetics Integration package UI (elastic#102080) [Task Manager] Log at different levels based on the state (elastic#101751) [APM] Fixing time comparison types (elastic#101423) [RAC] Update alert documents in lifecycle rule type helper (elastic#101598) [ML] Functional tests - fix and re-activate alerting flyout test (elastic#102368) [Reporting] remove unused reference to path.data config (elastic#102267) ... # Conflicts: # x-pack/plugins/fleet/kibana.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Relates to elastic/uptime#276
Summary
This PR refactors implementation details in the Synthetics integration package UI, ahead of adding the browser monitor type.
This change is focused at the way policy details state is managed for http, tcp, and icmp monitors.
Previously, policy detail state was stored in a flat manner, with http, tcp, and icmp monitors sharing one main policy state object. This method took advantage of how many of the policy configurations are the same, but became difficult to reason about and maintain, leading to unexpected bugs like this one
This changes creates state silos for each monitor type, defining their individual policy configuration, each with it's own context to manage state. For monitors that have advanced configuration, context is divided between simple and advanced fields.
When the monitor type is changed, the config that is handed down to fleet is updated to only pull from the specific monitor config.
Testing
Much of this feature has functional test coverage, leading to increased confidence that functionality is not impacted by this refactor. However, the edit flow is not covered by functional tests. Please smoke test both the create and edit flow