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] add monitor edit and add pages #118947

Conversation

dominiqueclarke
Copy link
Contributor

@dominiqueclarke dominiqueclarke commented Nov 17, 2021

Summary

Resolves elastic/uptime#409

Adds basic add and edit monitor pages, including:

  • Adjusting Synthetics integration context to work with UI monitor management and the Elastic Synthetics integration, including HTTP, ICMP, TCP, Browser, TLS and generic policy configuration context
  • Adds new UI monitor management compatible formatters for formatting UI values to heartbeat compatible values

Testing
This PR is an incremental step. It ensures that the existing UI components can be pulled in with enough flexibility to support both the Elastic Synthetics Integration and UI Monitor Management. It does not yet encapsulate the action of saving or editing a monitor. For that reason, a code LGTM will suffice for this incremental step, as no actions are currently implemented.

@dominiqueclarke
Copy link
Contributor Author

@elasticmachine merge upstream

@dominiqueclarke dominiqueclarke added Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability v8.0.0 enhancement New value added to drive a business result release_note:skip Skip the PR/issue when compiling release notes auto-backport Deprecated - use backport:version if exact versions are needed labels Nov 29, 2021
@dominiqueclarke dominiqueclarke marked this pull request as ready for review November 29, 2021 15:42
@dominiqueclarke dominiqueclarke requested review from a team as code owners November 29, 2021 15:42
@elasticmachine
Copy link
Contributor

Pinging @elastic/uptime (Team:uptime)

@@ -6,8 +6,10 @@
*/

import React from 'react';

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This change triggered with linting. I'm assuming this has already been discovered by the team, and if I merge upstream before merging the PR, it'll most likely have already been resolved.

@botelastic botelastic bot added the Team:Fleet Team label for Observability Data Collection Fleet team label Nov 29, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

@dominiqueclarke dominiqueclarke changed the title add monitor edit and add pages [Uptime] add monitor edit and add pages Nov 29, 2021
Copy link
Contributor

@shahzad31 shahzad31 left a comment

Choose a reason for hiding this comment

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

Code LGTM and browsed routes

WFG !!

}

interface IPolicyConfigContextProvider {
children: React.ReactNode;
defaultMonitorType?: DataStream;
defaultIsTLSEnabled?: boolean;
defaultIsZipUrlTLSEnabled?: boolean;
defaultName?: string;
defaultLocations?: string[];
Copy link
Contributor

Choose a reason for hiding this comment

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

i think this might end up becoming {id: string, label: string}[] eventually.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the heads up.

Comment on lines +15 to +20
[ConfigKeys.SOURCE_ZIP_URL]: null,
[ConfigKeys.SOURCE_ZIP_USERNAME]: null,
[ConfigKeys.SOURCE_ZIP_PASSWORD]: null,
[ConfigKeys.SOURCE_ZIP_FOLDER]: null,
[ConfigKeys.SOURCE_ZIP_PROXY_URL]: null,
[ConfigKeys.SOURCE_INLINE]: null,
Copy link
Contributor

Choose a reason for hiding this comment

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

shouldn't all of this goes in nested way now? but i think if we want to keep parity with fleet we may have to continue using existing key format.
instead 'source.inline.zip' i mean source: {...rest}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, you are right that it's best to continue to do this to keep parity with fleet. The actual UI fields are mapped to the flattened keys. Keeping it this way allows us to have to do the least amount of work short term.

@dominiqueclarke
Copy link
Contributor Author

@elasticmachine merge upstream

Copy link
Member

@nchaulet nchaulet left a comment

Choose a reason for hiding this comment

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

Fleet linting 🚀

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
uptime 623 635 +12

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
uptime 576.9KB 586.7KB +9.7KB

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
uptime 23.3KB 23.3KB +7.0B

History

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

@dominiqueclarke dominiqueclarke merged commit 14ad72e into elastic:main Nov 29, 2021
@dominiqueclarke dominiqueclarke deleted the feature/ui-monitor-management-add-edit branch November 29, 2021 22:44
@kibanamachine
Copy link
Contributor

The following labels were identified as gaps in your version labels and will be added automatically:

  • v8.1.0

If any of these should not be on your pull request, please manually remove them.

kibanamachine added a commit to kibanamachine/kibana that referenced this pull request Nov 29, 2021
* add monitor edit and add pages

* remove unused imports

* remove unexpected console log

* remove unused values

Co-authored-by: Kibana Machine <[email protected]>
@kibanamachine
Copy link
Contributor

💚 Backport successful

Status Branch Result
8.0

This backport PR will be merged automatically after passing CI.

kibanamachine added a commit that referenced this pull request Nov 30, 2021
* add monitor edit and add pages

* remove unused imports

* remove unexpected console log

* remove unused values

Co-authored-by: Kibana Machine <[email protected]>

Co-authored-by: Dominique Clarke <[email protected]>
TinLe pushed a commit to TinLe/kibana that referenced this pull request Dec 22, 2021
* add monitor edit and add pages

* remove unused imports

* remove unexpected console log

* remove unused values

Co-authored-by: Kibana Machine <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Deprecated - use backport:version if exact versions are needed enhancement New value added to drive a business result release_note:skip Skip the PR/issue when compiling release notes Team:Fleet Team label for Observability Data Collection Fleet team Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability v8.0.0 v8.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Uptime] UI Monitor Management Stub Add Monitor Page
6 participants