-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Logs Explorer] Add not found page route (#177020)
## 📓 Summary Closes #177014 This work adds a new route to handle unmatched paths on the observability logs explorer app router to display a Not Found prompt instead of a blank page. <img width="3008" alt="Screenshot 2024-02-15 at 15 35 49" src="https://github.com/elastic/kibana/assets/34506779/db9d0463-f77f-4590-9d41-850c72d4285c"> --------- Co-authored-by: Marco Antonio Ghiani <[email protected]> Co-authored-by: kibanamachine <[email protected]>
- Loading branch information
1 parent
445f4bc
commit 153180b
Showing
5 changed files
with
33 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
...ck/plugins/observability_solution/observability_logs_explorer/public/routes/not_found.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import React from 'react'; | ||
import { NotFoundPrompt } from '@kbn/shared-ux-prompt-not-found'; | ||
import { ObservabilityLogsExplorerPageTemplate } from '../components/page_template'; | ||
|
||
export const NotFoundPage = () => { | ||
return ( | ||
<ObservabilityLogsExplorerPageTemplate | ||
pageSectionProps={{ grow: false, paddingSize: 'xl' }} | ||
data-test-subj="observabilityLogsExplorerNotFoundPage" | ||
> | ||
<NotFoundPrompt /> | ||
</ObservabilityLogsExplorerPageTemplate> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters