-
Notifications
You must be signed in to change notification settings - Fork 0
Update BCM display in host details #6
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
- Change label from "BCM Link" to "BCM Node" - Display only node UUID instead of full URL - Extract UUID from BCM link using regex pattern - Keep full URL as clickable link target
WalkthroughRenamed "BCM Link" to "BCM Node" and added regex-based extraction of a node ID from device URLs for display; removed Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
💤 Files with no reviewable changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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
🧹 Nitpick comments (1)
src/pages/HostDetail.tsx (1)
282-288: Implementation meets PR objectives. Consider a more precise UUID pattern.The UUID extraction logic correctly preserves the full URL as the link target while displaying only the node ID. The fallback to the full URL ensures robustness if the regex doesn't match.
For stricter validation, consider using a more precise UUID pattern:
- {(() => { - // Extract node ID from URL like: https://bcm.service.demo:8081/base-view/device/5d0ac70b-0b46-4338-9003-3d785d46b7e4 - const match = host.spec.bcm_link.match(/\/device\/([a-f0-9-]+)/i) - return match ? match[1] : host.spec.bcm_link - })()} + {(() => { + // Extract node ID from URL like: https://bcm.service.demo:8081/base-view/device/5d0ac70b-0b46-4338-9003-3d785d46b7e4 + const match = host.spec.bcm_link.match(/\/device\/([a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12})/i) + return match ? match[1] : host.spec.bcm_link + })()}This ensures the pattern matches valid UUID format (8-4-4-4-12 hex digits) rather than any sequence of hex characters and hyphens.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/pages/HostDetail.tsx(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Build application
- GitHub Check: Verify container build
🔇 Additional comments (1)
src/pages/HostDetail.tsx (1)
280-280: LGTM! Clear label change.The label update from "BCM Link" to "BCM Node" accurately reflects that the display now shows the node UUID rather than a full URL.
- kubectl is not used by the Express server - Reduces image size by ~50MB - Reduces attack surface - Improves container security posture
Summary by CodeRabbit
New Features
Chores
✏️ Tip: You can customize this high-level summary in your review settings.