-
Notifications
You must be signed in to change notification settings - Fork 10
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
feat: add rows limit to query settings #1291
feat: add rows limit to query settings #1291
Conversation
name="limitRows" | ||
control={control} | ||
render={({field}) => ( | ||
<React.Fragment> |
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.
Fragment
is redundant
{QUERY_SETTINGS_FIELD_SETTINGS.limitRows.title} | ||
</label> | ||
<div className={b('control-wrapper')}> | ||
<Controller |
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.
let's add validation in Controller
?
src/store/reducers/executeQuery.ts
Outdated
@@ -233,6 +233,7 @@ export const executeQueryApi = api.injectEndpoints({ | |||
querySettings.tracingLevel && enableTracingLevel | |||
? TracingLevelNumber[querySettings.tracingLevel] | |||
: undefined, | |||
limit_rows: querySettings.limitRows || undefined, |
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.
will it be possible to run query without this setting at all?
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.
now it is running without this setting
or I didnt get your idea
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.
Just wanted to double-check that limit_rows
may be undefined
and nothing breaks!
src/containers/Tenant/Query/QuerySettingsDialog/QuerySettingsDialog.tsx
Outdated
Show resolved
Hide resolved
...ainers/Tenant/Query/QueryEditorControls/utils/getChangedQueryExecutionSettingsDescription.ts
Outdated
Show resolved
Hide resolved
src/containers/Tenant/Query/QuerySettingsDialog/QuerySettingsDialog.tsx
Outdated
Show resolved
Hide resolved
src/containers/Tenant/Query/QuerySettingsDialog/QuerySettingsDialog.tsx
Outdated
Show resolved
Hide resolved
src/containers/Tenant/Query/QuerySettingsDialog/QuerySettingsDialog.tsx
Outdated
Show resolved
Hide resolved
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.
It seems you need to update some tests.
@ValeraS Actually we cant use z.coerce as it changes the original values |
Why are timeout and rows limit not numbers? |
I suppose it's because TextInput works with strings |
How types of query options depend on view(TextInput)? |
no need in typecasts in view props |
Closes #1253
Stand
CI Results
Test Status:⚠️ FLAKY
📊 Full Report
Bundle Size: 🔺
Current: 79.01 MB | Main: 78.99 MB
Diff: +0.02 MB (0.02%)
ℹ️ CI Information