Skip to content
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

Merged
merged 1 commit into from
May 18, 2024
Merged

feat: add zookeeper-wait chart #240

merged 1 commit into from
May 18, 2024

Conversation

duyet
Copy link
Owner

@duyet duyet commented May 18, 2024

No description provided.

Copy link

vercel bot commented May 18, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
clickhouse-monitoring ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 18, 2024 4:05pm

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a 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

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
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({
Copy link
Contributor

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'.

Suggested change
export async function ChartZookeeperWait({
export async function chartZookeeperWait({

lastHours = 24 * 7,
className,
}: ChartProps) {
const query = `
Copy link
Contributor

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
Copy link
Contributor

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.

@duyet duyet merged commit e16e600 into main May 18, 2024
14 checks passed
@duyet duyet deleted the chore/ui branch May 18, 2024 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant