-
Notifications
You must be signed in to change notification settings - Fork 203
Integration of the query manager in the reading actions in wz-fleet #7360
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
Integration of the query manager in the reading actions in wz-fleet #7360
Conversation
…ncement/7346-integrate-the-query-manager-service-in-fleet-management
plugins/wazuh-fleet/public/components/common/table-indexer/table-indexer.tsx
Outdated
Show resolved
Hide resolved
Legend: 🧪 Test 2025/03/19CR 🟢 🔴 Sorting should work as expected
The sorting of the Host OS is not working as expected. Screen.Recording.2025-03-19.115812.mp4🔴 Queries should work as expected
Screen.Recording.2025-03-19.120858.mp4 |
This is because of the type of field, for it to find something it has to be the same value and it is case sensitive |
🟢 Queries should work as expected Screen.Recording.2025-03-19.130221.mp4 |
Legend: 🧪 Test 2025/03/19CR 🟢 🟢 Verify that the agent's table and detail view are working as expected
Screen.Recording.2025-03-19.at.1.10.04.PM.mov🟢 Filters should work as expected.
Screen.Recording.2025-03-19.at.1.11.07.PM.mov🟢 Sorting should work as expected
Screen.Recording.2025-03-19.at.1.12.36.PM.mov🟢 Number of rows should work as expected
Screen.Recording.2025-03-19.at.1.16.54.PM.mov🟢 Queries should work as expected
Uploading Screen Recording 2025-03-19 at 2.16.21 PM.mov… |
|
|
|
Legend: 🧪 Test 2025/03/19CR 🟢 Sorting should work as expected 🟢 Screen.Recording.2025-03-19.141850.mp4 |
60ad1a2
into
enhancement/517-create-agent-management-apps
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! 🟢
* feat: copy the register agent assistant to wazuh-fleet plugin - Copy the register-agent folder from wazuh plugin to wazuh-fleet - Add the webDocumentationLink and form components/hook to register-agent copy - Register minimal Fleet management app to display the register agent assistant view * Add rendering of views without indexer table and fix lint * Add searchBar and some table components * Add sample data * Adding adapter and changing implementations by sample data * feat: add inputs to enrollment agent assistant Added: - Added inputs to match with the `wazuh-agent` cli: - Input to manage the username - Input to manage the password - Input to manage the SSL verification mode - Input to manage the key (This key must have 32 alphanumeric characters validation) - Added new step "Server credentials" to define the username and password - Added tests for the new inputs Changed: - Changed the generation of command to install and enroll the agent - Changed the validation of "Assign a server address" input - Changed the placeholder of "Assign a server address" input - Changed the description of "Server address" step to indicate the usage of URL instead of raw IP or FQDNS Removed: - Groups management was removed because the current Wazuh agent enrollment does not support the definition of these. - Removed groups form input - Removed fetch information about available groups - Removed fetch information about authentication password provided through the Wazuh server API - Removed fetch information about protocol provided through the Wazuh server API - Temporally: - The command to download the package were temporaly removed because the packages are not publically hosted. A warning message was added to inform about this. * fix: prettier and eslint * fix: eslint * Changes and removing commented code * Add table in group veiw * fix: install agent on Windows command * Remove unused code * Add render to Enrollment agent * Add agentManagement * Add getToasts and setToasts * Add group update modal * Add upgrade modal * feat(enrollment): add ability to remember the server address * feat(enrollment): rename Deploy new agent by Enroll new agent * remove(enrollment): remove enrollment.password setting by securiy reasons The setting is saved in the advanced settings (tenant configuration) and is visible to each user with read permissions in the tenant. So we remove the setting to avoid other users can see the value. The user should indicate the username and password each time the enroll agent assistant is used. * Add modals * Add mock to getAgents * fix(enrollment): windows command to install and enroll the agent * fix: rename register-agent direcotry to enroll-agent * fix(enrollment): rename register to enroll references * fix(enrollment): rename register to enroll references * fix(enrollment): background color of copy overlay in dark mode * Add add mock and changes * fix: remove a unused comment and enhance types * fix(enrollment): remove unused data from fetching Wazuh server API version and loading effect * Fix import RegisterAgent to EnrollAgent * fet(enrollment): add test toe nsure the step status * Add edit name modal * feat(enrollment): replace --register-agent flag to --enroll-agent * Add group editing of an agent * ci: add wazuh-fleet plugin * Fix lint * chore: add entry to changelog * docs: add fleet-management module * docs(enrollment): add docs related to enrollment agent assistant * docs: add fleet management * Add edit, remove or add groups to one or more agents * fix: missing i18n import * feat(agents): add management > agents app group * Fix agent navigation * Add upgrade global modal * fix(enrollment): replace --url by --enroll-url and add certificate vale to --verification-mode option * feat(enrollment): add communications URL to the enrollment assistant - Add communications URL to the enrollment assistant - Add enrollment.commsUrl setting - Rename enrollment.dns to enrollment.url setting - Rename dependencies of enrollment assistant - Update tests * docs(enrollment): update enrollment assistant screenshot * Fix render badge filter * Change useDefaultBehaviors: true * Tabs in agent detail removed until implementation of these views * Fixed error when resolving conflicts * Resolves comments * Add doc * change(enrollment): way to generate the install enrollment command (raw and with password obfuscation) * Improves agent summary documentation Clarifies the purpose and functionality of the agent summary module by enhancing the description for better readability. * removes redundant assignment in constructor Simplifies the NavigationService constructor by removing a redundant assignment of the history parameter to the class property, as it is already handled by the parameter property declaration. * Refactors Agent interface and related types Simplifies the structure of the Agent interface and extracts nested properties into separate interfaces for better readability and maintainability. * Removes commented out dependencies Cleans up the code by removing unnecessary commented out dependencies from the renderApp function. * Update type definitions for AgentDashboard props Replaces 'any' types with specific 'IndexPattern' and 'Filter[]' types for better type safety and clarity in the AgentDashboard component * removes commented out code Cleans up the AgentDashboard component by removing an unused commented out line for better code readability. * Update types for filters and indexPattern in EventsCount Replaces 'any' types with specific 'Filter' and 'IndexPattern' types to improve type safety and code clarity in EventsCount component. * Refines types for AgentDetailsProps Updates indexPatterns and filters types to use IndexPattern and Filter from data plugin for better type safety and clarity. * Updates agent source interface Changes the _source type from Agent to AgentWrapper to improve data handling and encapsulation. * Adds concurrency control to GitHub workflows Introduces concurrency groups to prevent multiple runs of the same workflow on the same pull request. Ensures only the most recent workflow run is kept active, improving CI efficiency and reducing unnecessary resource usage. * Refactors group edit action handling Replaces 'addOrRemove' with 'editAction' for clarity and consistency Introduces 'EditActionGroups' enum for improved type safety and readability Updates relevant components and props accordingly * update render prop type in ViewInterface Changes the 'render' prop type from 'any' to 'Record<string, any>' to improve type safety and clarity in the ViewInterface. * Enforces const assertion on EditActionGroups Adds const assertion to EditActionGroups for improved type safety and immutability. * Refactors search field setting logic Introduces SEARCH_FIELD enum to improve readability and maintainability by replacing hard-coded field names with enum constants. * Update plugins/wazuh-fleet/public/components/agents/list/actions/edit-groups-modal.tsx * refactors risk level assignment in generateRandomHost Extracts risk level choices into a variable for reuse and consistency in calculated_level and static_level assignments * Update types for indexPatterns and filters Replaces 'any' types with 'IndexPattern' and 'Filter[]' for better type safety and code clarity. * Removes commented-out firewall monitoring code Cleans up the application file by removing unused and commented-out code for the firewall monitoring feature. This improves code readability and maintainability. * Removes unused variable in main script Eliminates redundant 'asset_identifier' variable to clean up the code. * refactors URL generation for agent summary links Replaces hardcoded URL string with constant AGENTS_SUMMARY_ID for improved maintainability and consistency across components. * simplifies breadcrumb logic in RouteComponent Refactors the breadcrumb setting logic by using a single method call with a conditional parameter, reducing code duplication and improving readability. * remove document viewer component Deletes document viewer related components and styles Removes associated table row button components * Update indexPatterns type in FleetManagementProps Changes indexPatterns type from 'any' to 'IndexPattern' for improved type safety and code clarity. * Refactors agent response type Introduces IndexedDocument interface for general use Replaces IAgentResponse definition with new interface for consistency * refactor search params direction type Replaces hard-coded 'asc' | 'desc' direction type with a reusable Direction type Improves code maintainability and reduces duplication * Prevent page refresh when pressing enter on edit name input * Add changelog * Integration of the query manager in the reading actions in wz-fleet (#7360) * Integration of the query manager in the reading actions in wz-fleet * Fix template(sample data) * Add changelog * Add types * Change string to PLUGIN_ID * Change _source to agent * Fix Host OS sort * refactor(wazuh-fleet): streamline index pattern handling Move index pattern logic to AppSetup interface and centralize its usage in plugin services. This improves maintainability by reducing redundancy and centralizing the index pattern configuration. * refactor(agent-management): simplify toast notifications and error handling Refactor toast notifications to use specific methods (addDanger, addInfo) instead of generic add method. Improve error handling by checking if error is an instance of Error before accessing its message property. This enhances code readability and maintainability. * refactor(agents): optimize group editing and agent reloading - Use `useCallback` for `reloadAgents` to prevent unnecessary re-renders - Rename `handleOnSave` to `handleSave` for consistency and clarity - Optimize group operations by performing them in parallel using `Promise.all` - Update toast messages to use `addInfo` and `addDanger` methods for better semantics * refactor(upgrade-agent-modal): simplify toast handling and extract package type options - Extract package type options into a constant array for better maintainability - Simplify toast handling by directly using `getToasts().addInfo` and `getToasts().addDanger` - Rename `handleOnSave` to `handleSave` for consistency * refactor(agents-list): extract agents data rendering logic into separate functions Improve code maintainability by breaking down complex rendering logic into smaller, reusable functions such as `renderAgentsAccordion`, `renderErrorCallout`, and `AgentGroupActionResult`. This reduces redundancy and enhances readability. * refactor(table-indexer): improve type safety and code readability - Replace ambiguous types with specific type imports from Elastic UI and Wazuh Core - Split `results` state into `items` and `total` for better clarity - Remove unused `TDocumentDetailsTab` interface - Update `setParams` to use explicit types for filters and query * refactor(agents): update reloadAgents and rename handleOnSave to handleSave Refactor the `reloadAgents` callback to invoke the `reloadAgents` function instead of an empty function. Rename `handleOnSave` to `handleSave` for consistency and clarity. Additionally, centralize error messages in `EditAgentNameModal` to improve maintainability. * refactor(agents-list): extract agents data and upgrade tasks logic into separate components Improve code maintainability by breaking down the large component into smaller, more focused components for handling agents data and upgrade tasks * refactor(agents): rename and restructure save handler for clarity The `handleOnSave` function was renamed to `handleSave` for consistency and clarity. Additionally, the logic for processing agents was extracted into a separate `processAgent` function to improve readability and maintainability. This change does not alter the behavior of the code. * refactor(date-range): move transformDateRange to utils module This commit relocates the `transformDateRange` function from the search-service to a dedicated utils module for better code organization and reusability. The function is now exported from the utils index and used in the search-bar component, reducing redundancy and improving maintainability. * refactor(agents): use IAgentResponse type for better type safety Replace the generic 'any' type with the specific 'IAgentResponse' type in the agent details component to improve type safety and maintainability * refactor(navigation): centralize navigation service in wazuh-core Move the NavigationService implementation to wazuh-core and update all references to use the service from wazuh-core. This change improves code maintainability by centralizing the navigation logic and reducing redundancy across the codebase. * ci: improve pre-commit hook logic and output Refactor the pre-commit hook to handle cases where no files are staged, improving clarity and reducing unnecessary checks. Also, update the output messages for better readability. * refactor(table-indexer): remove unused search-bar interface file The `interface.ts` file in the search-bar component was deleted as it was no longer used in the codebase. This change helps in maintaining a cleaner and more efficient project structure by removing unnecessary files. * refactor(edit-name-agent-modal): add isValid flag for name validation This change introduces an `isValid` flag to the validation state, improving clarity and consistency when checking if the agent name is valid. The flag is used in the Enter key handler to determine if the save action should proceed. * Refactors error message handling in agent name validation Renames error message object for clarity Updates references to new object name in validation logic * refactors agent name validation constants Extracts agent name length constraints into constants for reusability. Updates validation logic to use new constants. * simplifies validation state handling in EditAgentNameModal Removes redundant isInvalid state property to streamline validation logic. Updates related condition checks to use !isValid instead. * refactor(visualizations): rename and reorder visualization functions for clarity Rename `getVisTopAgentByNode` to `getVisStatus` for better readability and reorder the visualization functions in the `getKPIsPanel` method to match the updated naming convention. This improves code maintainability and consistency. * feat(agents-list): add 'View agent tasks' action to agents table * feat(agent-upgrade): add version selection for agent upgrade * feat(edit-groups-modal): disable save button when groups are unchanged * feat(agents): add and update tests for agent management components This commit introduces new test files and updates existing ones for various agent management components, including upgrade, edit groups, and edit name modals. The tests ensure proper functionality and error handling for agent operations. Additionally, minor adjustments were made to the components to improve testability and maintain consistency in the codebase. * Change basic table to data grid * update .gitignore to exclude Python environment files Adds patterns to ignore Python virtual environment files, cache directories, and related artifacts to reduce unnecessary clutter in version control. * add .gitignore for sample data folder Includes config.json in the ignore list to prevent sensitive or environment-specific data from being tracked in version control. * Fix row actions and export to csv * add data grid state persistence using localStorage Implements state management for data grid columns and page size using localStorage. Provides methods for retrieving, persisting, and clearing state with unique keys. Introduces a reusable hook for managing data grid state with validation and defaults. * add appId prop to TableIndexer component Introduces the appId prop to the TableIndexer component to enable passing application-specific identifiers. Updates related components to utilize the new prop, improving context-awareness and flexibility in rendering data grids. * centralize data grid constants Moves pagination-related constants to a dedicated file for reuse. Updates references across data grid components to use the centralized constants, improving maintainability and consistency. * add reusable data grid types Introduces reusable TypeScript types for data grid components, including column rendering, pagination options, and sorting columns to streamline development and ensure type consistency. * remove unused constant for max query entries Eliminates an unused constant that defined the maximum number of entries per query to clean up the codebase and improve maintainability. * add support for persistent data grid state management Introduces state persistence for data grid pagination settings, enabling retrieval and storage of page size per application. Enhances user experience by maintaining preferred pagination settings across sessions. * improve pagination state initialization Updates pagination state initialization to merge default and provided options, ensuring better configurability and alignment with expected behavior. * add persistent data grid column management Introduces a custom hook for managing data grid column visibility with persistence via local storage. Ensures column validation, uniqueness, and error handling. Refactors existing data grid logic to integrate the new column management, improving reusability and state handling. * Add selection in data grid * Fix multiple actions * update agent data access to use _source property * remove unused setIsFlyoutAgentVisible prop * feat(data-grid): add column visibility management and available fields selector Introduce functionality to manage column visibility through a new `DataGridVisibleColumnsSelector` component. This allows users to toggle the visibility of columns in the data grid. Additionally, the `useDataGridColumns` hook has been updated to support ordering and sorting of columns based on their visibility state. These changes enhance the user experience by providing more control over the data grid's display. * Enhance groups column render * refactor(table-indexer): simplify sorting logic and remove unused props Remove `tablePropsIgnored` prop and simplify sorting state management by directly using `columns` array. Also, clean up unused function and streamline the sorting change handler. * refactor(agents-list): improve row selection logic and cleanup state Refactor the row selection logic in the agents list to ensure proper state cleanup when reloading agents. Added `onClickSelectRow` to handle row selection changes more consistently. Extracted `onSelectAll` logic into a separate function for better readability and maintainability. * Fix test * add column width state management for data grid Introduces support for persisting and retrieving column width state in data grids using localStorage. Updates key state constants and data grid state type to include column width. Implements utility for managing column width state. Enhances usability by preserving user preferences for column widths. * define return type for useDataGridColumns hook Adds a specific return type to the useDataGridColumns hook to improve type safety and clarity. Ensures compliance with the defined interface by using the satisfies keyword. * update column handling in data grid hook Refactors default column handling to use structured column objects instead of strings. Updates state management and validation logic to align with the new column format, enhancing type safety and maintainability. * enhances data grid state validation Adds robust validation for column and column width states, ensuring proper structure and value constraints. Introduces minimum and maximum width limits to prevent invalid configurations. Improves state management by validating keys and values for consistency and correctness. * ensure column updates trigger on changes to allColumns Adds dependency on allColumns to update logic for persisted column state validation. Ensures persisted columns exist within defined columns in the index pattern. * improve state validation in data grid management Adds error handling for state validation to prevent crashes. Ensures a default state is returned when the retrieved state is invalid or missing. * add state clearing on validation failure Introduces logic to clear the data grid state when validation fails, ensuring consistent state management and preventing potential errors. * add column resize persistence in data grid Introduces logic to persist column widths across sessions by saving state. Enhances column retrieval to include persisted widths and updates grid props to support dynamic resizing functionality for better user experience. * optimize data grid column handling with memoization Introduces useMemo to optimize column definitions mapping and parsing, reducing redundant computations. Updates column retrieval logic to leverage the memoized map for improved performance and clarity. * improve column width validation Replaces unsafe integer check with finite number validation to ensure column width falls within acceptable bounds. * optimize data grid column retrieval with useMemo Improves performance by memoizing the retrieval of visible data grid columns using useMemo. Ensures dependencies are accurately tracked to prevent unnecessary recalculations, enhancing efficiency during state updates. * update column width state variable naming Renames variable from 'initialWidth' to 'savedColumnWidth' for clarity. Enhances readability and better reflects the purpose of the state being managed. * remove redundant column width assignment Eliminates the redundant initialWidth property assignment for columns, relying on state management to handle width persistence. * update allColumns initialization in data grid logic Replaces the use of index pattern fields with column definitions to initialize allColumns, ensuring alignment with defined columns and improving consistency in data grid behavior. * refactors column validation and state management Replaces `allColumns` with `columnSchemaDefinitionsMap` for improved clarity and efficiency. Updates related logic to use memoized map for column validation and state handling. Enhances readability and reduces potential circular dependencies. * refactor data grid state management structure Renames and reorganizes files related to data grid state persistence for improved clarity and maintainability. Updates naming conventions to align with a consistent "persistence manager" terminology. * feat(data-grid): add selected items controls and improve row selection logic - Introduce `SelectedItemsControls` component to display the number of selected rows - Enhance row selection logic in `WazuhDataGrid` to handle selection, deletion, and select-all actions more efficiently - Remove unnecessary `console.log` statements and commented code - Update `SelectionRowCell` to use `visibleRowIndex` and improve checkbox state management * fix(agents/list): disable select all functionality * add tests for localStorage-based column state manager Introduces unit tests for localStorageColumnsStatePersistenceManager to verify behavior for retrieving, persisting, and clearing state. Mocks localStorage to ensure test isolation and reliability. * refactor localStorage mock setup and add column width persistence tests Replaces inline localStorage mock implementation with a reusable mock setup utility for improved test maintainability. Adds comprehensive tests for localStorage-based column width state persistence, including retrieving, persisting, and clearing column width data. * add unit tests for localStorage page size persistence Introduces unit tests for the localStorage-based page size persistence manager. Covers functionality for retrieving, persisting, and clearing page size state, ensuring proper handling of valid, invalid, and missing data. * add utility types and tests for data grid state management Introduces utility types for mocking and deep partial mocking of objects. Adds unit tests for data grid state persistence manager, covering retrieval, validation, persistence, and clearing of states. Improves test coverage and ensures robustness of state management logic. * optimize column width state retrieval Introduces a local variable to store retrieved column width state, reducing redundant function calls and improving code readability. * add state management IDs and unit tests for data grid columns Introduces `stateManagementId` to improve state persistence management for data grid columns and column widths. Adds comprehensive unit tests for the `useDataGridColumns` hook to ensure proper functionality, including column visibility, ordering, resizing, and error handling. * update data grid state management IDs for consistency Replaces stateManagementId values with more consistent naming conventions, changing 'columns' to 'column' and 'columnsWidth' to 'column-width'. Adds a default case in the mocked implementation to handle unknown stateManagementId values. Improves code readability and ensures better alignment with naming standards. * add tests for column resize behavior in data grid Introduces unit tests to validate column resizing functionality, including handling of non-persisted widths, multiple resizes, and invalid column IDs. Ensures proper state persistence and edge case handling. * add stateManagementId to data grid state persistence tests Introduces stateManagementId parameter in unit tests for the useDataGridStatePersistenceManager hook to ensure proper handling of unique state management scenarios. Enhances test coverage and clarity by explicitly including stateManagementId in test cases. * add comprehensive tests for useDataGrid hook Enhances test coverage for the useDataGrid hook, including pagination, sorting, row handling, cell rendering, and control columns. Mocks dependencies and introduces helper functions for reusable test setups. Improves reliability and ensures correct behavior under various scenarios. * style: fix typos and improve text consistency in UI components - Correct "Threat intelligencey" to "Threat intelligence" - Change "Export Formated" to "Export Formatted" - Simplify group selection text in edit groups modal - Update "Delete agent" to "Delete agents" for clarity - Filter default columns in data grid to only include renderable fields * improve type safety in useDataGrid tests Enhances type definitions in test cases by explicitly specifying DataGridProps. Improves code clarity and ensures better type safety when using the renderHook utility. * Fix test * add TTY option to Docker service configuration Enables TTY allocation for the Docker service to improve interactive shell support and compatibility with bash commands. * add formatter configuration for Docker Compose files Configures Prettier as the default formatter for Docker Compose files in VS Code settings to ensure consistent formatting. * add coverage flag to Jest args and suppress log prefixes Includes '--collectCoverage=false' in Jest arguments to disable coverage collection by default. Adds '--no-log-prefix' to runner options to simplify log output formatting. * make coverage collection conditional on CI Updates the test configuration to enable coverage collection only when running in a CI environment. Prevents unnecessary coverage reporting during local development. * add localStorage mock for Jest tests Introduces a localStorage mock to facilitate testing components relying on localStorage API. Updates Jest configuration to include the mock setup file in test initialization for consistent test behavior. * consolidates data grid state management Refactors multiple localStorage-based state managers into a single, unified manager. Simplifies key generation by removing unnecessary parameters. Updates tests to align with the new structure and validation logic. Improves state validation for columns, widths, and page size. Enhances maintainability and reduces redundancy in state management. * refactors data grid column state management Unifies column and column-width state management into a single persistence manager for consistency and maintainability. Replaces `appId` with `moduleId` for improved clarity. Updates function names and test cases to align with the new state management approach. Simplifies and consolidates validation and retrieval logic. Enhances code readability and reduces duplication. * standardizes DataGridColumn type usage Replaces TDataGridColumn with DataGridColumn across components for consistency and clarity. Introduces DataGridRenderColumn type for enhanced type definition. Updates tests and imports accordingly to align with changes. * prevent redundant data fetches in table pagination Initializes pagination with `pageSize = 0` to avoid conflicts between local state and internal hooks, reducing multiple redundant fetches. Adds a conditional check to ensure data is only fetched once a valid `pageSize` is set. Replaces hardcoded page size options with a constant for consistency. * rename moduleId to appId in data grid components Replaces references to moduleId with appId for consistency across components. Updates hook logic, state management, and dependencies accordingly. Simplifies and removes redundant tests related to column rendering. * refactor data grid with enhanced state management Migrates data grid logic to TypeScript for improved type safety Introduces state persistence manager for column and pagination settings Sanitizes rendered cell values for enhanced security Simplifies and optimizes pagination and sorting logic Improves column schema handling with memoized methods * replace reload mechanism with reactive refresh Replaces the boolean-based reload logic with an RxJS Subject for triggering component refreshes. Improves code readability and reduces state management complexity by using observables. Enhances maintainability and aligns with reactive programming patterns. * simplify pagination state management Refactors initialization of pagination state to use a dedicated type. Removes unnecessary use of 'as const' in constants for improved readability. Ensures consistent handling of page size defaults in the data grid logic. * improve state persistence and validation handling Refactors state persistence logic to ensure invalid state resets are persisted. Updates tests to reflect changes in state retrieval behavior. Enhances reliability and consistency of state management. * rename columnsWidth to columnWidths for consistency Renames the "columnsWidth" property to "columnWidths" across codebase for improved clarity and consistency. Updates related type definitions, logic, and test cases to reflect the new naming convention. * improve data grid row parsing and indexing Ensures rows are always parsed into an array for consistency. Updates row index validation to use a safer boundary check. Improves reliability of data handling for pagination. * ensure immutability of column definitions Wraps column schema definitions in a shallow copy to prevent unintended mutations when processing visible columns in the data grid. * add index pattern existence checks to data grid Introduces `indexPatternExists` property to ensure operations depend on the presence of an index pattern. Updates validation logic, state persistence, and column handling to bypass processing when the index pattern is missing, improving stability and preventing unnecessary operations. * add indexPatternExists parameter to test cases Includes the indexPatternExists parameter in multiple test cases to ensure proper coverage and handling of scenarios where index patterns exist. * update test cases to use appId and add indexPatternExists Replaces moduleId with appId in test cases for consistency. Adds indexPatternExists parameter to improve test coverage and alignment with updated function requirements. * replace callback-based agent reloads with reactive approach Refactors agent reloading logic to use a reactive pattern with subscriptions. Replaces `reloadAgents` callbacks with direct calls to `refresh$.next()`. Adds a `useEffect` hook to manage subscription lifecycle and ensure cleanup. Improves code clarity and ensures consistent state updates. * Update fleet management agent summary image Replaces the agent summary diagram with a new version to reflect updated information or design changes for improved clarity. * Revert "make coverage collection conditional on CI" This reverts commit a2ee869. --------- Co-authored-by: Antonio David Gutiérrez <[email protected]> Co-authored-by: Antonio <[email protected]> Co-authored-by: Guido Modarelli <[email protected]> Co-authored-by: Guido Modarelli <[email protected]> Co-authored-by: Maximiliano Ibarra <[email protected]> Co-authored-by: Federico Rodriguez <[email protected]>
Description
Integrates the query manager created in wz-core with the wz-fleet plugin in the read actions in the agent index for the table and the agent detail view.
Issues Resolved
Evidence
Test
Add sample data from agents
Verify that the agent's table and detail view are working as expected
Filters, sorting, number of rows and queries should work as expected.
Check List