-
Notifications
You must be signed in to change notification settings - Fork 0
feat(traffic): Add unknown domains sub-tab #36
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
Code Review SummaryThis pull request introduces a valuable new "Unknown Domains" tab to the Traffic Dashboard. This feature provides dedicated insights into traffic originating from unconfigured domains, including top unknown domains and their source IPs. The implementation is well-structured, leveraging existing patterns and introducing new API calls and UI components effectively. 🚀 Key Improvements
💡 Minor Suggestions
|
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.
d45efea to
8cd7b90
Compare
Deploying flatrun-ui with
|
| Latest commit: |
22ed6d7
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://52c8c464.flatrun-ui.pages.dev |
| Branch Preview URL: | https://feat-configurable-detection.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.
| <div class="suspicious-info"> | ||
| <code>{{ entry.ip }}</code> | ||
| <div class="unknown-domains-list"> | ||
| <span v-for="domain in entry.domains.slice(0, 3)" :key="domain" class="tag"> |
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.
The hardcoded number 3 for entry.domains.slice(0, 3) would be more maintainable if defined as a constant within the THRESHOLDS object. This makes it easier to adjust display limits consistently across similar UI elements without searching through the code.
| <span v-for="domain in entry.domains.slice(0, 3)" :key="domain" class="tag"> | |
| <span v-for="domain in entry.domains.slice(0, THRESHOLDS.MAX_UNKNOWN_DOMAIN_IPS_DISPLAY)" :key="domain" class="tag"> |
| <span v-for="domain in entry.domains.slice(0, 3)" :key="domain" class="tag"> | ||
| {{ domain }} | ||
| </span> | ||
| <span v-if="entry.domains.length > 3" class="tag">+{{ entry.domains.length - 3 }}</span> |
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.
Similar to the previous suggestion, referencing a constant from THRESHOLDS for entry.domains.length - 3 would improve maintainability and consistency.
| <span v-if="entry.domains.length > 3" class="tag">+{{ entry.domains.length - 3 }}</span> | |
| <span v-if="entry.domains.length > THRESHOLDS.MAX_UNKNOWN_DOMAIN_IPS_DISPLAY" class="tag">+{{ entry.domains.length - THRESHOLDS.MAX_UNKNOWN_DOMAIN_IPS_DISPLAY }}</span> |
| } finally { | ||
| loadingUnknown.value = false; | ||
| } |
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.
To maintain a consistent error reporting mechanism across the application, it's recommended to use the notifications store for displaying errors encountered during API calls. This provides a unified user experience for error feedback.
| } finally { | |
| loadingUnknown.value = false; | |
| } | |
| notifications.error("Error", `Failed to fetch unknown domain stats: ${e.message}`); |
Add sub-tab under Traffic & Performance to display requests to domains not matching any deployment, with top domains, source IPs, and ability to block suspicious actors. Signed-off-by: nfebe <fenn25.fn@gmail.com>
8cd7b90 to
22ed6d7
Compare
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. No specific code suggestions were generated. See the overview comment for a summary.
Add sub-tab under Traffic & Performance to display requests to domains not matching any deployment, with top domains, source IPs, and ability to block suspicious actors.