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

React beats instance view #113500

Merged
merged 8 commits into from
Sep 30, 2021

Conversation

matschaffer
Copy link
Contributor

Summary

React version of https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/public/views/beats/beat

Screen Shot 2021-09-30 at 15 28 45

For #111757

Checklist

Delete any items that are not applicable to this PR.

Risk Matrix

Delete this section if it is not applicable to this PR.

Before closing this PR, invite QA, stakeholders, and other developers to identify risks that should be tested prior to the change/feature release.

When forming the risk matrix, consider some of the following examples and how they may potentially impact the change:

Risk Probability Severity Mitigation/Notes
Multiple Spaces—unexpected behavior in non-default Kibana Space. Low High Integration tests will verify that all features are still supported in non-default Kibana Space and when user switches between spaces.
Multiple nodes—Elasticsearch polling might have race conditions when multiple Kibana nodes are polling for the same tasks. High Low Tasks are idempotent, so executing them multiple times will not result in logical error, but will degrade performance. To test for this case we add plenty of unit tests around this logic and document manual testing procedure.
Code should gracefully handle cases when feature X or plugin Y are disabled. Medium High Unit tests will verify that any feature flag or plugin combination still results in our service operational.
See more potential risk examples

For maintainers

@matschaffer matschaffer added Team:Monitoring Stack Monitoring team v8.0.0 Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services release_note:skip Skip the PR/issue when compiling release notes Feature:Stack Monitoring auto-backport Deprecated - use backport:version if exact versions are needed v7.16.0 Epic: Stack Monitoring de-angularization labels Sep 30, 2021
@matschaffer matschaffer self-assigned this Sep 30, 2021
@matschaffer matschaffer requested a review from a team as a code owner September 30, 2021 06:30
@matschaffer matschaffer requested review from a team September 30, 2021 06:30
@elasticmachine
Copy link
Contributor

Pinging @elastic/stack-monitoring (Team:Monitoring)

@elasticmachine
Copy link
Contributor

Pinging @elastic/logs-metrics-ui (Team:logs-metrics-ui)

@matschaffer
Copy link
Contributor Author

@elasticmachine merge upstream

<RouteInit
path="/beats/beat/:instance"
component={BeatsInstancePage}
codePaths={[CODE_PATH_ELASTICSEARCH]}
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be CODE_PATH_BEATS (see angular component) ? It even looks like it's not used by the endpoint but maybe an intermediary component ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ooh, nice catch!

];

return (
<PageTemplate
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think I might update this to do conditional tabs on BeatsTemplate. Using PageTemplate directly here works fine since beats only has one tab, but other parts of stack monitoring will have multiple tabs so will need a different pattern.

Doesn't buy us a lot here, but mirrors the pattern used in logstash where it's a lot better than just calling PageTemplate directly.
},
{
});
tabs.push({
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Borrowed the pattern from #113256 here

Copy link
Contributor

Choose a reason for hiding this comment

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

This could even be extracted to its own func as it looks like a good candidate for a unit test :)

@matschaffer matschaffer enabled auto-merge (squash) September 30, 2021 15:51
@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
monitoring 615 616 +1

Async chunks

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

id before after diff
monitoring 975.5KB 979.1KB +3.5KB

History

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

cc @matschaffer

@matschaffer matschaffer merged commit 575e22f into elastic:master Sep 30, 2021
kibanamachine added a commit to kibanamachine/kibana that referenced this pull request Sep 30, 2021
* Add beat instance page

* Fix beat instance tabs to match angular

* Remove unused cluster prop on beats template

* Fix breadcrumbs

* Remove unused cluster prop

* Use correct codepath

* Switch beats instance back to use template

Doesn't buy us a lot here, but mirrors the pattern used in logstash where it's a lot better than just calling PageTemplate directly.

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

💚 Backport successful

Status Branch Result
7.x

This backport PR will be merged automatically after passing CI.

kibanamachine added a commit that referenced this pull request Sep 30, 2021
* Add beat instance page

* Fix beat instance tabs to match angular

* Remove unused cluster prop on beats template

* Fix breadcrumbs

* Remove unused cluster prop

* Use correct codepath

* Switch beats instance back to use template

Doesn't buy us a lot here, but mirrors the pattern used in logstash where it's a lot better than just calling PageTemplate directly.

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

Co-authored-by: Mat Schaffer <[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 Epic: Stack Monitoring de-angularization Feature:Stack Monitoring release_note:skip Skip the PR/issue when compiling release notes Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services Team:Monitoring Stack Monitoring team v7.16.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants