Skip to content

fix: agrega filtro select url#253

Merged
mateodurante merged 2 commits into
developfrom
fix/filter_select
May 4, 2026
Merged

fix: agrega filtro select url#253
mateodurante merged 2 commits into
developfrom
fix/filter_select

Conversation

@mateodurante
Copy link
Copy Markdown
Contributor

This pull request enhances the filter components across several list and modal views by introducing controlled value and setter props for each filter. This change ensures that the selected values in filter dropdowns are properly managed and synchronized, improving the reliability and user experience of filtering throughout the application.

Filter state management improvements:

  • Added new state variables (e.g., valueStateFilter, valueTypeFilter, etc.) for holding the selected value of each filter in all relevant views: ListCase.jsx, ModalListCase.jsx, ListNetwork.jsx, ListTaxonomies.jsx, and ListTemplate.jsx. [1] [2] [3] [4] [5]

  • Updated filter component usages to pass the new value and setValue props, ensuring that dropdown selections are controlled and consistent across renders. This was applied to all relevant filters in the affected files. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15]

Component logic update:

  • Modified the filter selection handler in FilterSelectUrl.jsx to use setValue (if provided) instead of relying on the presence of a value prop, making the component more flexible and compatible with the new controlled value approach.

Copilot AI review requested due to automatic review settings May 4, 2026 12:13
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves frontend filtering reliability by converting several react-select-based filters to controlled components (explicit value + setValue) and updating FilterSelectUrl to update selection state via setValue.

Changes:

  • Added per-filter controlled selection state (value*Filter) in multiple list/modal views and passed value/setValue into filter components.
  • Updated FilterSelectUrl to call setValue when available (instead of gating on value being truthy), aligning it with the controlled pattern.
  • Ensured setCurrentPage is provided where FilterSelectUrl requires it (e.g., template/taxonomy/network views).

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
frontend/src/views/template/ListTemplate.jsx Adds controlled select state for feed/taxonomy filters and passes value/setValue/setCurrentPage into FilterSelectUrl.
frontend/src/views/taxonomy/ListTaxonomies.jsx Adds controlled select state for multiple filters and wires value/setValue into FilterSelectUrl/FilterSelect.
frontend/src/views/network/ListNetwork.jsx Adds controlled select state for entity/type filters and passes value/setValue into filter components.
frontend/src/views/case/ModalListCase.jsx Adds controlled select state for priority/tlp/state filters inside the modal and passes value/setValue to FilterSelectUrl.
frontend/src/views/case/ListCase.jsx Adds controlled select state for state filter and wires it into FilterSelectUrl.
frontend/src/components/Filter/FilterSelectUrl.jsx Updates selection handler to set controlled value via setValue when provided.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread frontend/src/views/case/ModalListCase.jsx
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@mateodurante mateodurante merged commit 946f723 into develop May 4, 2026
6 checks passed
mateodurante added a commit that referenced this pull request May 13, 2026
* feat: Implement Analyzer and AnalyzerMapping models with associated s… (#250)

* feat: Implement Analyzer and AnalyzerMapping models with associated serializers and views

- Added Analyzer model with fields for name, type, enabled status, config, and description.
- Created AnalyzerMapping model with foreign key to Analyzer and fields for mapping_from and mapping_to.
- Developed serializers for both models to handle validation and representation.
- Introduced viewsets for Analyzer and AnalyzerMapping, including custom actions for testing connections and retrieving vulnerability choices.
- Updated event retesting functionality to support analyzer mappings, allowing for dynamic selection of analyzers during event retests.
- Enhanced frontend component to utilize dropdown for selecting analyzers when retesting events.
- Added filters for Analyzer and AnalyzerMapping models to improve query capabilities.
- Implemented migrations for new models and relationships, ensuring database integrity.
- Created unit tests for Analyzer and AnalyzerMapping models to validate functionality and constraints.

Co-authored-by: Copilot <copilot@github.com>

* Potential fix for pull request finding 'CodeQL / Information exposure through an exception'

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

* Update ngen/analyzers/kintun.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update frontend/src/views/analyzer/components/FormAnalyzer.jsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* feat: Make analyzer selection required in Create and Edit Analyzer Mapping forms; update KintunAdapter to disable redirects and improve error logging

Co-authored-by: Copilot <copilot@github.com>

* feat: Refactor analyzer configuration to include port and SSL options; update translations and form handling

---------

Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* new evidence notification (#251)

* cleanup translations (#252)

* fix: agrega filtro select url (#253)

* fix: agrega filtro select url

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Fix: Avoid raise condition con sending email inside atomic transaction (#254)

* avoid raise condition con sending email inside atomic transaction

* better traceback

* tests fix for transaction on_commit

* fix entity too large nginx upload file

---------

Co-authored-by: Ulises Martín Cabrera <ucabrera@cert.unlp.edu.ar>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.

2 participants