Repository navigation
feat(new-webui): Add support for page switching using react-router. #797
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
Merged
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
e7dce76
draft
df9c602
fix lint
3c475f6
add files
e554796
small nits
976c889
small
1587060
set to false
2f3582c
small
2837d59
junhao review
e4a4be6
small change
25ce98a
Fix lint
712af39
router
f433ee7
merge main
d84bcf9
modules.css
02bbfc7
fix lint
c36902c
lastest
6acc4f9
Apply suggestions from code review
davemarco 240e4b8
latest
4049669
merge
2a9c75e
review
f8f176c
lint
4d40764
latest:
748b3c5
review
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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
6 changes: 3 additions & 3 deletions
6
...viewer-webui/client/src/ui/MainLayout.css → ...c/components/Layout/MainLayout.module.css
This file contains hidden or 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 hidden or 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
16 changes: 16 additions & 0 deletions
16
components/log-viewer-webui/client/src/pages/IngestPage.tsx
This file contains hidden or 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,16 @@ | ||
| /** | ||
| * Presents compression statistics. | ||
| * | ||
| * @return | ||
| */ | ||
| const IngestPage = () => { | ||
| return ( | ||
| <div> | ||
| <h1>Ingest Page</h1> | ||
| <p>This is the Ingest Page.</p> | ||
| </div> | ||
| ); | ||
| }; | ||
|
|
||
|
|
||
| export default IngestPage; |
16 changes: 16 additions & 0 deletions
16
components/log-viewer-webui/client/src/pages/SearchPage.tsx
This file contains hidden or 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,16 @@ | ||
| /** | ||
| * Provides a search interface that allows users to query archives and visualize search results. | ||
| * | ||
| * @return | ||
| */ | ||
| const SearchPage = () => { | ||
| return ( | ||
| <div> | ||
| <h1>Search Page</h1> | ||
| <p>This is the Search Page.</p> | ||
| </div> | ||
| ); | ||
| }; | ||
|
|
||
|
|
||
| export default SearchPage; |
This file contains hidden or 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,20 @@ | ||
| import {createBrowserRouter} from "react-router"; | ||
|
|
||
| import MainLayout from "./components/Layout/MainLayout"; | ||
| import IngestPage from "./pages/IngestPage"; | ||
| import SearchPage from "./pages/SearchPage"; | ||
|
|
||
|
|
||
| const router = createBrowserRouter([ | ||
| { | ||
| path: "/", | ||
| Component: MainLayout, | ||
| children: [ | ||
| {path: "ingest", Component: IngestPage}, | ||
| {path: "search", Component: SearchPage}, | ||
| ], | ||
| }, | ||
| ]); | ||
|
|
||
|
|
||
| export default router; |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.