-
Notifications
You must be signed in to change notification settings - Fork 14
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 zookeeper-wait chart #240
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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.
Hey @duyet - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟡 General issues: 2 issues found
- 🟡 Security: 1 issue found
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.
import { BarChart } from '../tremor/bar' | ||
import { type ChartProps } from './chart-props' | ||
|
||
export async function ChartZookeeperWait({ |
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.
suggestion: Function name should be in camelCase
The function name 'ChartZookeeperWait' should be in camelCase to follow JavaScript naming conventions. Consider renaming it to 'chartZookeeperWait'.
export async function ChartZookeeperWait({ | |
export async function chartZookeeperWait({ |
lastHours = 24 * 7, | ||
className, | ||
}: ChartProps) { | ||
const query = ` |
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.
🚨 issue (security): Potential SQL injection risk
Using template literals for SQL queries can introduce SQL injection risks. Consider using parameterized queries to mitigate this risk.
categories={['AVG_ProfileEvent_ZooKeeperWaitSeconds']} | ||
readableColumn="readable_AVG_ProfileEvent_ZooKeeperWaitSeconds" | ||
className="h-52" | ||
stack |
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.
question: Clarify the purpose of 'stack' prop
The 'stack' prop is used here without any context. Consider adding a comment or documentation to explain its purpose and how it affects the BarChart component.
No description provided.