-
Notifications
You must be signed in to change notification settings - Fork 293
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 a filter on current and residual risk levels on risk scenarios #1442
feat: add a filter on current and residual risk levels on risk scenarios #1442
Conversation
…risk-levels-on-risk-scenarios-model-table-view
WalkthroughThe pull request introduces two new filter configurations in the Changes
Suggested Reviewers
Poem
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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)
frontend/src/lib/utils/table.ts (1)
479-481
: Consider grouping related filters together.For better organization and user experience, consider grouping risk-related filters together. Move
current_level
andresidual_level
filters next to other risk-related filters liketreatment
.filters: { folder: { ...DOMAIN_FILTER_FROM_PROJECT, alwaysDisplay: true }, project: { ...PROJECT_FILTER, alwaysDisplay: true }, treatment: { ...TREATMENT_FILTER, alwaysDisplay: true }, + current_level: CURRENT_LEVEL_FILTER, + residual_level: RESIDUAL_LEVEL_FILTER, risk_assessment: RISK_ASSESSMENT_FILTER, threats: THREAT_FILTER, - assets: ASSET_FILTER, - current_level: CURRENT_LEVEL_FILTER, - residual_level: RESIDUAL_LEVEL_FILTER + assets: ASSET_FILTER }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
frontend/src/lib/utils/table.ts
(2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (9)
- GitHub Check: enterprise-startup-functional-test (3.12)
- GitHub Check: startup-functional-test (3.12)
- GitHub Check: functional-tests (3.12, chromium)
- GitHub Check: startup-docker-compose-test
- GitHub Check: Analyze (python)
- GitHub Check: Analyze (javascript-typescript)
- GitHub Check: migrations-check (3.12)
- GitHub Check: enterprise-startup-docker-compose-test
- GitHub Check: enterprise-functional-tests (3.12, chromium)
🔇 Additional comments (1)
frontend/src/lib/utils/table.ts (1)
231-247
: Add null checks for nested properties.The
getColumn
functions assume thatcurrent_level
andresidual_level
always exist and have aname
property. This could lead to runtime errors if these properties are undefined.Let's verify if these properties can be null/undefined:
Add a filter on current and residual risk levels on risk scenarios model table view
Summary by CodeRabbit