-
Notifications
You must be signed in to change notification settings - Fork 713
fix: restrict select * query for visualization
#8302
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
Merged
Conversation
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
ktx-kirtan
approved these changes
Sep 5, 2025
ktx-kirtan
approved these changes
Sep 10, 2025
ktx-abhay
added a commit
that referenced
this pull request
Sep 10, 2025
- #8338 Resolved Issues: - Implemented a check for `ZO_QUICK_MODE_ENABLED` before enabling quick mode on logs for visualization toggle. 1. If `ZO_QUICK_MODE_ENABLED=true`, quick mode is enabled when the query is `select *`. 2. Otherwise, `select *` query is always permitted in visualization mode. - Restricted the use of `SELECT *` queries in visualization mode. - As API call triggered on changing the chart type, such changes are now disallowed for `SELECT *` queries.
ktx-abhay
added a commit
that referenced
this pull request
Sep 10, 2025
- #8338 Resolved Issues: - Implemented a check for `ZO_QUICK_MODE_ENABLED` before enabling quick mode on logs for visualization toggle. 1. If `ZO_QUICK_MODE_ENABLED=true`, quick mode is enabled when the query is `select *`. 2. Otherwise, `select *` query is always permitted in visualization mode. - Restricted the use of `SELECT *` queries in visualization mode. - As API call triggered on changing the chart type, such changes are now disallowed for `SELECT *` queries.
ktx-abhay
added a commit
that referenced
this pull request
Sep 12, 2025
- #8338 Resolved Issues: - Implemented a check for `ZO_QUICK_MODE_ENABLED` before enabling quick mode on logs for visualization toggle. 1. If `ZO_QUICK_MODE_ENABLED=true`, quick mode is enabled when the query is `select *`. 2. Otherwise, `select *` query is always permitted in visualization mode. - Restricted the use of `SELECT *` queries in visualization mode. - As API call triggered on changing the chart type, such changes are now disallowed for `SELECT *` queries.
ktx-abhay
added a commit
that referenced
this pull request
Sep 12, 2025
- #8338 Resolved Issues: - Implemented a check for `ZO_QUICK_MODE_ENABLED` before enabling quick mode on logs for visualization toggle. 1. If `ZO_QUICK_MODE_ENABLED=true`, quick mode is enabled when the query is `select *`. 2. Otherwise, `select *` query is always permitted in visualization mode. - Restricted the use of `SELECT *` queries in visualization mode. - As API call triggered on changing the chart type, such changes are now disallowed for `SELECT *` queries.
ktx-abhay
added a commit
that referenced
this pull request
Sep 12, 2025
- #8338 Resolved Issues: - Implemented a check for `ZO_QUICK_MODE_ENABLED` before enabling quick mode on logs for visualization toggle. 1. If `ZO_QUICK_MODE_ENABLED=true`, quick mode is enabled when the query is `select *`. 2. Otherwise, `select *` query is always permitted in visualization mode. - Restricted the use of `SELECT *` queries in visualization mode. - As API call triggered on changing the chart type, such changes are now disallowed for `SELECT *` queries.
ktx-abhay
added a commit
that referenced
this pull request
Sep 12, 2025
- #8338 Resolved Issues: - Implemented a check for `ZO_QUICK_MODE_ENABLED` before enabling quick mode on logs for visualization toggle. 1. If `ZO_QUICK_MODE_ENABLED=true`, quick mode is enabled when the query is `select *`. 2. Otherwise, `select *` query is always permitted in visualization mode. - Restricted the use of `SELECT *` queries in visualization mode. - As API call triggered on changing the chart type, such changes are now disallowed for `SELECT *` queries.
ktx-abhay
added a commit
that referenced
this pull request
Sep 12, 2025
- #8338 Resolved Issues: - Implemented a check for `ZO_QUICK_MODE_ENABLED` before enabling quick mode on logs for visualization toggle. 1. If `ZO_QUICK_MODE_ENABLED=true`, quick mode is enabled when the query is `select *`. 2. Otherwise, `select *` query is always permitted in visualization mode. - Restricted the use of `SELECT *` queries in visualization mode. - As API call triggered on changing the chart type, such changes are now disallowed for `SELECT *` queries.
ktx-abhay
added a commit
that referenced
this pull request
Sep 12, 2025
- #8338 Resolved Issues: - Implemented a check for `ZO_QUICK_MODE_ENABLED` before enabling quick mode on logs for visualization toggle. 1. If `ZO_QUICK_MODE_ENABLED=true`, quick mode is enabled when the query is `select *`. 2. Otherwise, `select *` query is always permitted in visualization mode. - Restricted the use of `SELECT *` queries in visualization mode. - As API call triggered on changing the chart type, such changes are now disallowed for `SELECT *` queries.
ktx-abhay
added a commit
that referenced
this pull request
Sep 14, 2025
- #8338 Resolved Issues: - Implemented a check for `ZO_QUICK_MODE_ENABLED` before enabling quick mode on logs for visualization toggle. 1. If `ZO_QUICK_MODE_ENABLED=true`, quick mode is enabled when the query is `select *`. 2. Otherwise, `select *` query is always permitted in visualization mode. - Restricted the use of `SELECT *` queries in visualization mode. - As API call triggered on changing the chart type, such changes are now disallowed for `SELECT *` queries.
ktx-abhay
added a commit
that referenced
this pull request
Sep 15, 2025
- #8338 Resolved Issues: - Implemented a check for `ZO_QUICK_MODE_ENABLED` before enabling quick mode on logs for visualization toggle. 1. If `ZO_QUICK_MODE_ENABLED=true`, quick mode is enabled when the query is `select *`. 2. Otherwise, `select *` query is always permitted in visualization mode. - Restricted the use of `SELECT *` queries in visualization mode. - As API call triggered on changing the chart type, such changes are now disallowed for `SELECT *` queries.
ktx-abhay
added a commit
that referenced
this pull request
Sep 15, 2025
- #8338 Resolved Issues: - Implemented a check for `ZO_QUICK_MODE_ENABLED` before enabling quick mode on logs for visualization toggle. 1. If `ZO_QUICK_MODE_ENABLED=true`, quick mode is enabled when the query is `select *`. 2. Otherwise, `select *` query is always permitted in visualization mode. - Restricted the use of `SELECT *` queries in visualization mode. - As API call triggered on changing the chart type, such changes are now disallowed for `SELECT *` queries.
ktx-abhay
added a commit
that referenced
this pull request
Sep 15, 2025
- #8338 Resolved Issues: - Implemented a check for `ZO_QUICK_MODE_ENABLED` before enabling quick mode on logs for visualization toggle. 1. If `ZO_QUICK_MODE_ENABLED=true`, quick mode is enabled when the query is `select *`. 2. Otherwise, `select *` query is always permitted in visualization mode. - Restricted the use of `SELECT *` queries in visualization mode. - As API call triggered on changing the chart type, such changes are now disallowed for `SELECT *` queries.
ktx-abhay
added a commit
that referenced
this pull request
Sep 15, 2025
- #8338 Resolved Issues: - Implemented a check for `ZO_QUICK_MODE_ENABLED` before enabling quick mode on logs for visualization toggle. 1. If `ZO_QUICK_MODE_ENABLED=true`, quick mode is enabled when the query is `select *`. 2. Otherwise, `select *` query is always permitted in visualization mode. - Restricted the use of `SELECT *` queries in visualization mode. - As API call triggered on changing the chart type, such changes are now disallowed for `SELECT *` queries.
hengfeiyang
pushed a commit
that referenced
this pull request
Sep 15, 2025
- #8338 Resolved Issues: - Implemented a check for `ZO_QUICK_MODE_ENABLED` before enabling quick mode on logs for visualization toggle. 1. If `ZO_QUICK_MODE_ENABLED=true`, quick mode is enabled when the query is `select *`. 2. Otherwise, `select *` query is always permitted in visualization mode. - Restricted the use of `SELECT *` queries in visualization mode. - As API call triggered on changing the chart type, such changes are now disallowed for `SELECT *` queries.
ktx-abhay
added a commit
that referenced
this pull request
Sep 15, 2025
### **User description** - #8338 Resolved Issues: - Implemented a check for `ZO_QUICK_MODE_ENABLED` before enabling quick mode on logs for visualization toggle. 1. If `ZO_QUICK_MODE_ENABLED=true`, quick mode is enabled when the query is `select *`. 2. Otherwise, `select *` query is always permitted in visualization mode. - Restricted the use of `SELECT *` queries in visualization mode. - As API call triggered on changing the chart type, such changes are now disallowed for `SELECT *` queries. ___ ### **PR Type** Bug fix, Enhancement ___ ### **Description** - Block SELECT * in visualization when quick mode on - Respect quick-mode config before auto-enabling - Centralize SELECT * detection in sqlUtils - Prevent chart-type changes for SELECT * queries ___ ### Diagram Walkthrough ```mermaid flowchart LR A["sqlUtils.ts: isSimpleSelectAllQuery()"] -- "imported by" --> B["logs/Index.vue"] A -- "imported by" --> C["VisualizeLogsQuery.vue"] B -- "auto-enable quick mode only if config true" --> D["handleQuickModeChange()"] B -- "block run for SELECT * when quick mode" --> E["handleRunQueryFn()"] C -- "validate on chart type change" --> F["handleChartTypeChange()"] ``` <details> <summary><h3> File Walkthrough</h3></summary> <table><thead><tr><th></th><th align="left">Relevant files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><table> <tr> <td> <details> <summary><strong>sqlUtils.ts</strong><dd><code>Add reusable SELECT * query detector</code> </dd></summary> <hr> web/src/utils/query/sqlUtils.ts <ul><li>Add <code>isSimpleSelectAllQuery</code> utility with normalization.<br> <li> Export function for reuse across components.</ul> </details> </td> <td><a href="https://github.com/openobserve/openobserve/pull/8368/files#diff-dde40e8fcb5c37b06c011ede08922c44a3c025682fbc341aee97ba046b73a0e3">+17/-0</a> </td> </tr> </table></td></tr><tr><td><strong>Bug fix</strong></td><td><table> <tr> <td> <details> <summary><strong>Index.vue</strong><dd><code>Enforce quick mode/config and block SELECT * runs</code> </dd></summary> <hr> web/src/plugins/logs/Index.vue <ul><li>Import shared <code>isSimpleSelectAllQuery</code>.<br> <li> Remove local duplicate detector.<br> <li> Auto-enable quick mode only if config enabled.<br> <li> Block visualize run for SELECT * when quick mode enabled.</ul> </details> </td> <td><a href="https://github.com/openobserve/openobserve/pull/8368/files#diff-0323c3da69b369843c5d72bf4df5b00ca6b5147192a213baf331659ecf92af62">+32/-16</a> </td> </tr> <tr> <td> <details> <summary><strong>VisualizeLogsQuery.vue</strong><dd><code>Validate chart type changes against SELECT * queries</code> </dd></summary> <hr> web/src/plugins/logs/VisualizeLogsQuery.vue <ul><li>Replace v-model with explicit <code>selectedChartType</code> prop handling.<br> <li> Add <code>handleChartTypeChange</code> validating against SELECT * when quick mode.<br> <li> Import shared <code>isSimpleSelectAllQuery</code> and logs context.</ul> </details> </td> <td><a href="https://github.com/openobserve/openobserve/pull/8368/files#diff-979b01d943d58c5d70faeeac5948b7f02f0b2392a12b84ef07ba7f7393ab0261">+38/-2</a> </td> </tr> </table></td></tr></tr></tbody></table> </details> ___ --------- Co-authored-by: ktx-akshay <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
select *query on visualization page ifZO_QUICK_MODE_ENABLEDis true #8338Resolved Issues:
ZO_QUICK_MODE_ENABLEDbefore enabling quick mode on logs for visualization toggle.1. If
ZO_QUICK_MODE_ENABLED=true, quick mode is enabled when the query isselect *.2. Otherwise,
select *query is always permitted in visualization mode.SELECT *queries in visualization mode.SELECT *queries.