-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[APM] Add Obs side nav and refactor APM templates #101044
Conversation
text: string; | ||
}) { | ||
return { value, text }; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is needed due to a console error introduced in #95903 (comment)
I don't think the console error in itself is an issue but it made it a bit harder to make the changes needed for this PR when the console contained unrelated errors.
</RedirectAppLinks> | ||
); | ||
} | ||
import { ApmAppRoot } from '../components/routing/app_root'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved all of this to the routing section (which contains routing and templating)
@@ -180,27 +168,26 @@ export function ServiceNodeMetrics({ match }: ServiceNodeMetricsProps) { | |||
</MetadataFlexGroup> | |||
)} | |||
<SearchBar /> | |||
<EuiPage> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've removed EuiPage
everywhere. Everything is now wrapped in EuiPage
automatically when using ApmMainTemplate
@@ -145,25 +145,19 @@ function ServiceNodeOverview({ serviceName }: ServiceNodeOverviewProps) { | |||
return ( | |||
<> | |||
<SearchBar /> | |||
<EuiPage> | |||
<EuiFlexGroup direction="column" gutterSize="s"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We had a lot of unnecessary EuiFlexGroup
wrappers. Removed them
</EuiFlexGroup> | ||
</EuiPage> | ||
|
||
<EuiPanel hasShadow={false}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If there's only a single EuiPanel
in a view we use hasShadow={false}
. When there are multiple panels we still want the drop shadow.
@@ -0,0 +1,38 @@ | |||
/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
renderAsRedirectTo
is not new. It was just extracted from another file
* Optionally: | ||
* - EnvironmentFilter | ||
*/ | ||
export function ApmMainTemplate({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the core of this PR: an apm-wide template that should contain all elements that most views need (left-side nav, top-bar action menu, page title, environment filter)
72d877d
to
9d96d30
Compare
Pinging @elastic/uptime (Team:uptime) |
Pinging @elastic/apm-ui (Team:apm) |
x-pack/plugins/apm/public/components/app/ErrorGroupDetails/index.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/apm/public/components/app/error_group_overview/index.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/apm/public/components/app/service_inventory/index.tsx
Outdated
Show resolved
Hide resolved
@sqren do you mind running the e2e test, I think it might break.
(It's not running on CI yet, I still need to make a few improvements.) |
retest |
1 similar comment
retest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for the clean up 👍🏻.
@elasticmachine merge upstream |
jenkins run the e2e |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! This looks great and tons of good cleanup.
children, | ||
}: { | ||
pageTitle: React.ReactNode; | ||
environmentSelector?: boolean; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Should this be hasEnvironmentSelector
or showEnvironmentSelector
to indicate it's a boolean. As it's named it makes it look like I'm supposed to supply some sort of environmentSelector
here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree. Will rename
💚 Build SucceededMetrics [docs]Module Count
Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
💚 Backport successful
This backport PR will be merged automatically after passing CI. |
Closes #99883
This PR adds the new Observability Page Template including left side nav
I had to refactor quite a few of the existing components, and started templatizing views. This is still WIP and I want to get people's take on the current direction of this PR.