-
Notifications
You must be signed in to change notification settings - Fork 92
feat(new-webui): Add backend support for log viewer links in search results. #950
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
2751feb
19da16e
250a4be
7eee608
61fd2a5
8e84ab7
106dcc8
5cba3d7
fbf8756
42f4df8
297ff80
e1d42eb
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 |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| { | ||
| "MongoDbSearchResultsMetadataCollectionName": "results-metadata" | ||
| "MongoDbSearchResultsMetadataCollectionName": "results-metadata", | ||
| "ClpStorageEngine": "clp" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| import settings from "../../../../../settings.json"; | ||
| import type {SearchResult} from "./typings"; | ||
|
|
||
|
|
||
| const SETTINGS_STORAGE_ENGINE = settings.ClpStorageEngine; | ||
|
|
||
| /** | ||
| * Stream type based on the storage engine (i.e. clp vs. clp-s). | ||
| */ | ||
| const STREAM_TYPE = "clp" === SETTINGS_STORAGE_ENGINE ? | ||
| "ir" : | ||
| "json"; | ||
|
|
||
| /** | ||
| * Returns the stream id based on the storage engine. | ||
| * | ||
| * @param result The search result object. | ||
| * @return The stream id string, either from orig_file_id or archive_id. | ||
| */ | ||
| const getStreamId = (result: SearchResult): string => { | ||
| return "clp" === SETTINGS_STORAGE_ENGINE ? | ||
| result.orig_file_id : | ||
| result.archive_id; | ||
| }; | ||
|
|
||
|
|
||
| export { | ||
| getStreamId, | ||
| STREAM_TYPE, | ||
| }; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -49,6 +49,11 @@ const routes: FastifyPluginAsync = async (fastify) => { | |
| prefix: "/", | ||
| root: clientDir, | ||
| decorateReply: false, | ||
| wildcard: false, | ||
| }); | ||
|
|
||
| fastify.get("/streamFile", (_, reply) => { | ||
| reply.sendFile("index.html", clientDir); | ||
| }); | ||
|
Comment on lines
+55
to
57
Member
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. to get the other React-Router defined routes in the SPA working, i believe we also need to let Fastify serve those routes with the index.html @coderabbitai please create an issue to track this
Contributor
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. 🧩 Analysis chain@junhaoliao I'll create an issue to track the SPA routing problem you've identified. 🏁 Script executed: Length of output: 952 @junhaoliao I've successfully created issue #1011 to track the SPA routing problem: #1011 The issue documents the current implementation where only 🐰📝 🧬 Code Graph Analysis ResultsRelevant snippet from
|
||
| } | ||
| }; | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.