-
Notifications
You must be signed in to change notification settings - Fork 8.5k
Migrate status page app to core #72017
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
Changes from all commits
ba9e213
5964ffc
f63d8d2
dcc1f0a
6b42c45
854211e
c4dbd19
7f927f7
c857b74
8a2f98e
0a7b243
d65c125
7bdc3c2
e91d5b7
b7bc230
4beb5d3
66337af
46c5adf
716dee7
92924b7
7352ad9
3a3e2e9
5b8719e
1a0c2ae
920f52b
71f4273
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,15 +24,19 @@ import { | |
| AppNavLinkStatus, | ||
| AppMountParameters, | ||
| } from '../application'; | ||
| import { HttpSetup, HttpStart } from '../http'; | ||
| import { CoreContext } from '../core_system'; | ||
| import { renderApp, setupUrlOverflowDetection } from './errors'; | ||
| import { NotificationsStart } from '../notifications'; | ||
| import { IUiSettingsClient } from '../ui_settings'; | ||
| import type { HttpSetup, HttpStart } from '../http'; | ||
| import type { CoreContext } from '../core_system'; | ||
| import type { NotificationsSetup, NotificationsStart } from '../notifications'; | ||
| import type { IUiSettingsClient } from '../ui_settings'; | ||
| import type { InjectedMetadataSetup } from '../injected_metadata'; | ||
| import { renderApp as renderErrorApp, setupUrlOverflowDetection } from './errors'; | ||
| import { renderApp as renderStatusApp } from './status'; | ||
|
|
||
| interface SetupDeps { | ||
| application: InternalApplicationSetup; | ||
| http: HttpSetup; | ||
| injectedMetadata: InjectedMetadataSetup; | ||
| notifications: NotificationsSetup; | ||
| } | ||
|
|
||
| interface StartDeps { | ||
|
|
@@ -47,7 +51,7 @@ export class CoreApp { | |
|
|
||
| constructor(private readonly coreContext: CoreContext) {} | ||
|
|
||
| public setup({ http, application }: SetupDeps) { | ||
| public setup({ http, application, injectedMetadata, notifications }: SetupDeps) { | ||
| application.register(this.coreContext.coreId, { | ||
| id: 'error', | ||
| title: 'App Error', | ||
|
|
@@ -56,7 +60,21 @@ export class CoreApp { | |
| // Do not use an async import here in order to ensure that network failures | ||
| // cannot prevent the error UI from displaying. This UI is tiny so an async | ||
| // import here is probably not useful anyways. | ||
| return renderApp(params, { basePath: http.basePath }); | ||
| return renderErrorApp(params, { basePath: http.basePath }); | ||
| }, | ||
| }); | ||
|
|
||
| if (injectedMetadata.getAnonymousStatusPage()) { | ||
| http.anonymousPaths.register('/status'); | ||
| } | ||
| application.register(this.coreContext.coreId, { | ||
| id: 'status', | ||
| title: 'Server Status', | ||
| appRoute: '/status', | ||
| chromeless: true, | ||
| navLinkStatus: AppNavLinkStatus.hidden, | ||
| mount(params: AppMountParameters) { | ||
| return renderStatusApp(params, { http, notifications }); | ||
|
Comment on lines
+76
to
+77
Contributor
Author
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. We choose to not use async import for the error app, so I think it makes sense to do the same for the status page. |
||
| }, | ||
| }); | ||
| } | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.
You cannot navigate to the other Kibana pages from other

anonymous pageswithout reloading. It creates a bug whenstatus.allowAnonymous: trueand you logged-in user lands on the/statuspage and navigates to other pages. result:SecurityNavControlis not rendered.As a workaround, we could make
statuspage chromeless to enforce page reloading.Is it possible to land on the
/statuspage from a link in Kibana 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.
Hum. This indeed is an issue. We really need to have a way to know about anonymous vs logged-in apps from core, to be able to automatically performs that kind of reload when using
navigateToAppbetween anon/logged or logged/anon apps. Do you know if we have an issue for that?chromeless apps do not really force page reloading, but I guess hiding the chrome navigation will remove any way for the user to navigate away from the status page using the UI. do you think it would be sufficient?
Not that I'm aware of. The app is hidden and there is no link to it anywhere in chrome.
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.
that was my reasoning as well. I think it's okay since the user navigates to the
/statuspage manually.I'm not aware of any.