-
Notifications
You must be signed in to change notification settings - Fork 8.1k
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
Remove kibana.defaultAppId setting #109798
Changes from 10 commits
e9feb26
b1c95a5
83b2008
3bb62f3
c092573
fa3ed0c
0684acf
ad6d126
32c9bd2
af41c39
79a4db2
7016477
5dc85d7
33071db
992c766
fb3d950
cf5f86f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,5 @@ | |
"owner": { | ||
"name": "Kibana App", | ||
"githubTeam": "kibana-app" | ||
}, | ||
"requiredPlugins": ["kibanaLegacy"] | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,23 +23,16 @@ export const createLegacyUrlForwardApp = ( | |
async mount(params: AppMountParameters) { | ||
const hash = params.history.location.hash.substr(1); | ||
|
||
if (!hash) { | ||
const [, , kibanaLegacyStart] = await core.getStartServices(); | ||
kibanaLegacyStart.navigateToDefaultApp(); | ||
} | ||
|
||
const [ | ||
{ | ||
application, | ||
http: { basePath }, | ||
}, | ||
] = await core.getStartServices(); | ||
|
||
const result = await navigateToLegacyKibanaUrl(hash, forwards, basePath, application); | ||
|
||
if (!result.navigated) { | ||
const [, , kibanaLegacyStart] = await core.getStartServices(); | ||
kibanaLegacyStart.navigateToDefaultApp(); | ||
const { navigated } = navigateToLegacyKibanaUrl(hash, forwards, basePath, application); | ||
if (!navigated) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ℹ️ This code is required to make sure that the following URLs keep working: |
||
application.navigateToUrl('/'); | ||
} | ||
|
||
return () => {}; | ||
|
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,7 +26,7 @@ export default function ({ getService, getPageObjects }) { | |
}); | ||
|
||
it('clicking on console on homepage should take you to console app', async () => { | ||
await PageObjects.common.navigateToUrl('home'); | ||
await PageObjects.common.navigateToApp('home'); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ℹ️ This would actually not be needed with further changes I made to the PR, since those URLs are now handled properly, but imho that looks anyway nicer, so I just left it in :) |
||
await testSubjects.click('homeDevTools'); | ||
const url = await browser.getCurrentUrl(); | ||
expect(url.includes('/app/dev_tools#/console')).to.be(true); | ||
|
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 adds a redirect to the home page in case any unknown route has been entered. With the old logic the existing
Route
would have taken care of forwarding to thedefaultAppId
in this case.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.
Why not redirect to
defaultRoute
set in uiSettings?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 question is: why would only the Home page do that in this case, and not ALL apps? I feel it's a bit weird, that something like
/app/home#/fooobar
would bring you to the default app, but/app/dashboard#/foobar
wouldn't. Or we'd basically need to set this as an expactation to all apps, that if they can't find the route in their app they should forward to the default app, which sounds like a larger change to me. I am happy to rediscuss this behavior, but I think we should not make a special case JUST for the home app and nothing else, and in this case rather let every app handle their "unknown route" internally to do something reasonable.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.
agree. that sounds like a high-level policy.