Skip to content

Commit

Permalink
Merge 4.10.0 into 4.10.1 (#7140)
Browse files Browse the repository at this point in the history
* Bump 4.10.0 rev 03 (#7110)

chore: bump 4.10.0 rev 03

* Substitute warning icon in events view (#7057)

* Sustitude warning icon

* Update Changelog

* Change to iInCircle

* Solve aria-label comments and fixed icon centered with text

* Solve aria-label nitpick

* fix: aria-label in some buttons

* fix: aria-label

---------

Co-authored-by: Antonio David Gutiérrez <[email protected]>

* Fix scroll in vulnerabilities inventory table (#7118)

* Remove fixed height in Vulnerabilities Inventory table

* Add changelog

* Fix ability to filter form FIM details (#7119)

* fix(fim): fix ability to filter from flyout details in FIM inventory

- Fix FIM inventory flyout filters for Files and Registry tabs
- Add ability to filter from Last analysis and Last modified fields from
  Registry details
- Add ability to select the visible columns in the Files and Registry
  tables
- Add to Files table the columns: date (hidden), md5 (hidden), sha1 (hidden), sha256 (hidden)
- Add to Registry table the columns: date (hidden)
- Renamed Last Modified to Last modified in the Files table

* chore(changelog): add entry

* Remove processes state column in macOS agents (#7122)

* Refactor process column mapping to use a dedicated function for improved readability and maintainability

* Update CHANGELOG to document removal of processes state column in macOS agents (#7122)

* Refactor process column mapping to use `mapColumns` for consistency across OS implementations and enhance code clarity

* Remove unused 'State' column from inventory snapshot for better clarity in agent rendering tests

* Fix agents chart loading state (#7120)

* Fix agents chart loading state

* Add changelog

* Create agents management menu and move sections (#7112)

* create agents management menu and move sections

* update changelog

* move sections to a different location

* Changes in the categories

* changes in the categories

* changes in the categories

---------

Co-authored-by: Antonio David Gutiérrez <[email protected]>

* Bump 4.9.2 rev 00 (#7126)

* chore: bump 4.9.2 rev 00

* chore(changelog): add entry

* feat(bump): add ability to edit the imposter specification file reference on bump script of main plugin

* Fix vulnerability inventory table scroll (#7128)

* Fix vulnerability inventory table scroll

* Add changelog

* Fixed border on cells in events disappear (#7075)

* Overwrite eui styles

* Added changelog

* Solve styles

* Change border per shadow-box

* Fix changelog

---------

Co-authored-by: Federico Rodriguez <[email protected]>

* Bump 4.9.2 rev01 (#7134)

chore: bump 4.9.2 rev01

* Redesign inventory, stats and configuration page to use tabs (#7089)

* Add toTitleCase function for changing text to title case

* Update MainModuleAgent component to display section in EuiTabs

* Update module.scss styles for module header agent

* Change stats page to use tabs in Wazuh app

* Refactor useAsyncAction function with TypeScript

* Refactor AgentsWelcome component structure and layout

* Refactor conditional rendering logic for main agent module

* Remove unused EuiTitle import and euiThemeVars

* Add EuiPanel around AgentInfo component in MainModuleAgent

* Update indexPattern access to handle null values safely

* Fix Prettier issue

* Remove global breadcrumb from MainModuleAgent component

* Update AgentStats component with AgentInfo component

* Add AgentInfo component and update configuration options

* Fix Prettier issue

* Update stats and configuration page to use tabs

* feat: add AgentInfo component to display agent details with customizable stats and styling. Includes initial SCSS for layout

* fix: update import path for AgentInfo and adjust EuiSpacer size to improve layout in agent stats component

* style: add overflow-y auto to visualization layout for improved scroll handling on small screens

* refactor: simplify layout in SyscollectorInventory by removing unnecessary EuiFlexGroups for better readability and performance

* refactor: remove unused styles in welcome component for cleaner SCSS and enhanced maintainability

* refactor: update import path for AgentInfo in agents-welcome for improved file organization and clarity

* refactor: remove unused .wz-module-header-agent styles for cleaner SCSS and improved code maintainability

* refactor: remove unused import of Agent in endpoints-summary for cleaner code and improved maintainability

* refactor: simplify MainModuleAgent component by removing unnecessary class for cleaner markup and improved readability

* refactor: enhance SyscollectorInventory with EuiPanel and AgentInfo for improved layout and readability

* refactor: update import path for AgentInfo to improve module structure and clarity in main-agent component

* refactor: use clsx for conditional class assignment in MainModuleAgent component for cleaner markup and improved maintainability

* refactor: adjust margin for .wz-module-header-agent to improve layout consistency in module.scss

* refactor: fine-tune margin for EuiFlexItem in MainModuleOverview to enhance layout consistency and visual alignment

* refactor: refine EuiFlexGroup and EuiFlexItem margins in MainModuleAgent for better layout consistency and visual alignment

* refactor: update SyscollectorInventory to use EuiPage for improved layout structure and consistency in inventory.tsx

* refactor: update Prettier and VSCode settings for consistent formatting and improved layout with adjusted print width and arrow parens

* refactor: adjust font size and weight for .euiTab__content in module.scss to enhance layout and text readability

* refactor: streamline MainModuleAgent component by simplifying conditional rendering and enhancing code readability

* refactor: simplify component structure by removing unnecessary divs and styles related to agent info for cleaner code and UI

* refactor: remove padding and min-height from welcome agent tabs for a cleaner dark theme UI design

* refactor: remove unused variable in AgentsWelcome component for improved code clarity and maintainability

* refactor: add margin-right to ButtonExploreAgent for better alignment in AgentsWelcome component UI

* refactor: simplify import statements and improve code consistency in AgentsWelcome component for better readability and maintainability

* refactor: adjust indentation for improved readability in MainModuleAgent component's JSX structure

* refactor: streamline formatting and improve readability in AgentInfo component's JavaScript logic and JSX structure

* refactor: update marginTop style in MainModuleAgent component for better visual alignment in the rendered output

* feat: add SECTIONS enum to define constants for different sections in the application for improved organization and clarity

* feat: create AgentTabs constants for improved organization of agent-related sections in the application

* refactor: remove unused sections constants from WzMenu for cleaner code and improved maintainability

* feat: integrate AgentTabs constants into AgentsWelcome for consistent tab handling and cleaner code structure

* fix: update Endpoint summary link to use constants for navigation and improve consistency in routing across the application

* feat: enhance routing in AgentView by utilizing AgentTabs constants for improved navigation consistency and cleaner code structure

* refactor: streamline AgentView implementation by consolidating imports and utilizing AgentTabs for cleaner tab management

* refactor: replace hardcoded route paths with SECTIONS constants for improved maintainability and consistency in app-router.tsx

* refactor: update MainModuleAgent to use AgentTabs for improved tab management and clean up loading state handling

* refactor: optimize ButtonExploreAgent rendering and streamline ComplianceTable component usage for cleaner code structure

* feat: add Network component for displaying agent network details, including interfaces, ports, and settings in a structured layout

* feat: introduce Software component to display agent software details, including platform-specific packages and updates management

* feat: enhance AgentView to include MainSyscollector and enable switchTab functionality for improved agent details display

* feat: update MainModuleAgent to support switchTab functionality for improved navigation across agent sections

* feat: refactor SyscollectorInventory to conditionally render Software and Network components based on selected section

* feat: simplify imports and adjust layout in SyscollectorInventory for improved readability and structure

* feat: rename Network and Software components to NetworkTab and SoftwareTab for consistency and clarity in SyscollectorInventory

* feat: add ProcessesTab component to Syscollector for displaying agent processes within the inventory view

* feat: refactor SyscollectorInventory to improve component imports and update layout for better structure and readability

* feat: update CHANGELOG to reflect change of inventory, stats, and configuration pages to use tabs for improved navigation

* feat: clean up SyscollectorInventory layout by removing redundant direction prop in EuiFlexGroup components for better clarity

* feat: streamline component imports and formatting in various files for improved code cleanliness and consistency

* Revert prettier file

* Revert Prettier and .vscode/settings.json

* Revert ,vscode/settings.json

* Fix Prettier issue

* Refactor MainModuleAgent to use inventoryTabs for rendering tabs dynamically

* Update inventory tests to use AgentTabs for network section rendering in SyscollectorInventory

* Update inventory snapshots and tests for network ports table rendering across agents with correct titles and columns

* Update inventory snapshots and tests for network interfaces and settings table rendering with correct titles and columns across agents

* Refactor inventory tests to enhance structure and maintainability for network settings and interfaces rendering across agents

* Update inventory snapshots and tests for software and Windows updates tables, ensuring correct rendering across agents with titles and columns

* Update inventory snapshots and tests for processes table rendering, ensuring correct columns and titles for all agent types

* Add data-test-subj for agent info in snapshots and tests, ensuring accurate rendering for Linux, Windows, and Apple agents

* Refactor agent-stats component by removing redundant statsAgents definition, simplifying header column structure for better clarity

* Add tests for AgentStats component, ensuring it correctly renders agent info and integrates with mock services

* Add tests for WzConfigurationSwitch component, ensuring it correctly renders agent info and integrates with mock services

* Add data-test-subj attributes to multiple table components for improved testing consistency in snapshots

* Fix Prettier issue

* Enhance type annotations in ReportingService for improved clarity and TypeScript compatibility

* Add data-test attributes for improved testing in MainModuleAgent and GenerateReportButton components

* Improve type safety in MainModuleAgent and GenerateReportButton by specifying Agent type for agent prop

* Remove unused imports and instances of ReportingService and FilterHandler in MainModuleAgent for cleaner code

* Remove unused imports in MainModuleAgent for cleaner code and improved maintainability

* Remove unused state property 'switchModule' in MainModuleAgent for cleaner code and improved maintainability

* Remove unused state property 'selectView' in MainModuleAgent for cleaner code and improved maintainability

* Fix optional chaining for renderTabs method in MainModuleAgent to improve code robustness and maintainability

* Refactor tab layout in MainModuleAgent for improved readability and consistent formatting in JSX structure

* Add unit tests for MainModuleAgent to validate tab rendering behavior across sections for better test coverage and reliability

* Add unique key prop to EuiTab in MainModuleAgent for better performance and to prevent React warnings during rendering

* Update MainModuleAgent and tests for dynamic report tab rendering based on section, ensuring accurate content display

* Refactor MainModuleAgent tests to use Testing Library, improving readability and adding click handler verification for tab switching

* Refactor WzConfigurationSwitch tests to use Testing Library, enhancing clarity and ensuring proper agent info rendering

* Refactor MainAgent tests to use constants for report tab identifiers, enhancing readability and maintainability of the tests

* Refactor AgentStats tests to utilize queryDataTestAttr for agent info, enhancing test readability and maintainability

* Refactor AgentStats test to use container and queryDataTestAttr, improving test readability and maintainability

* Fix Prettier issue

* Update report tab constants in main-agent tests for consistency with new naming conventions

* Refactor AgentStats test to use wrapper for querying agent info, enhancing readability and maintainability

* Enhance WzManagementConfiguration to always show agent info and improve conditionals in WzConfigurationSwitch for better clarity

* Add data-test-subj to EuiSpacer and update tests for WzConfigurationSwitch to handle showAgentInfo condition better

* Remove outdated group display logic in WzConfigurationSwitch to improve component clarity and reduce unnecessary complexity

* Fix Prettier issue

* style(visualizations): remove overflow-y property from visualization layout for better responsiveness on small screens

* refactor(configuration-switch): streamline agent grouping display and remove redundant agent info section from component and tests

* refactor(agent-stats): enhance stats display with structured fields and loading spinner, removing old agent info test case

* refactor(main-agent): simplify section checks by limiting tabs to SOFTWARE, NETWORK, and PROCESSES for improved readability and performance

* refactor(main-agent): destructure props for improved readability and simplify tab checks in rendering logic

* test(main-agent): add tests to verify absence of generate report button and agent info ribbon in WzConfigurationSwitch component

* test(inventory): remove STATE column from processes table test for accurate representation of data

* test(agent-stats): add tests to verify absence of generate report button and agent info ribbon in AgentStats component

* test(agent-stats): simplify imports in agent-stats test file for cleaner code organization

* fix(wz-text-with-tooltip): refactor props interface and clean up component for better readability and maintainability

* fix(group-truncate): update filterAction type and simplify action function for improved clarity and type safety

* refactor(agent-info): migrate agents-info.js to TypeScript for improved type safety and maintainability

* refactor(agent-info): rename agents-info to agent-info for consistent naming and improved clarity in imports

* fix(group-truncate): make action type explicit and handle optional filterAction for better clarity and type safety

* refactor(agent-info): rename checkField to renderField for improved clarity in rendering agent information

* refactor(agent-info): simplify getOsName method for clearer logic and improved readability of OS name and version handling

* refactor(agent-status): enhance type safety in AgentStatus props and clarify status handling with TypeScript types

* refactor(agent-info): streamline agent stats structure and replace WzStat with RibbonItem for better component organization

* refactor(agent-info): update labels to use RibbonItemLabel constants for improved consistency and clarity in agent stats display

* refactor(agent-info): simplify agent stats display by replacing specific fields with the entire agent object for consistency

* refactor(api-response): add api_version field to IData interface for better API version management and clarity

* refactor(agent-info): remove direct agent reference from RibbonItem, enhancing component flexibility and consistency

* feat(ribbon-item): implement RibbonItem component for enhanced display of agent information with flexible styling and tooltips

* refactor(ribbon-item): rename renderTitle to renderValue for improved clarity in value rendering logic

* feat(ribbon): add Ribbon component for flexible ribbon layout, enhancing agent info display in the application

* refactor(ribbon-item): rename class from wz-agent-info to wz-ribbon-item for better consistency in styling across components

* refactor(ribbon): rename Ribbon to WzRibbon for consistent naming across components and improve clarity in the codebase

* refactor(syscollector-metrics): simplify rendering by utilizing WzRibbon for improved readability and maintainability

* refactor(inventory): replace AgentInfo with InventoryMetrics to streamline inventory rendering and enhance code clarity

* refactor(ribbon): add loading state and improve structure by wrapping WzRibbon in EuiPanel for better layout management

* refactor(syscollector-metrics): streamline imports and use lodash directly for emptiness checks to enhance code clarity

* refactor(syscollector-metrics): replace static label with constant for improved consistency and maintainability

* refactor(syscollector-metrics): increase maxWidth for CPU styling to improve display consistency in metrics component

* refactor(ribbon-item): enhance OS detection by adding support for Ubuntu in the ribbon item component

* refactor(ribbon-item): adjust styling to incorporate font size constant and optional style for better design adaptability

* refactor(ribbon-item): add optional icon property to ribbon items for improved visual representation in the UI

* refactor(agents-welcome): simplify layout by removing unnecessary EuiPanel wrapper around AgentInfo component

* refactor(main-agent): streamline rendering logic by removing redundant state and simplify component structure for better readability

* refactor(ribbon): add unique keys for ribbon items to enhance rendering performance and avoid React warnings

* refactor(syscollector-metrics): add unique keys to ribbon items for improved rendering and to eliminate React warnings

* refactor(agent-stats): replace panel with WzRibbon for better presentation and streamline loading state rendering logic

* Fix Prettier issue

* refactor(ribbon): add SCSS styling for ribbon item and remove unused agent info styles to streamline components

* refactor(syscollector): replace EuiPanel with EuiPageBody for improved layout and streamline agent status display logic

* style(constants): fix formatting issue in AGENT_STATUS_CODE array to align with code style guidelines

* chore(tests): update snapshots and refactor inventory tests for better consistency and maintainability

* Fix Prettier issue

* feat(tests): enhance WzConfigurationSwitch tests and add CSS selector utility for querying test attributes

* feat(ui): rename report-tabs to agent-tabs for improved clarity in MainModuleAgent component

* feat(tests): update test descriptions and selectors to reflect renaming of report tabs to agent tabs in MainModuleAgent tests

* feat(tests): refine agent-stats and main-agent tests to include checks for generate report button presence and descriptions

* feat(tests): add inventory metrics tests for Debian agent in SyscollectorInventory components across software, network, and processes sections

* feat(tests): improve selector readability in main-agent tests by extracting aria-selected constant for consistency

* feat(tests): enhance main-agent tests with comprehensive coverage for all tab sections and generate report button assertions

* feat(tests): add ribbon rendering tests in AgentStats to ensure accurate display of status and metrics attributes

* fix(tests): correct syntax in AgentStats test for improved readability and maintainability of ribbon item assertions

* feat(tests): add unit tests for InventoryMetrics to validate rendering of syscollector metrics and ribbon items

* fix(wz-agents): change agent parameter type to optional for better flexibility in getAgentOSType function

* fix(agent-info/syscollector): update labels and key assignments for better clarity in metrics display and styling adjustments

* fix(ribbon): adjust padding size and justify content for better layout in the ribbon component

* fix(ribbon): update label formats to lowercase and switch from label to key for item identification in ribbon component

* fix(ribbon): add conditional rendering to prevent empty icon display in ribbon item component

* fix(agent-group-truncate): enhance button styling with specified font weight and size for improved consistency

* fix(snapshot): update ribbon item data-test attribute to reflect correct label for operating system and adjust styles accordingly

* fix(reporting): change default value of agents parameter from string to false in startVis2Png method

* fix(agent): remove unnecessary prop from WzManagementConfiguration in AgentView component

* fix(ribbon): rename STATUS label to AGENT_STATUS in ribbon and agent info components

* fix(agent-info): update label casing for agent status and group in AgentInfo component

---------

Co-authored-by: Chantal Belén kelm <[email protected]>

* Add filter by value to document details fields (#7081)

* Refactor filter button actions in DocViewer

* Add Doc Viewer styles and import to Doc Viewer component

* Refactor cell filter actions to use 'field' instead of 'columnId'

* Refactor filtering logic in DocViewer component

* Add onFilterHandler to DocViewer component

* Add onFilter handler to various components

* Refactor RequirementFlyout component for readability

* Add filter functionality to inventory vulnerabilities dashboard

* Remove unused code related to doc viewer in WazuhDataGrid

* Add setFilters function to FileDetails and RequirementFlyout

* Refactor doc-viewer styles for button display

* Add filter state management to data grid and drilldown panels

* Fix Prettier issue

* Add filter by value to document details fields

* Update defaultColumns to defaultTableColumns in WazuhDataGrid

* Add filter functionality for document viewer

* Swap the order of arguments in filter action test

* Rename button icons to EuiButtonIcon component

* Update component import paths and class names

* Update doc-viewer styles for wzDocViewer classes

* Refactor adding filters to handle array values efficiently

* Add onClose callback to onFilter function in DocViewer

* Refactor DocumentViewTableAndJson component props

* Refactor technique row details component props type

* Add setFilters function to TechniqueRowDetails component

* Refactor closeFlyoutHandler in DashboardTH component

* Add closeFlyoutHandler function for flyout onClose event

* Fix Prettier issue

* fix: add guard clause for undefined value in filter cell actions

* feat: add FilterStateStore enum and update state management in PatternDataSourceFilterManager to use it

* fix: update onFilter function to accept more specific FILTER_OPERATOR types and value types in DocViewer component

* feat: add isNullish utility function and update exports in util index for better nullish checks

* fix: refactor onFilterCellActions to use isNullish for improved handling of FILTER_OPERATOR and value inputs in data grid service

* fix: refactor onFilterCellActions import path for improved structure and maintainability in data-grid and doc-viewer components

* fix: update onFilterCellActions to accept number type in values for enhanced filtering capabilities in data grid component

* test: add unit tests for onFilterCellActions to verify filtering with number values in data grid component

* test: simplify onFilterCellActions tests by removing unused filters array for clearer unit tests in data grid component

* test: enhance onFilterCellActions tests by clarifying filter addition with improved descriptions for number and string values in data grid

* test: refactor buildFilter usage in onFilterCellActions tests for improved clarity on filter creation in data grid component

* test: improve onFilterCellActions tests with clearer descriptions for filters and added date filter cases in data grid component

* test: add tests for single filter actions with string values and 'is'/'is not' operators in onFilterCellActions for data grid

* test: add tests for multiple filters with 'is' and 'is not' operators for rule.groups in onFilterCellActions for data grid

* test: add test for onFilterCellActions with undefined value to ensure appropriate filter behavior in data grid component

* test: update filter negate logic and add test for 'is not' operator with undefined value in onFilterCellActions for data grid

* Fix Prettier issue

* test: refactor filter creation logic in onFilterCellActions tests for improved clarity and consistency in data grid component

* test: unify key usage in filter tests in onFilterCellActions for clearer and more maintainable assertions in data grid component

* test: add filter logic tests for boolean values in onFilterCellActions for better coverage in data grid component

* test: update filter tests in onFilterCellActions to clarify handling of boolean values in data grid component

* test: improve clarity in filter cell action tests by specifying value types in data grid component assertions

* test: refine value type definition in onFilterCellActions to enhance clarity for boolean and numeric filters in data grid component

* Refactor drilldown components to simplify destructuring of props, removing unused variables for cleaner code

* Remove unused `filters` and `setFilters` props from OfficePanel for cleaner code and improved readability

* Fix typos in export button label across data grid components

---------

Co-authored-by: Federico Rodriguez <[email protected]>

* Agent view Mitre ATT&CK exception (#7116)

* add a validation to filterParams and filterParams.filters

* add key to map

* update changelog

* change url

* Fix url from endpoint summary to dashboard and events in mitre

* Correction of link to technique in intellicense flyout

* Go to tactics in intellicense, clean code and eui accordion start open

* clean code

* clean code

* update changelog

* clean code

* fix card endpoint summary

* update changelog

* rename function

* rename function goToTechniqueInIntelligence

* rename function goToTechniqueInIntelligence

---------

Co-authored-by: Federico Rodriguez <[email protected]>

* Add vulnerability detection card in agent overview (#7085)

* Add top packages component

* Add vuls severity stat component

* Create vuls panel

* Add vuls panel in agent overview

* Update CHANGELOG

* Apply prettier

* Fix responsive behavior

* Apply prettier

* Change vuls panel style

* Use vuls data source in agent overview panel

* Move vuls panel

* Change redirect in hoc

* Remove unnecessary redirect

* Add HOC to create pattern if not exist

* Apply prettier

* Remove unused imports

Co-authored-by: Guido Modarelli <[email protected]>

* Remove unused imports

Co-authored-by: Guido Modarelli <[email protected]>

* Remove unused code

* Apply prettier

* Resolve conflicts in agents-welcome

* Change agents management menu icon

---------

Co-authored-by: Chantal Belén kelm <[email protected]>
Co-authored-by: Guido Modarelli <[email protected]>
Co-authored-by: Federico Rodriguez <[email protected]>

* Remove duplicated entry was included in a previous version (#7139)

chore(changelog): remove duplicated entry was included in a previous release

* chore: update imposter specification reference

---------

Co-authored-by: JuanGarriuz <[email protected]>
Co-authored-by: Federico Rodriguez <[email protected]>
Co-authored-by: Guido Modarelli <[email protected]>
Co-authored-by: Chantal Belén kelm <[email protected]>
Co-authored-by: Maximiliano Ibarra <[email protected]>
  • Loading branch information
6 people authored Nov 5, 2024
1 parent b3c69d8 commit 26a01f0
Show file tree
Hide file tree
Showing 105 changed files with 21,612 additions and 6,888 deletions.
25 changes: 24 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,18 @@ All notable changes to the Wazuh app project will be documented in this file.

- Support for Wazuh 4.10.1

## Wazuh v4.10.0 - OpenSearch Dashboards 2.16.0 - Revision 02
## Wazuh v4.10.0 - OpenSearch Dashboards 2.16.0 - Revision 03

### Added

- Support for Wazuh 4.10.0
- Added sample data for YARA [#6964](https://github.com/wazuh/wazuh-dashboard-plugins/issues/6964)
- Added a custom filter and visualization for vulnerability.under_evaluation field [#6968](https://github.com/wazuh/wazuh-dashboard-plugins/issues/6968) [#7044](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7044) [#7046](https://github.com/wazuh/wazuh-dashboard-plugins/issues/7046)
- Add vulnerabilities card to agent details page [#7058](https://github.com/wazuh/wazuh-dashboard-plugins/issues/7058)
- Added an "Agents management" menu and moved the sections: "Endpoint Groups" and "Endpoint Summary" which changed its name to "Summary".[#7112](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7112)
- Added ability to filter from File Integrity Monitoring registry inventory [#7119](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7119)
- Added new field columns and ability to select the visible fields in the File Integrity Monitoring Files and Registry tables [#7119](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7119)
- Added filter by value to document details fields [#7081](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7081)

### Changed

Expand All @@ -25,24 +30,42 @@ All notable changes to the Wazuh app project will be documented in this file.
- Changed the agents summary in overview with no results to an agent deployment help message. [#7041](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7041)
- Changed malware feature description [#7036](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7036)
- Changed the font size of the kpi subtitles and the features descriptions [#7033](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7033)
- Changed the warning icon in events view to a info icon [#7057](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7057)
- Changed feature container margins to ensure consistent separation and uniform design. [#7034](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7034)
- Changed the initial width to the default columns on each selected field [#7059](https://github.com/wazuh/wazuh-dashboard-plugins/issues/7059)
- Changed inventory, stats and configuration page to use tabs [#7089](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7089)

### Fixed

- Fixed the filter are displayed cropped on screens of 575px to 767px in vulnerability detection module [#7047](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7047)
- Fixed read-only users could not access to Statistics application [#7001](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7001)
- Fixed no-agent-alert spawn with selected agent in agent-welcome view [#7029](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7029)
- Fixed loading state of the agents status chart in the home overview [#7120](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7120)
- Fixed security policy exception when it contained deprecated actions [#7042](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7042)
- Fixed border on cells in events that disappear when clicked [#7075](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7075)
- Fixed export formatted csv data with special characters from tables [#7048](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7048)
- Fixed column reordering feature [#7072](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7072)
- Fixed filter management to prevent hiding when adding multiple filters [#7077](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7077)
- Fixed the Mitre ATT&CK exception in the agent view, the redirections of ID, Tactics, Dashboard Icon and Event Icon in the drop-down menu and the card not displaying information when the flyout was opened [#7116](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7116)
- Fixed the filter are displayed cropped on screens of 575px to 767px in vulnerability detection module [#7047](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7047)
- Fixed ability to filter from files inventory details flyout of File Integrity Monitoring [#7119](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7119)

### Removed

- Removed agent RBAC filters from dashboard queries [#6945](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6945)
- Removed GET /elastic/statistics API endpoint [#7001](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7001)
- Removed VirusTotal application in favor of Malware Detection [#7038](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7038)
- Removed processes state column in macOS agents [#7122](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7122)

## Wazuh v4.9.2 - OpenSearch Dashboards 2.13.0 - Revision 01

### Added

- Support for Wazuh 4.9.2

### Fixed

- Fixed vulnerabilities inventory table scroll [#7128](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7128)

## Wazuh v4.9.1 - OpenSearch Dashboards 2.13.0 - Revision 04

Expand Down
2 changes: 1 addition & 1 deletion docker/imposter/wazuh-config.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
plugin: openapi
specFile: https://raw.githubusercontent.com/wazuh/wazuh/master/api/api/spec/spec.yaml
specFile: https://raw.githubusercontent.com/wazuh/wazuh/4.10.1/api/api/spec/spec.yaml
system:
stores:
# this store is preloaded from file
Expand Down
5 changes: 5 additions & 0 deletions plugins/main/common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -530,3 +530,8 @@ export const OSD_URL_STATE_STORAGE_ID = 'state:storeInSessionStorage';

export const APP_STATE_URL_KEY = '_a';
export const GLOBAL_STATE_URL_KEY = '_g';

export enum FilterStateStore {
APP_STATE = 'appState',
GLOBAL_STATE = 'globalState',
}
31 changes: 22 additions & 9 deletions plugins/main/common/services/wz_agent_status.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,27 @@
import { UI_COLOR_AGENT_STATUS, UI_LABEL_NAME_AGENT_STATUS, API_NAME_AGENT_STATUS } from '../constants';
import {
UI_COLOR_AGENT_STATUS,
UI_LABEL_NAME_AGENT_STATUS,
API_NAME_AGENT_STATUS,
} from '../constants';

type TAgentStatus = typeof API_NAME_AGENT_STATUS[keyof typeof API_NAME_AGENT_STATUS];
export type TAgentStatus =
(typeof API_NAME_AGENT_STATUS)[keyof typeof API_NAME_AGENT_STATUS];

type TAgentStatusColor = typeof UI_COLOR_AGENT_STATUS[keyof typeof UI_COLOR_AGENT_STATUS];
type TAgentStatusLabel = typeof UI_LABEL_NAME_AGENT_STATUS[keyof typeof UI_LABEL_NAME_AGENT_STATUS];
type TAgentStatusColor =
(typeof UI_COLOR_AGENT_STATUS)[keyof typeof UI_COLOR_AGENT_STATUS];
type TAgentStatusLabel =
(typeof UI_LABEL_NAME_AGENT_STATUS)[keyof typeof UI_LABEL_NAME_AGENT_STATUS];

export function agentStatusColorByAgentStatus(status: TAgentStatus): TAgentStatusColor{
return UI_COLOR_AGENT_STATUS[status] || UI_COLOR_AGENT_STATUS.default;
export function agentStatusColorByAgentStatus(
status: TAgentStatus,
): TAgentStatusColor {
return UI_COLOR_AGENT_STATUS[status] || UI_COLOR_AGENT_STATUS.default;
}

export function agentStatusLabelByAgentStatus(status: TAgentStatus): TAgentStatusLabel{
return UI_LABEL_NAME_AGENT_STATUS[status] || UI_LABEL_NAME_AGENT_STATUS.default;
}
export function agentStatusLabelByAgentStatus(
status: TAgentStatus,
): TAgentStatusLabel {
return (
UI_LABEL_NAME_AGENT_STATUS[status] || UI_LABEL_NAME_AGENT_STATUS.default
);
}
29 changes: 19 additions & 10 deletions plugins/main/public/app-router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import { Settings } from './components/settings';
import { WzSecurity } from './components/security';
import $ from 'jquery';
import NavigationService from './react-services/navigation-service';
import { SECTIONS } from './sections';

export function Application(props) {
const dispatch = useDispatch();
Expand Down Expand Up @@ -66,33 +67,41 @@ export function Application(props) {
<WzAgentSelectorWrapper />
<WzUpdatesNotification />
<Switch>
<Route path={'/health-check'} exact render={HealthCheck}></Route>
<Route
path={'/agents-preview/deploy'}
path={`/${SECTIONS.HEALTH_CHECK}`}
exact
render={HealthCheck}
></Route>
<Route
path={`/${SECTIONS.AGENTS_PREVIEW}/deploy`}
exact
render={RegisterAgent}
></Route>
<Route path={'/agents'} exact render={AgentView}></Route>
<Route path={`/${SECTIONS.AGENTS}`} exact render={AgentView}></Route>
<Route
path={'/agents-preview/'}
path={`/${SECTIONS.AGENTS_PREVIEW}/`}
exact
render={MainEndpointsSummary}
></Route>
<Route path={'/manager'} exact render={WzManagement}></Route>
<Route
path={'/overview'}
path={`/${SECTIONS.MANAGER}`}
exact
render={WzManagement}
></Route>
<Route
path={`/${SECTIONS.OVERVIEW}`}
exact
render={props => <Overview {...props} />}
></Route>
<Route path={'/settings'} exact render={Settings}></Route>
<Route path={'/security'} exact render={WzSecurity}></Route>
<Route path={`/${SECTIONS.SETTINGS}`} exact render={Settings}></Route>
<Route path={`/${SECTIONS.SECURITY}`} exact render={WzSecurity}></Route>
<Route
path={'/wazuh-dev'}
path={`/${SECTIONS.WAZUH_DEV}`}
exact
render={props => <ToolsRouter {...props} />}
></Route>
<Route
path={'/blank-screen'}
path={`/${SECTIONS.BLANK_SCREEN}`}
exact
render={props => <WzBlankScreen {...props} />}
></Route>
Expand Down
18 changes: 16 additions & 2 deletions plugins/main/public/components/agents/agent-status.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,29 @@ import React from 'react';
import {
agentStatusColorByAgentStatus,
agentStatusLabelByAgentStatus,
TAgentStatus,
} from '../../../common/services/wz_agent_status';
import { ColumnWithStatusIcon } from './column-with-status-icon';
import { EuiIconTip } from '@elastic/eui';
import { AGENT_STATUS_CODE } from '../../../common/constants';
import '../../styles/common.scss';
import { Agent } from '../endpoints-summary/types';

export const AgentStatus = ({ status, children = null, style = {}, agent }) => {
interface AgentStatusProps {
status: TAgentStatus;
children?: string | null;
style?: React.CSSProperties;
agent?: Agent;
}

export const AgentStatus = ({
status,
children,
style = {},
agent,
}: AgentStatusProps) => {
const statusCodeAgent = AGENT_STATUS_CODE.find(
(status: StatusCodeAgent) => status.STATUS_CODE === agent?.status_code,
status => status.STATUS_CODE === agent?.status_code,
);
return (
<div
Expand Down
55 changes: 6 additions & 49 deletions plugins/main/public/components/agents/fim/inventory.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import { InventoryTable, RegistryTable } from './inventory/';
import { WzRequest } from '../../../react-services/wz-request';
import { getToasts } from '../../../kibana-services';
import { ICustomBadges } from '../../wz-search-bar/components';
import { filtersToObject } from '../../wz-search-bar';
import { UI_LOGGER_LEVELS } from '../../../../common/constants';
import {
UI_ERROR_SEVERITIES,
Expand All @@ -42,7 +41,6 @@ import { webDocumentationLink } from '../../../../common/services/web_documentat
export class Inventory extends Component {
_isMount = false;
state: {
filters: [];
selectedTabId: 'files' | 'registry';
totalItemsFile: number;
totalItemsRegistry: number;
Expand All @@ -57,7 +55,6 @@ export class Inventory extends Component {
constructor(props) {
super(props);
this.state = {
filters: [],
syscheck: [],
selectedTabId: 'files',
totalItemsFile: 0,
Expand All @@ -66,7 +63,6 @@ export class Inventory extends Component {
customBadges: [],
isConfigured: false,
};
this.onFiltersChange.bind(this);
}

async componentDidMount() {
Expand Down Expand Up @@ -135,56 +131,20 @@ export class Inventory extends Component {
return auxTabs;
}

getStoreFilters(props) {
const { section, selectView, agent } = props;
const filters = JSON.parse(
window.localStorage.getItem(
`wazuh-${section}-${selectView}-${
this.state?.selectedTabId || 'files'
}-${agent['id']}`,
) || '{}',
);
return filters;
}

setStoreFilters(filters) {
const { section, selectView, agent } = this.props;
window.localStorage.setItem(
`wazuh-${section}-${selectView}-${this.state?.selectedTabId || 'files'}-${
agent['id']
}`,
JSON.stringify(filters),
);
}

onFiltersChange = filters => {
this.setState({ filters });
};

onTotalItemsChange = (totalItems: number) => {
this.setState({ totalItemsFile: totalItems });
};

onSelectedTabChanged = id => {
this.setState({ selectedTabId: id });
};

buildFilter(type) {
const filters = filtersToObject(this.state.filters);
const filter = {
...filters,
limit: type === 'file' ? '15' : '1',
...(type === 'registry' ? { q: 'type=registry_key' } : { type }),
...(type === 'file' && { sort: '+file' }),
};
return filter;
}

async getItemNumber(type: 'file' | 'registry') {
try {
const agentID = this.props.agent.id;
const response = await WzRequest.apiReq('GET', `/syscheck/${agentID}`, {
params: this.buildFilter(type),
params: {
limit: 1, // reduce the size because only need the total items. 0 gives error
...(type === 'registry'
? { q: 'type=registry_key' }
: { q: 'type=file' }),
},
});
if (type === 'file') {
return {
Expand Down Expand Up @@ -257,16 +217,13 @@ export class Inventory extends Component {
filters={filters}
items={syscheck}
totalItems={totalItemsFile}
onFiltersChange={this.onFiltersChange}
onTotalItemsChange={this.onTotalItemsChange}
/>
)}
{selectedTabId === 'registry' && (
<RegistryTable
{...this.props}
filters={filters}
totalItems={totalItemsRegistry}
onFiltersChange={this.onFiltersChange}
/>
)}
</>
Expand Down
19 changes: 11 additions & 8 deletions plugins/main/public/components/agents/fim/inventory/fileDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ import { RedirectAppLinks } from '../../../../../../../src/plugins/opensearch_da
import TechniqueRowDetails from '../../../overview/mitre/framework/components/techniques/components/flyout-technique/technique-row-details';
import { DATA_SOURCE_FILTER_CONTROLLED_CLUSTER_MANAGER } from '../../../../../common/constants';
import NavigationService from '../../../../react-services/navigation-service';
import { setFilters } from '../../../common/search-bar/set-filters';

export class FileDetails extends Component {
props!: {
Expand Down Expand Up @@ -198,13 +199,15 @@ export class FileDetails extends Component {
name: 'Last analysis',
grow: 2,
icon: 'clock',
link: true,
transformValue: formatUIDate,
},
{
field: 'mtime',
name: 'Last modified',
grow: 2,
icon: 'clock',
link: true,
transformValue: formatUIDate,
},
];
Expand Down Expand Up @@ -290,21 +293,19 @@ export class FileDetails extends Component {
}

addFilter(field, value) {
const { filters, onFiltersChange } = this.props;
const newBadge: ICustomBadges = { field: 'q', value: '' };
const { onFiltersChange } = this.props;
let filterUQL = '';
if (field === 'date' || field === 'mtime') {
const value_max = moment(value).add(1, 'day');
newBadge.value = `${field}>${moment(value).format(
filterUQL = `${field}>${moment(value).format(
'YYYY-MM-DD',
)} AND ${field}<${value_max.format('YYYY-MM-DD')}`;
)};${field}<${value_max.format('YYYY-MM-DD')}`;
} else {
newBadge.value = `${field}=${
filterUQL = `${field}=${
field === 'size' ? this.props.currentFile[field] : value
}`;
}
!filters.some(
item => item.field === newBadge.field && item.value === newBadge.value,
) && onFiltersChange([...filters, newBadge]);
onFiltersChange({ q: filterUQL });
this.props.closeFlyout();
}

Expand Down Expand Up @@ -586,6 +587,8 @@ export class FileDetails extends Component {

this.discoverFilterManager.addFilters(newFilter);
}}
filters={[]}
setFilters={setFilters(this.discoverFilterManager)}
/>
);
}
Expand Down
Loading

0 comments on commit 26a01f0

Please sign in to comment.