-
Notifications
You must be signed in to change notification settings - Fork 715
fix: Multi stream debug log #3770
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
Conversation
WalkthroughThe changes primarily enhance how the Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
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.
Actionable comments posted: 0
Outside diff range and nitpick comments (4)
web/src/composables/useLogs.ts (4)
Line range hint
582-585: Consider using.flatMap()instead of.map().flat()for better performance and readability.- let fieldStreams = searchObj.data.stream.selectedStreamFields - .map((field) => field.streams) - .flat(); + let fieldStreams = searchObj.data.stream.selectedStreamFields + .flatMap((field) => field.streams);
Line range hint
472-472: Replace.hasOwnProperty()withObject.hasOwn()to avoid potential issues with prototype chain lookups.- if (obj.hasOwnProperty("key")) + if (Object.hasOwn(obj, "key"))Also applies to: 1061-1061, 1065-1065, 1294-1294, 1498-1498, 1687-1687, 1690-1690, 1918-1918, 1932-1932
Line range hint
1528-1528: Consider using undefined assignment instead of thedeleteoperator to potentially enhance performance.- delete queryReq.aggs; + queryReq.aggs = undefined;Also applies to: 1529-1529, 1533-1533, 1534-1534, 1738-1738, 1739-1739, 1839-1839
Line range hint
431-433: Thiselseclause is unnecessary as all previous branches of the conditional return or throw, making theelseredundant.- else { - return false; - }
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (2)
- web/src/composables/useLogs.ts (1 hunks)
- web/src/plugins/logs/IndexList.vue (1 hunks)
Files skipped from review due to trivial changes (1)
- web/src/plugins/logs/IndexList.vue
Additional context used
Biome
web/src/composables/useLogs.ts
[error] 431-433: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)
Unsafe fix: Omit the else clause.
[error] 472-472: Do not access Object.prototype method 'hasOwnProperty' from target object. (lint/suspicious/noPrototypeBuiltins)
It's recommended using Object.hasOwn() instead of using Object.hasOwnProperty().
See MDN web docs for more details.
[error] 582-585: The call chain .map().flat() can be replaced with a single .flatMap() call. (lint/complexity/useFlatMap)
Safe fix: Replace the chain with .flatMap().
[error] 599-599: Unnecessary use of boolean literals in conditional expression. (lint/complexity/noUselessTernary)
Simplify your code by directly assigning the result without using a ternary operator.
If your goal is negation, you may use the logical NOT (!) or double NOT (!!) operator for clearer and concise code.
Check for more details about NOT operator.
Unsafe fix: Remove the conditional expression with
[error] 1061-1061: Do not access Object.prototype method 'hasOwnProperty' from target object. (lint/suspicious/noPrototypeBuiltins)
It's recommended using Object.hasOwn() instead of using Object.hasOwnProperty().
See MDN web docs for more details.
[error] 1065-1065: Do not access Object.prototype method 'hasOwnProperty' from target object. (lint/suspicious/noPrototypeBuiltins)
It's recommended using Object.hasOwn() instead of using Object.hasOwnProperty().
See MDN web docs for more details.
[error] 1040-1040: This code is unreachable (lint/correctness/noUnreachable)
[error] 1294-1294: Do not access Object.prototype method 'hasOwnProperty' from target object. (lint/suspicious/noPrototypeBuiltins)
It's recommended using Object.hasOwn() instead of using Object.hasOwnProperty().
See MDN web docs for more details.
[error] 1498-1498: Do not access Object.prototype method 'hasOwnProperty' from target object. (lint/suspicious/noPrototypeBuiltins)
It's recommended using Object.hasOwn() instead of using Object.hasOwnProperty().
See MDN web docs for more details.
[error] 1528-1528: Avoid the delete operator which can impact performance. (lint/performance/noDelete)
Unsafe fix: Use an undefined assignment instead.
[error] 1529-1529: Avoid the delete operator which can impact performance. (lint/performance/noDelete)
Unsafe fix: Use an undefined assignment instead.
[error] 1533-1533: Avoid the delete operator which can impact performance. (lint/performance/noDelete)
Unsafe fix: Use an undefined assignment instead.
[error] 1534-1534: Avoid the delete operator which can impact performance. (lint/performance/noDelete)
Unsafe fix: Use an undefined assignment instead.
[error] 1687-1687: Do not access Object.prototype method 'hasOwnProperty' from target object. (lint/suspicious/noPrototypeBuiltins)
It's recommended using Object.hasOwn() instead of using Object.hasOwnProperty().
See MDN web docs for more details.
[error] 1690-1690: Do not access Object.prototype method 'hasOwnProperty' from target object. (lint/suspicious/noPrototypeBuiltins)
It's recommended using Object.hasOwn() instead of using Object.hasOwnProperty().
See MDN web docs for more details.
[error] 1738-1738: Avoid the delete operator which can impact performance. (lint/performance/noDelete)
Unsafe fix: Use an undefined assignment instead.
[error] 1739-1739: Avoid the delete operator which can impact performance. (lint/performance/noDelete)
Unsafe fix: Use an undefined assignment instead.
[error] 1839-1839: Avoid the delete operator which can impact performance. (lint/performance/noDelete)
Unsafe fix: Use an undefined assignment instead.
[error] 1918-1918: Do not access Object.prototype method 'hasOwnProperty' from target object. (lint/suspicious/noPrototypeBuiltins)
It's recommended using Object.hasOwn() instead of using Object.hasOwnProperty().
See MDN web docs for more details.
[error] 1932-1932: Do not access Object.prototype method 'hasOwnProperty' from target object. (lint/suspicious/noPrototypeBuiltins)
It's recommended using Object.hasOwn() instead of using Object.hasOwnProperty().
See MDN web docs for more details.
Additional comments not posted (2)
web/src/composables/useLogs.ts (2)
2348-2350: This implementation ensures unique values ininterestingFieldListby converting it to aSetand then back to an array. This is a valid and efficient method to remove duplicates from an array.
Line range hint
599-599: Simplify the ternary operation by directly using the boolean value.
[REFACTOR_SUGGESTion]- searchObj.meta.quickMode = queryParams.quick_mode == "false" ? false : true; + searchObj.meta.quickMode = queryParams.quick_mode !== "false";
- Removed debug log - Removed duplicate interesting field for multistream <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Improvements** - Enhanced handling of the `interestingFieldList` for better data processing. - Removed unnecessary `console.log` statements for cleaner console output. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
Summary by CodeRabbit
interestingFieldListfor better data processing.console.logstatements for cleaner console output.