Repository navigation
fix(new-webui): Add support for querying metadata from multiple datasets (fixes #1024). #1042
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 12 commits
a4d1cd8
dab039b
89a8b04
0786e2c
9f33330
6e90915
038656f
1f0dc43
01a134f
e1bdcd5
0191277
7a9846d
f9512b9
e463470
4bdc128
36d91fb
6b72a6d
4235ed6
e7824cd
55a3e80
279e7ad
77b15c9
21e8eb2
481e230
661262c
883f849
f014a50
f62a620
968cc80
84d80be
a80a7dd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,10 @@ | ||
| import {RouterProvider} from "react-router"; | ||
|
|
||
| import {QueryClientProvider} from "@tanstack/react-query"; | ||
| import {ReactQueryDevtools} from "@tanstack/react-query-devtools"; | ||
|
Comment on lines
+3
to
+
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. 🧩 Verification correctFix the import resolution issue. The ESLint pipeline failure indicates that the 🏁 Script executed: #!/bin/bash
# Check if react-query-devtools is installed as a dependency
cat components/log-viewer-webui/client/package.json | jq '.dependencies["@tanstack/react-query-devtools"], .devDependencies["@tanstack/react-query-devtools"]'Length of output: 170 Fix the import resolution issue. The ESLint pipeline failure indicates that the #!/bin/bash
# Check if react-query-devtools is installed as a dependency
cat components/log-viewer-webui/client/package.json | jq '.dependencies["@tanstack/react-query-devtools"], .devDependencies["@tanstack/react-query-devtools"]'🧰 Tools🪛 GitHub Actions: clp-lint[error] 4-4: ESLint: Unable to resolve path to module '@tanstack/react-query-devtools' (import/no-unresolved) 🤖 Prompt for AI Agents |
||
| import {ConfigProvider} from "antd"; | ||
|
|
||
| import queryClient from "./config/queryClient"; | ||
| import router from "./router"; | ||
| import THEME_CONFIG from "./theme"; | ||
|
|
||
|
|
@@ -15,11 +18,14 @@ import "@ant-design/v5-patch-for-react-19"; | |
| */ | ||
| const AntApp = () => { | ||
| return ( | ||
| <ConfigProvider | ||
| theme={THEME_CONFIG} | ||
| > | ||
| <RouterProvider router={router}/> | ||
| </ConfigProvider> | ||
| <QueryClientProvider client={queryClient}> | ||
| <ConfigProvider | ||
| theme={THEME_CONFIG} | ||
| > | ||
| <RouterProvider router={router}/> | ||
| </ConfigProvider> | ||
| <ReactQueryDevtools initialIsOpen={false}/> | ||
| </QueryClientProvider> | ||
| ); | ||
| }; | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,14 @@ | ||||||||||||||||||||||||||
| import axios from "axios"; | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| /** | ||||||||||||||||||||||||||
| * Query the SQL server with the queryString. | ||||||||||||||||||||||||||
| * | ||||||||||||||||||||||||||
| * @param queryString | ||||||||||||||||||||||||||
| * @return | ||||||||||||||||||||||||||
| */ | ||||||||||||||||||||||||||
| const querySql = async <T>(queryString: string) => { | ||||||||||||||||||||||||||
| return axios.post<T>("/query/sql", {queryString}); | ||||||||||||||||||||||||||
| }; | ||||||||||||||||||||||||||
|
Comment on lines
+10
to
+
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. 🧹 Nitpick (assertive) Add input validation and consider SQL injection risks. The function directly passes the Additionally, the JSDoc is incomplete - the /**
* Query the SQL server with the queryString.
*
* @param queryString
- * @return
+ * @return Promise<AxiosResponse<T>> The axios response containing the query results
*/📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| export {querySql}; | ||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| import {QueryClient} from "@tanstack/react-query"; | ||
|
|
||
|
|
||
| const DEFAULT_STALE_TIME_MILLIS = 10_000; | ||
|
|
||
| const queryClient = new QueryClient({ | ||
| defaultOptions: { | ||
| queries: { | ||
| staleTime: DEFAULT_STALE_TIME_MILLIS, | ||
| }, | ||
| }, | ||
| }); | ||
|
|
||
| export default queryClient; |
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.
🧹 Nitpick (assertive)
Shift DevTools to
devDependenciesto avoid bloating the prod bundle@tanstack/react-query-devtoolsis purely a debugging aid; keeping it independenciesships the library to all end-users. Move it todevDependencies(or conditionally import it) to trim bundle size.@@ "@mui/joy": "^5.0.0-beta.51", "@sinclair/typebox": "^0.34.25", "@tanstack/react-query": "^5.81.4", - "@tanstack/react-query-devtools": "^5.81.4", @@ "zustand": "^5.0.3" }, "devDependencies": { + "@tanstack/react-query-devtools": "^5.81.4", "@types/node": "22.15.31",📝 Committable suggestion
🤖 Prompt for AI Agents