-
Notifications
You must be signed in to change notification settings - Fork 0
feat(traffic): Add IP blocking and fix domain stats display #33
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
nfebe
commented
Dec 22, 2025
- Fix domains showing 0: traffic logs use domain names not project names, so removed filtering by deployment names
- Add suspicious IPs section with block button for IPs with >30% traffic or >500 requests
- Add IP blocking via existing securityApi.blockIP endpoint
- Add filter buttons on top source IPs
- Rename "Deployments" to "Domains" to reflect actual data
- Fix domains showing 0: traffic logs use domain names not project names, so removed filtering by deployment names - Add suspicious IPs section with block button for IPs with >30% traffic or >500 requests - Add IP blocking via existing securityApi.blockIP endpoint - Add filter buttons on top source IPs - Rename "Deployments" to "Domains" to reflect actual data Signed-off-by: nfebe <fenn25.fn@gmail.com>
Code Review SummaryThis Pull Request introduces significant improvements to the 🚀 Key Improvements
💡 Minor Suggestions
|
🔍 Code Review💡 1. **src/components/TrafficDashboard.vue** (Line 583) - CLARITYReplace the magic numbers Suggested Code: Current Code: return requestRatio > 0.3 || ip.request_count > 500;💡 2. **src/components/TrafficDashboard.vue** (Lines 850-852) - CLARITYModify Suggested Code: Current Code: const handleAlertAction = (alert: PerformanceAlert) => {
if (alert.action === "view") {
const depName = alert.id.replace("error-", "").replace("slow-", "");
navigateToDeploymentLogs(depName);
}
};Verdict: APPROVE Posted as a comment because posting a review failed. |
Signed-off-by: nfebe <fenn25.fn@gmail.com>
Deploying flatrun-ui with
|
| Latest commit: |
29a4527
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://e95e4d31.flatrun-ui.pages.dev |
| Branch Preview URL: | https://feat-traffic-ip-blocking.flatrun-ui.pages.dev |
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.
Review complete. See the overview comment for a summary.
| .slice(0, THRESHOLDS.MAX_SLOW_ENDPOINTS) | ||
| .map((p) => ({ | ||
| path: p.path, | ||
| deployment: p.deployment, |
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.
For better type safety and clarity, consider explicitly typing the catch variable as Error. This makes it clear that you expect an Error object and allows for safer access to its properties, like message, without relying on the any type.
Alternatively, you could use unknown and add a type guard (if (e instanceof Error)) for even more robust error handling.
| deployment: p.deployment, | |
| } catch (e: Error) { |