-
Notifications
You must be signed in to change notification settings - Fork 187
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
Refactor ruleset management #4174
Conversation
|
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.
Great work so far, however, threre are a few things that need review!
Let's keep up the good work! 💪🏻
public/controllers/management/components/management/cdblists/main-cdblists.tsx
Outdated
Show resolved
Hide resolved
public/controllers/management/components/management/cdblists/main-cdblists.tsx
Outdated
Show resolved
Hide resolved
public/controllers/management/components/management/ruleset/views/rule-info.tsx
Outdated
Show resolved
Hide resolved
public/controllers/management/components/management/ruleset/main-ruleset.tsx
Outdated
Show resolved
Hide resolved
public/controllers/management/components/management/common/actions-buttons.tsx
Show resolved
Hide resolved
public/controllers/management/components/management/common/actions-buttons.tsx
Show resolved
Hide resolved
public/controllers/management/components/management/decoders/components/decoders-table.tsx
Show resolved
Hide resolved
public/controllers/management/components/management/decoders/components/flyout-detail.tsx
Show resolved
Hide resolved
public/controllers/management/components/management/decoders/main-decoders.tsx
Outdated
Show resolved
Hide resolved
@Mayons95 could you please specify which roles/permissions were used in your tests? I used a read-only rules test case and this was the outcome. |
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.
LGTM!
* Refactored implementation of wazuh table * Refactored action buttons * Partial commit ruleset views segregation * Added searchbar input custom filter buttons * Added Custom Field Filter to table & removed redux from action buttons * Segregated file tables * set showingFiles locally * Fixed details flyout * Segregate views * Removed redux from ruleset editor * refactored Decoders section * delete obsolete decoder-info * Fixed decoder flyout * Added decoder info.tsx * Remove unused files * Set CDBList views * Dynamically build table custom action buttons * Deleted hardcoded export csv filename * Fix CDB List row click handler * Fixed suggestions and custom actions responsive styles * columns configuration fix * wzApiTable optimization + obsolete redux cleaning * Implemented Wazuh flyouts * Convert to typescript * Extracted tables components * Fix mapStateToProps to null * Removed ruleset redux files * Removed Add CDB List button in ruleset and decoders views * Fix missing updateListContent * Added external reload to the tables * Fixed redirectRule url cleaning * Fix onClose modal preventDefault * Fix reload props * Fix onClick modal preventDefault * Clean code comments * Added error handling to tables columns * removed deprecated code * Fixed file description and objects destructuring * Refactored class components to functional * Changed file view state handling * Refactored implementation of wazuh table * Refactored action buttons * Partial commit ruleset views segregation * Added searchbar input custom filter buttons * Added Custom Field Filter to table & removed redux from action buttons * Segregated file tables * set showingFiles locally * Fixed details flyout * Segregate views * Removed redux from ruleset editor * refactored Decoders section * delete obsolete decoder-info * Fixed decoder flyout * Added decoder info.tsx * Remove unused files * Set CDBList views * Dynamically build table custom action buttons * Deleted hardcoded export csv filename * Fix CDB List row click handler * Fixed suggestions and custom actions responsive styles * columns configuration fix * wzApiTable optimization + obsolete redux cleaning * Implemented Wazuh flyouts * Convert to typescript * Extracted tables components * Fix mapStateToProps to null * Removed ruleset redux files * Removed Add CDB List button in ruleset and decoders views * Fix missing updateListContent * Added external reload to the tables * Fixed redirectRule url cleaning * Fix onClose modal preventDefault * Fix reload props * Fix onClick modal preventDefault * Clean code comments * Added error handling to tables columns * removed deprecated code * Fixed file description and objects destructuring * Refactored class components to functional * Changed file view state handling * Remove unused imports * Fixed ResourcesHandler * Added interfaces and fixed comments * Add section contants * Code styling * Replaced string for constants Co-authored-by: Alex Ruiz Becerra <alejandro.ruiz.becerra@wazuh.com> (cherry picked from commit 5db8ae0)
* Refactored implementation of wazuh table * Refactored action buttons * Partial commit ruleset views segregation * Added searchbar input custom filter buttons * Added Custom Field Filter to table & removed redux from action buttons * Segregated file tables * set showingFiles locally * Fixed details flyout * Segregate views * Removed redux from ruleset editor * refactored Decoders section * delete obsolete decoder-info * Fixed decoder flyout * Added decoder info.tsx * Remove unused files * Set CDBList views * Dynamically build table custom action buttons * Deleted hardcoded export csv filename * Fix CDB List row click handler * Fixed suggestions and custom actions responsive styles * columns configuration fix * wzApiTable optimization + obsolete redux cleaning * Implemented Wazuh flyouts * Convert to typescript * Extracted tables components * Fix mapStateToProps to null * Removed ruleset redux files * Removed Add CDB List button in ruleset and decoders views * Fix missing updateListContent * Added external reload to the tables * Fixed redirectRule url cleaning * Fix onClose modal preventDefault * Fix reload props * Fix onClick modal preventDefault * Clean code comments * Added error handling to tables columns * removed deprecated code * Fixed file description and objects destructuring * Refactored class components to functional * Changed file view state handling * Refactored implementation of wazuh table * Refactored action buttons * Partial commit ruleset views segregation * Added searchbar input custom filter buttons * Added Custom Field Filter to table & removed redux from action buttons * Segregated file tables * set showingFiles locally * Fixed details flyout * Segregate views * Removed redux from ruleset editor * refactored Decoders section * delete obsolete decoder-info * Fixed decoder flyout * Added decoder info.tsx * Remove unused files * Set CDBList views * Dynamically build table custom action buttons * Deleted hardcoded export csv filename * Fix CDB List row click handler * Fixed suggestions and custom actions responsive styles * columns configuration fix * wzApiTable optimization + obsolete redux cleaning * Implemented Wazuh flyouts * Convert to typescript * Extracted tables components * Fix mapStateToProps to null * Removed ruleset redux files * Removed Add CDB List button in ruleset and decoders views * Fix missing updateListContent * Added external reload to the tables * Fixed redirectRule url cleaning * Fix onClose modal preventDefault * Fix reload props * Fix onClick modal preventDefault * Clean code comments * Added error handling to tables columns * removed deprecated code * Fixed file description and objects destructuring * Refactored class components to functional * Changed file view state handling * Remove unused imports * Fixed ResourcesHandler * Added interfaces and fixed comments * Add section contants * Code styling * Replaced string for constants Co-authored-by: Alex Ruiz Becerra <alejandro.ruiz.becerra@wazuh.com> (cherry picked from commit 5db8ae0)
Refactor ruleset management (#4174) * Refactored implementation of wazuh table * Refactored action buttons * Partial commit ruleset views segregation * Added searchbar input custom filter buttons * Added Custom Field Filter to table & removed redux from action buttons * Segregated file tables * set showingFiles locally * Fixed details flyout * Segregate views * Removed redux from ruleset editor * refactored Decoders section * delete obsolete decoder-info * Fixed decoder flyout * Added decoder info.tsx * Remove unused files * Set CDBList views * Dynamically build table custom action buttons * Deleted hardcoded export csv filename * Fix CDB List row click handler * Fixed suggestions and custom actions responsive styles * columns configuration fix * wzApiTable optimization + obsolete redux cleaning * Implemented Wazuh flyouts * Convert to typescript * Extracted tables components * Fix mapStateToProps to null * Removed ruleset redux files * Removed Add CDB List button in ruleset and decoders views * Fix missing updateListContent * Added external reload to the tables * Fixed redirectRule url cleaning * Fix onClose modal preventDefault * Fix reload props * Fix onClick modal preventDefault * Clean code comments * Added error handling to tables columns * removed deprecated code * Fixed file description and objects destructuring * Refactored class components to functional * Changed file view state handling * Refactored implementation of wazuh table * Refactored action buttons * Partial commit ruleset views segregation * Added searchbar input custom filter buttons * Added Custom Field Filter to table & removed redux from action buttons * Segregated file tables * set showingFiles locally * Fixed details flyout * Segregate views * Removed redux from ruleset editor * refactored Decoders section * delete obsolete decoder-info * Fixed decoder flyout * Added decoder info.tsx * Remove unused files * Set CDBList views * Dynamically build table custom action buttons * Deleted hardcoded export csv filename * Fix CDB List row click handler * Fixed suggestions and custom actions responsive styles * columns configuration fix * wzApiTable optimization + obsolete redux cleaning * Implemented Wazuh flyouts * Convert to typescript * Extracted tables components * Fix mapStateToProps to null * Removed ruleset redux files * Removed Add CDB List button in ruleset and decoders views * Fix missing updateListContent * Added external reload to the tables * Fixed redirectRule url cleaning * Fix onClose modal preventDefault * Fix reload props * Fix onClick modal preventDefault * Clean code comments * Added error handling to tables columns * removed deprecated code * Fixed file description and objects destructuring * Refactored class components to functional * Changed file view state handling * Remove unused imports * Fixed ResourcesHandler * Added interfaces and fixed comments * Add section contants * Code styling * Replaced string for constants Co-authored-by: Alex Ruiz Becerra <alejandro.ruiz.becerra@wazuh.com> (cherry picked from commit 5db8ae0) Co-authored-by: Federico Rodriguez <federico.rodriguez@wazuh.com>
Refactor ruleset management (#4174) * Refactored implementation of wazuh table * Refactored action buttons * Partial commit ruleset views segregation * Added searchbar input custom filter buttons * Added Custom Field Filter to table & removed redux from action buttons * Segregated file tables * set showingFiles locally * Fixed details flyout * Segregate views * Removed redux from ruleset editor * refactored Decoders section * delete obsolete decoder-info * Fixed decoder flyout * Added decoder info.tsx * Remove unused files * Set CDBList views * Dynamically build table custom action buttons * Deleted hardcoded export csv filename * Fix CDB List row click handler * Fixed suggestions and custom actions responsive styles * columns configuration fix * wzApiTable optimization + obsolete redux cleaning * Implemented Wazuh flyouts * Convert to typescript * Extracted tables components * Fix mapStateToProps to null * Removed ruleset redux files * Removed Add CDB List button in ruleset and decoders views * Fix missing updateListContent * Added external reload to the tables * Fixed redirectRule url cleaning * Fix onClose modal preventDefault * Fix reload props * Fix onClick modal preventDefault * Clean code comments * Added error handling to tables columns * removed deprecated code * Fixed file description and objects destructuring * Refactored class components to functional * Changed file view state handling * Refactored implementation of wazuh table * Refactored action buttons * Partial commit ruleset views segregation * Added searchbar input custom filter buttons * Added Custom Field Filter to table & removed redux from action buttons * Segregated file tables * set showingFiles locally * Fixed details flyout * Segregate views * Removed redux from ruleset editor * refactored Decoders section * delete obsolete decoder-info * Fixed decoder flyout * Added decoder info.tsx * Remove unused files * Set CDBList views * Dynamically build table custom action buttons * Deleted hardcoded export csv filename * Fix CDB List row click handler * Fixed suggestions and custom actions responsive styles * columns configuration fix * wzApiTable optimization + obsolete redux cleaning * Implemented Wazuh flyouts * Convert to typescript * Extracted tables components * Fix mapStateToProps to null * Removed ruleset redux files * Removed Add CDB List button in ruleset and decoders views * Fix missing updateListContent * Added external reload to the tables * Fixed redirectRule url cleaning * Fix onClose modal preventDefault * Fix reload props * Fix onClick modal preventDefault * Clean code comments * Added error handling to tables columns * removed deprecated code * Fixed file description and objects destructuring * Refactored class components to functional * Changed file view state handling * Remove unused imports * Fixed ResourcesHandler * Added interfaces and fixed comments * Add section contants * Code styling * Replaced string for constants Co-authored-by: Alex Ruiz Becerra <alejandro.ruiz.becerra@wazuh.com> (cherry picked from commit 5db8ae0) Co-authored-by: Federico Rodriguez <federico.rodriguez@wazuh.com>
Description
This PR refactors the views related to the management of the ruleset:
redirectRule
query param. It could not retrieve the rule details if it was not in the first 500 resultsCloses #4105
Screenshots
Table view
Details flyout
Test cases
Summary
All calls to action and navigation elements should be tested in Rules, Decoders, CDB Lists modules. When in doubt, compare the behavior of the feature with any 4.3.x Wazuh version
Tests:
All table features
Manage rule files
,Add new rule file
,Refresh
,Export formatted
, etc.)Clicking a row in the rules or decoders tables should open a flyout with the details of the selected item.
Clicking a
rule.id
in the Events table should load the rules view with an open flyout showing the selected rule information