-
Notifications
You must be signed in to change notification settings - Fork 186
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
Replace search bar on Agent > Inventory data #5443
Merged
Desvelao
merged 118 commits into
4.6.0
from
feat/4312-replace-search-bar-agent-inventory
Aug 11, 2023
Merged
Replace search bar on Agent > Inventory data #5443
Desvelao
merged 118 commits into
4.6.0
from
feat/4312-replace-search-bar-agent-inventory
Aug 11, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Features: - Supports multiple query languages - Decouple the business logic of query languages of the search bar component - Ability of query language to interact with the search bar Query language implementations - AQL: custom implementation of the Wazuh Query Language. Include suggestions. - UIQL: simple implementation (as another example)
…ression used in the Wazuh manager API - Change the implementation of AQL query language to use the regular expression decomposition defined in the Wazuh manager API - Adapt the tests for the tokenizer and getting the suggestions - Enchance documentation of search bar - Add documentation of AQL query language - Add more fields and values for the use example in Agents section - Add description to the query language select input
…using the Search suggestion in AQL - Fixes a problem hidding the suggestion popover when using the Search suggestion in AQL - Fixes a problem of input text with undefined value - Minor fixes - Remove `syntax` property of SearchBar component - Add disableFocusTrap property to the custom EuiSuggestInput component to be forwarded to the EuiInputPopover - Replace the inputRef by a reference instead of a state and pass as a parameter in the query language run function - Move the rebuiding of input text when using some suggestion that changes the input to be done when a related suggestion was clicked instead of any suggestion (exclude Search).
implemenation - Add the ability to update the input of the search bar in the example implementation - Enhance the component documentation
- (AQL) Add the fields and an open operator group when there is no input text
link of query language displayed in the popover
- AQL enhancements: - documentation: - Enhance some descriptions - Enhance input processing - Remove intermetiate interface of EuiSuggestItem - Remove the intermediate interface of EuiSuggestItem. Now it is managed in the internal of query language instead of be built by the suggestion handler - Display suggestions when the input text is empty - Add the unifiedQuery field to the query language output - Adapt tests - Search Bar component: - Enhance documentation
- Remove UIQL - Add HAQL query language that is a high-level implementation of AQL - Add the query language interface - Add tests for tokenizer, get suggestions and transformSpecificQLToUnifiedQL method - Add documentation about the language - Syntax - Options - Workflow
- Add tests to HAQL and AQL query languages - Fix suggestions for HAQL when typing as first element a value entity. Now there are no suggestions because the field and operator_compare are missing. - Enhance documentation of HAQL and AQL - Removed unnecesary returns of suggestion handler in the example implementation of search bar on Agents section
- Rename query language HAQL to WQL - Update tests - Remove AQL usage from the implementation in the agents section
- Add more use cases to the test of WQL query language - Replace some literals by constants in the WQL query language implementation
…platform search bar
… is an implicit query
- WQL - add implicit query mode to WQL - enhance query language documentation - renamed transformUnifiedQuery to transformUQLToQL - now wraps the user input if this is defined and there a implicit query string - fix a problem with the value suggestions if there is a previous conjunction - add tests cases - update tests - AQL - enhance query language documentation - renamed transformUnifiedQuery to transformUQLToQL - add warning about the query language implementation is not updated to the last changes in the search bar component - update tests - Search Bar - renamed transformUnifiedQuery to transformUQLToQL
- Set a width for the syntax options popover - Unify the description in the suggestions of WQL example implementation - Update tests - Fix minor bugs in the WQL example implementation in Agents
- WQL - Enhance documentation - Add partial and "expanded" input validation - Add tests
…feat/4312-poc-search-bar-component-multiple-query-language-api-query-language-implementation
Fix an error when the last token in the input was a value and used a value suggestion whose label contains whitespaces, the value was not wrapped with quotes.
…uery-language-api-query-language-implementation
…uery-language-api-query-language-implementation
…the onChange handler
…earch term fields changed - Search bar: - Add a dependency to run the query language output - Adapt search bar documentation to the changes - WQL - Create a new parameter called `options` - Moved the `implicitFilter` and `searchTerm` settings to `options` - Update tests - Update documentation
…g the suggestions
asteriscos
previously approved these changes
Aug 9, 2023
chantal-kelm
previously approved these changes
Aug 9, 2023
…hub.com/wazuh/wazuh-kibana-app into feat/4312-replace-search-bar-agent-inventory
…hub.com/wazuh/wazuh-kibana-app into feat/4312-replace-search-bar-agent-inventory
… input is analyzed due to this process is debounced
…hub.com/wazuh/wazuh-kibana-app into feat/4312-replace-search-bar-agent-inventory
…hub.com/wazuh/wazuh-kibana-app into feat/4312-replace-search-bar-agent-inventory
…hub.com/wazuh/wazuh-kibana-app into feat/4312-replace-search-bar-agent-inventory
asteriscos
previously approved these changes
Aug 10, 2023
chantal-kelm
previously approved these changes
Aug 10, 2023
…o feat/4312-replace-search-bar-agent-inventory
chantal-kelm
approved these changes
Aug 11, 2023
asteriscos
approved these changes
Aug 11, 2023
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This pull request replaces the search bar and table components with the TableWzAPI on Agent/Inventory data.
Affected section:
Due to the usage of TableWzAPI, the tables are enhanced with some buttons to export the data to CSV, refresh the data or search.
Issues Resolved
#4312
Evidence
Table - Agents > {agent_id} > Inventory data > Network interfaces
Suggestions:
Table - Agents > {agent_id} > Inventory data > Network ports
Suggestions:
Table - Agents > {agent_id} > Inventory data > Network settings
Suggestions:
Table - Agents > {agent_id} > Inventory data > Windows updates
Suggestions:
Table - Agents > {agent_id} > Inventory data > Packages
Suggestions:
Table - Agents > {agent_id} > Inventory data > Processes
Suggestions:
Test
Legend:
⚫: none
🟢: pass
🟡: warning
🔴: fail
⚪: not applicable
UI
Details
⚫ Agents > {Agent ID} > Inventory data > Network interfaces: For each suggested field, check the value suggestion display results or at least doesn't break
Chrome - ⚫
Firefox - ⚫
Safari - ⚫
⚫ Agents > {Agent ID} > Inventory data > Network interfaces: Using a value suggested should allow to run the search
Chrome - ⚫
Firefox - ⚫
Safari - ⚫
⚫ Agents > {Agent ID} > Inventory data > Network interfaces: Type a term and run the search should search in each displayed field
Chrome - ⚫
Firefox - ⚫
Safari - ⚫
⚫ Agents > {Agent ID} > Inventory data > Network interfaces: Type a simple field search and this should returns the expected results
Chrome - ⚫
Firefox - ⚫
Safari - ⚫
⚫ Agents > {Agent ID} > Inventory data > Network interfaces: Type a complex field search and this should returns the expected results
Chrome - ⚫
Firefox - ⚫
Safari - ⚫
⚫ Agents > {Agent ID} > Inventory data > Network interfaces: Clicking on the Refresh button should refresh the data
Chrome - ⚫
Firefox - ⚫
Safari - ⚫
⚫ Agents > {Agent ID} > Inventory data > Network interfaces: Clicking on the Export formatted button should refresh export the data to CSV
Chrome - ⚫
Firefox - ⚫
Safari - ⚫
⚫ Agents > {Agent ID} > Inventory data > Network ports : For each suggested field, check the value suggestion display results or at least doesn't break
Chrome - ⚫
Firefox - ⚫
Safari - ⚫
⚫ Agents > {Agent ID} > Inventory data > Network ports: Using a value suggested should allow to run the search
Chrome - ⚫
Firefox - ⚫
Safari - ⚫
⚫ Agents > {Agent ID} > Inventory data > Network ports: Type a term and run the search should search in each displayed field
Chrome - ⚫
Firefox - ⚫
Safari - ⚫
⚫ Agents > {Agent ID} > Inventory data > Network ports: Type a simple field search and this should returns the expected results
Chrome - ⚫
Firefox - ⚫
Safari - ⚫
⚫ Agents > {Agent ID} > Inventory data > Network ports: Type a complex field search and this should returns the expected results
Chrome - ⚫
Firefox - ⚫
Safari - ⚫
⚫ Agents > {Agent ID} > Inventory data > Network ports: Clicking on the Refresh button should refresh the data
Chrome - ⚫
Firefox - ⚫
Safari - ⚫
⚫ Agents > {Agent ID} > Inventory data > Network ports: Clicking on the Export formatted button should refresh export the data to CSV
Chrome - ⚫
Firefox - ⚫
Safari - ⚫
⚫ Agents > {Agent ID} > Inventory data > Network settings : For each suggested field, check the value suggestion display results or at least doesn't break
Chrome - ⚫
Firefox - ⚫
Safari - ⚫
⚫ Agents > {Agent ID} > Inventory data > Network settings: Using a value suggested should allow to run the search
Chrome - ⚫
Firefox - ⚫
Safari - ⚫
⚫ Agents > {Agent ID} > Inventory data > Network settings: Type a term and run the search should search in each displayed field
Chrome - ⚫
Firefox - ⚫
Safari - ⚫
⚫ Agents > {Agent ID} > Inventory data > Network settings: Type a simple field search and this should returns the expected results
Chrome - ⚫
Firefox - ⚫
Safari - ⚫
⚫ Agents > {Agent ID} > Inventory data > Network settings: Type a complex field search and this should returns the expected results
Chrome - ⚫
Firefox - ⚫
Safari - ⚫
⚫ Agents > {Agent ID} > Inventory data > Network settings: Clicking on the Refresh button should refresh the data
Chrome - ⚫
Firefox - ⚫
Safari - ⚫
⚫ Agents > {Agent ID} > Inventory data > Network settings: Clicking on the Export formatted button should refresh export the data to CSV
Chrome - ⚫
Firefox - ⚫
Safari - ⚫
⚫ Agents > {Agent ID} > Inventory data > Packages : For each suggested field, check the value suggestion display results or at least doesn't break
Chrome - ⚫
Firefox - ⚫
Safari - ⚫
⚫ Agents > {Agent ID} > Inventory data > Packages: Using a value suggested should allow to run the search
Chrome - ⚫
Firefox - ⚫
Safari - ⚫
⚫ Agents > {Agent ID} > Inventory data > Packages: Type a term and run the search should search in each displayed field
Chrome - ⚫
Firefox - ⚫
Safari - ⚫
⚫ Agents > {Agent ID} > Inventory data > Packages: Type a simple field search and this should returns the expected results
Chrome - ⚫
Firefox - ⚫
Safari - ⚫
⚫ Agents > {Agent ID} > Inventory data > Packages: Type a complex field search and this should returns the expected results
Chrome - ⚫
Firefox - ⚫
Safari - ⚫
⚫ Agents > {Agent ID} > Inventory data > Packages: Clicking on the Refresh button should refresh the data
Chrome - ⚫
Firefox - ⚫
Safari - ⚫
⚫ Agents > {Agent ID} > Inventory data > Packages: Clicking on the Export formatted button should refresh export the data to CSV
Chrome - ⚫
Firefox - ⚫
Safari - ⚫
⚫ Agents > {Agent ID} > Inventory data > Processes : For each suggested field, check the value suggestion display results or at least doesn't break
Chrome - ⚫
Firefox - ⚫
Safari - ⚫
⚫ Agents > {Agent ID} > Inventory data > Processes: Using a value suggested should allow to run the search
Chrome - ⚫
Firefox - ⚫
Safari - ⚫
⚫ Agents > {Agent ID} > Inventory data > Processes: Type a term and run the search should search in each displayed field
Chrome - ⚫
Firefox - ⚫
Safari - ⚫
⚫ Agents > {Agent ID} > Inventory data > Processes: Type a simple field search and this should returns the expected results
Chrome - ⚫
Firefox - ⚫
Safari - ⚫
⚫ Agents > {Agent ID} > Inventory data > Processes: Type a complex field search and this should returns the expected results
Chrome - ⚫
Firefox - ⚫
Safari - ⚫
⚫ Agents > {Agent ID} > Inventory data > Processes: Clicking on the Refresh button should refresh the data
Chrome - ⚫
Firefox - ⚫
Safari - ⚫
⚫ Agents > {Agent ID} > Inventory data > Processes: Clicking on the Export formatted button should refresh export the data to CSV
Chrome - ⚫
Firefox - ⚫
Safari - ⚫
⚫ Agents > {Agent ID} > Inventory data > Windows updates : For each suggested field, check the value suggestion display results or at least doesn't break
Chrome - ⚫
Firefox - ⚫
Safari - ⚫
⚫ Agents > {Agent ID} > Inventory data > Windows updates: Using a value suggested should allow to run the search
Chrome - ⚫
Firefox - ⚫
Safari - ⚫
⚫ Agents > {Agent ID} > Inventory data > Windows updates: Type a term and run the search should search in each displayed field
Chrome - ⚫
Firefox - ⚫
Safari - ⚫
⚫ Agents > {Agent ID} > Inventory data > Windows updates: Type a simple field search and this should returns the expected results
Chrome - ⚫
Firefox - ⚫
Safari - ⚫
⚫ Agents > {Agent ID} > Inventory data > Windows updates: Type a complex field search and this should returns the expected results
Chrome - ⚫
Firefox - ⚫
Safari - ⚫
⚫ Agents > {Agent ID} > Inventory data > Windows updates: Clicking on the Refresh button should refresh the data
Chrome - ⚫
Firefox - ⚫
Safari - ⚫
⚫ Agents > {Agent ID} > Inventory data > Windows updates: Clicking on the Export formatted button should refresh export the data to CSV
Chrome - ⚫
Firefox - ⚫
Safari - ⚫
Check List
yarn test:jest