-
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] Fix broken links #22592
[APM] Fix broken links #22592
Conversation
expect(panels[0].items[1].href).toBe( | ||
'myBasePath/app/kibana#/management/elasticsearch/watcher/' | ||
); | ||
}); |
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.
The test here feel a little unnecessary. Let me know if you any suggestions.
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.
Yeah I see what you mean but I think it's fine to be a little extra explicit with what we're worried about there with base paths.
💔 Build Failed |
cd0812f
to
159bae5
Compare
💚 Build Succeeded |
Pinging @elastic/apm-ui |
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.
There are a couple other places where these similar links are broken:
getMlJobUrl()
returns a link that isn't dynamic per base path, it's used in the Flyout here- could maybe use
<KibanaLink>
inside of that function and let the base path get added in one place, possibly?
- could maybe use
- You could possibly also use KibanaLink as a node passed to the Context Menu which seems better than using chrome in more places, except it doesn't seem like the context menu component wants you to do that very easily so what you have probably makes the most sense for now
<a href="/app/ml">Machine Learning jobs management page</a>
is hard-coded in the Flyout as well, which could use a KibanaLink to fix I think
I could swear I had added base url for
|
Overall I think I prefer: <SomeLinkAbstraction path="/some/path" />
<OtherComponent items={[
<SomeLinkAbstraction path="/other/path" />,
<Etc>
]} /> in lots of places, rather than: <a href={someFn("/some/path")} />
<OtherLink path={someFn("/some/path")} />
<OtherComponent items={[
{ href: someFn("/other/path"), otherProp: 'whatever' },
{ etc: 'etc', etc: 'etc' }
]} />
// etc but if there's history with |
@jasonrhodes I agree. I updated my comment (the illegal move - sorry! ;) ) |
💚 Build Succeeded |
* [APM] Fix broken links * Add missing basepaths * Remove basepath from getMlJobUrl
* [APM] Fix broken links * Add missing basepaths * Remove basepath from getMlJobUrl
Some links were missing the basepath