Skip to content
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 Modules > Integrity monitoring > Inventory #5444

Merged
merged 118 commits into from
Aug 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
118 commits
Select commit Hold shift + click to select a range
e9f5923
feat: add a search bar component
Desvelao Feb 16, 2023
eff5d2b
feat(search-bar): change the AQL implemenation to use the regular exp…
Desvelao Mar 1, 2023
0923569
fix(search-bar): fixes a problem hidding the suggestion popover when …
Desvelao Mar 2, 2023
83c05cf
feat(search-bar): add the ability to update the input of example
Desvelao Mar 3, 2023
0b0b451
feat(search-bar): add initial suggestions to AQL
Desvelao Mar 6, 2023
ab8a555
feat(search-bar): add target and rel attributes to the documentation
Desvelao Mar 7, 2023
8d9f746
feat(search-bar): enhancements in AQL and search bar documentation
Desvelao Mar 7, 2023
9c01c8e
feat(search-bar): Add HAQL
Desvelao Mar 7, 2023
b6f0d6d
feat(search-bar): add test to HAQL and AQL query languages
Desvelao Mar 14, 2023
22676d4
feat(search-bar): Rename HAQL query language to WQL
Desvelao Mar 15, 2023
459a932
feat(search-bar): Add more use cases to the tests of WQL query language
Desvelao Mar 15, 2023
315932a
feat(search-bar): enhance the documenation of query languages
Desvelao Mar 15, 2023
4303a1a
feat(search-bar): Add a popover title to replicate similar UI to the …
Desvelao Mar 15, 2023
5e1485c
feat(search-bar): wrap the user input with group operators when there…
Desvelao Mar 15, 2023
9983153
feat(search-bar): add implicit query mode to WQL
Desvelao Mar 16, 2023
1eaf944
feat(search-bar): set the width of the syntax options popover
Desvelao Mar 23, 2023
d9abea0
feat(search-bar): unify suggestion descriptions in WQL
Desvelao Mar 23, 2023
c221f97
feat(search-bar): add enhancements to WQL
Desvelao Apr 10, 2023
8123d6e
Merge branch '4.5' of https://github.com/wazuh/wazuh-kibana-app into …
Desvelao Apr 10, 2023
cdbbb6d
feat(search-bar): rename previousField and previousOperatorCompare in…
Desvelao Apr 10, 2023
c300fa3
fix(tests): update snapshot
Desvelao Apr 11, 2023
ef85c54
fix(search-bar): fix documentation link for WQL
Desvelao Apr 11, 2023
17053c0
fix(search-bar): remove example usage of SearchBar component in Agents
Desvelao Apr 11, 2023
cfbf19b
fix(search-bar): fix an error using the value suggestions in WQL
Desvelao Apr 12, 2023
b4359ce
Merge branch '4.5' into feat/4312-poc-search-bar-component-multiple-q…
Desvelao Apr 20, 2023
8438cd8
Merge branch '4.5' into feat/4312-poc-search-bar-component-multiple-q…
Desvelao Apr 20, 2023
57d11d6
feat(search-bar): add search function suggestion when the input is empty
Desvelao Apr 25, 2023
ce4bc92
fix(search-bar): ensure the query language output changed to trigger …
Desvelao Apr 25, 2023
b547d98
feat(search-bar): allow the API query output can be redone when the s…
Desvelao Apr 27, 2023
a3c3681
feat(search-bar): enhance the validation of value token in WQL
Desvelao Apr 27, 2023
1b390be
feat(search-bar): enhance search bar and WQL
Desvelao May 12, 2023
1e42463
feat(search-bar): replace search bar in TableWzAPI
Desvelao May 15, 2023
78b23e7
feat(vulnerabilities): change filter by severity tooltip
Desvelao May 15, 2023
2b7ddb9
fix(test): update test and snapthost
Desvelao May 15, 2023
dd4b0e8
feat(search-bar): replace search bar and table component on Modules/I…
Desvelao May 15, 2023
b5b0c05
fix(test): update snapshot
Desvelao May 15, 2023
ce4e30f
Merge branch 'feat/4312-search-bar-replace-tablewzapi' of https://git…
Desvelao May 15, 2023
47255d6
feat(table-wz-api): add field selection to the TableWzAPI component
Desvelao May 17, 2023
06893ad
feat(search-bar): enhace search bar and WQL
Desvelao May 17, 2023
4f163dc
Merge branch 'feat/4312-poc-search-bar-component-multiple-query-langu…
Desvelao May 17, 2023
3d7e0d1
feat(table-wz-api): Adapt TableWzAPI usage to the recent changes when
Desvelao May 17, 2023
7a7cb43
fix(test): fixed test and update snapshot
Desvelao May 17, 2023
1a198e8
fix(table-wz-api): minor fixes on TableWzAPI usage
Desvelao May 17, 2023
1a67951
fix: fixed prop type
Desvelao May 17, 2023
80c94f7
Merge branch 'feat/4312-search-bar-replace-tablewzapi' of https://git…
Desvelao May 17, 2023
e8c159e
fix(search-bar): fix TableWzAPI serach bar parameters
Desvelao May 18, 2023
6257a7f
fix: fix search term field on TableWzAPI for composed column
Desvelao May 18, 2023
32544d2
Merge branch 'feat/4312-search-bar-replace-tablewzapi' of https://git…
Desvelao May 18, 2023
f64749c
fix(table-wz-api): enhance TableWithSearchBar types and fix error HTM…
Desvelao May 19, 2023
d774a48
fix: enhance search bar and WQL types
Desvelao May 19, 2023
b18c570
Merge branch 'feat/4312-poc-search-bar-component-multiple-query-langu…
Desvelao May 19, 2023
026375a
Merge branch 'feat/4312-search-bar-replace-tablewzapi' of https://git…
Desvelao May 19, 2023
d099605
feat: add date field validation to the fied suggestion on Modules/Int…
Desvelao May 19, 2023
4a7e282
Merge branch '4.5' of https://github.com/wazuh/wazuh-kibana-app into …
Desvelao May 22, 2023
0c854b4
Merge branch 'feat/4312-poc-search-bar-component-multiple-query-langu…
Desvelao May 22, 2023
e629184
Merge branch 'feat/4312-search-bar-replace-tablewzapi' of https://git…
Desvelao May 22, 2023
144f9a6
Merge branch '4.6.0' of https://github.com/wazuh/wazuh-kibana-app int…
Desvelao Jun 26, 2023
c800050
Merge branch 'feat/4312-poc-search-bar-component-multiple-query-langu…
Desvelao Jun 26, 2023
ae5bade
Merge branch '4.6.0' of https://github.com/wazuh/wazuh-kibana-app int…
Desvelao Jun 26, 2023
7786590
Merge branch 'feat/4312-poc-search-bar-component-multiple-query-langu…
Desvelao Jun 26, 2023
2503edd
Merge branch '4.6.0' of https://github.com/wazuh/wazuh-kibana-app int…
Desvelao Jul 25, 2023
c385b73
Merge branch '4.6.0' of https://github.com/wazuh/wazuh-kibana-app int…
Desvelao Jul 25, 2023
b31e5f5
fix: test snapshot
Desvelao Jul 25, 2023
0cf2d18
fix: remove duplicated search bar
Desvelao Jul 25, 2023
4bad6eb
Merge branch '4.6.0' of https://github.com/wazuh/wazuh-kibana-app int…
Desvelao Jul 25, 2023
19dd684
update: test snapshot
Desvelao Jul 25, 2023
6040c93
move: moved search bar files
Desvelao Jul 25, 2023
4c6c38d
feat: add the distinct values for the search bar suggestions in some
Desvelao Jul 31, 2023
0cfe1d5
fix: remove exact validation for the token value due to performance p…
Desvelao Aug 1, 2023
13d2be4
Merge branch 'feat/4312-poc-search-bar-component-multiple-query-langu…
Desvelao Aug 1, 2023
3502d0b
fix: fix token value validation
Desvelao Aug 1, 2023
76a4feb
Merge branch 'feat/4312-poc-search-bar-component-multiple-query-langu…
Desvelao Aug 1, 2023
2ba536b
Merge branch 'feat/4312-search-bar-replace-tablewzapi' of https://git…
Desvelao Aug 1, 2023
326edf5
fix: add suggestions for table in Modules > Integrity monitoring > In…
Desvelao Aug 1, 2023
0696698
fix: fix Management > Rules search bar filters
Desvelao Aug 2, 2023
f11f97b
Merge branch 'feat/4312-search-bar-replace-tablewzapi' of https://git…
Desvelao Aug 2, 2023
bc26f9a
fix: update the link to the documentation of WQL
Desvelao Aug 2, 2023
cd89aa5
fix(search-bar): use value of value token as the value used to get th…
Desvelao Aug 2, 2023
64a057b
Merge branch 'feat/4312-poc-search-bar-component-multiple-query-langu…
Desvelao Aug 2, 2023
d961094
fix(search-bar): fix a problem extracting value for value tokens wrap…
Desvelao Aug 3, 2023
6e24bc3
Merge branch 'feat/4312-poc-search-bar-component-multiple-query-langu…
Desvelao Aug 3, 2023
140a2da
Merge branch 'feat/4312-poc-search-bar-component-multiple-query-langu…
Desvelao Aug 3, 2023
3831bee
fix(search-bar): update test snapshot
Desvelao Aug 3, 2023
8c3fb79
Merge branch 'feat/4312-search-bar-replace-tablewzapi' of https://git…
Desvelao Aug 3, 2023
449eeee
fix(table-wz-api): avoid the double toast message when there is an er…
Desvelao Aug 4, 2023
579d30f
fix(search-bar): add validation for value token in WQL
Desvelao Aug 4, 2023
2df66f6
Merge branch 'feat/4312-poc-search-bar-component-multiple-query-langu…
Desvelao Aug 4, 2023
6c02162
Merge branch 'feat/4312-search-bar-replace-tablewzapi' of https://git…
Desvelao Aug 4, 2023
f8b0044
fix(search-bar): value token in message related to this is invalid
Desvelao Aug 7, 2023
8660ddd
Merge branch 'feat/4312-poc-search-bar-component-multiple-query-langu…
Desvelao Aug 7, 2023
fbe18ed
Merge branch 'feat/4312-poc-search-bar-component-multiple-query-langu…
Desvelao Aug 7, 2023
885ad45
fix(search-bar): fix error related to details.program_name suggestion…
Desvelao Aug 8, 2023
eee2bb6
feat(search-bar): add constant to define the count of distinct values…
Desvelao Aug 8, 2023
a0aed9a
Merge branch 'feat/4312-search-bar-replace-tablewzapi' of https://git…
Desvelao Aug 8, 2023
1e2aea2
feat(search-bar): use constant to define the count of distinct values…
Desvelao Aug 8, 2023
dc9e55b
fix(search-bar): fix value suggestions in the Decoders section
Desvelao Aug 8, 2023
0b451ed
fix: add comment to constant
Desvelao Aug 8, 2023
736d958
workaround(search-bar): add a filter to the value suggestions in WQL
Desvelao Aug 8, 2023
75dd8c5
Merge branch 'feat/4312-search-bar-replace-tablewzapi' of https://git…
Desvelao Aug 8, 2023
2f241b3
Merge branch '4.6.0' of https://github.com/wazuh/wazuh-kibana-app int…
Desvelao Aug 9, 2023
3e1b919
changelog: add entry
Desvelao Aug 9, 2023
d15889a
changelog: add entry
Desvelao Aug 9, 2023
0d6707c
Merge branch '4.6.0' of https://github.com/wazuh/wazuh-kibana-app int…
Desvelao Aug 9, 2023
5e142d8
Merge branch 'feat/4312-search-bar-replace-tablewzapi' of https://git…
Desvelao Aug 9, 2023
fa17839
changelog: add entry
Desvelao Aug 9, 2023
9e121ad
fix(wql): add whitespace before closing grouping operator ) when usin…
Desvelao Aug 9, 2023
8ed6ae4
feat(search-bar): add a debounce time to update the search bar state
Desvelao Aug 10, 2023
a2abff5
fix(search-bar): fix prop type error related to EuiSuggestItem
Desvelao Aug 9, 2023
bce18cc
Merge branch 'feat/4312-search-bar-replace-tablewzapi' of https://git…
Desvelao Aug 10, 2023
d8c4ab5
fix(search-bar): implicit filter in Modules > Integrity monitoring > …
Desvelao Aug 10, 2023
99aa426
fix(search-bar-wql): problem related to execute the search before the…
Desvelao Aug 10, 2023
4a02904
Merge branch 'feat/4312-search-bar-replace-tablewzapi' of https://git…
Desvelao Aug 10, 2023
4ff2653
fix(search-bar-wql): remove unnued parameter in function
Desvelao Aug 10, 2023
6e642cd
Merge branch 'feat/4312-search-bar-replace-tablewzapi' of https://git…
Desvelao Aug 10, 2023
a320b78
fix(search-bar): fix tests
Desvelao Aug 10, 2023
df8a8d3
fix(search-bar): suggestions in Modules > Vulenerabilities > Inventory
Desvelao Aug 10, 2023
6eb2054
Merge branch 'feat/4312-search-bar-replace-tablewzapi' of https://git…
Desvelao Aug 10, 2023
8591e1e
Merge branch '4.6.0' of https://github.com/wazuh/wazuh-kibana-app int…
Desvelao Aug 11, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ All notable changes to the Wazuh app project will be documented in this file.
- Changed the query to search for an agent in `management/configuration`. [#5485](https://github.com/wazuh/wazuh-kibana-app/pull/5485)
- Changed the search bar in management/log to the one used in the rest of the app. [#5476](https://github.com/wazuh/wazuh-kibana-app/pull/5476)
- Changed the design of the wizard to add agents. [#5457](https://github.com/wazuh/wazuh-kibana-app/pull/5457)
- Changed the search bar in Management (Rules, Decoders, CDB List) and Modules (Vulnerabilities > Inventory, Security Configuration Assessment > Inventory > {Policy ID} > Checks, MITRE ATT&CK > Intelligence > {Resource}), Agent Inventory data [#5363](https://github.com/wazuh/wazuh-kibana-app/pull/5363) [#5442](https://github.com/wazuh/wazuh-kibana-app/pull/5442) [#5443](https://github.com/wazuh/wazuh-kibana-app/pull/5443)
- Changed the search bar in Management (Rules, Decoders, CDB List) and Modules (Vulnerabilities > Inventory, Security Configuration Assessment > Inventory > {Policy ID} > Checks, MITRE ATT&CK > Intelligence > {Resource}, Integrity monitoring > Inventory > Files, Integrity monitoring > Inventory > Registry), Agent Inventory data [#5363](https://github.com/wazuh/wazuh-kibana-app/pull/5363) [#5442](https://github.com/wazuh/wazuh-kibana-app/pull/5442) [#5443](https://github.com/wazuh/wazuh-kibana-app/pull/5443) [#5444](https://github.com/wazuh/wazuh-kibana-app/pull/5444)

### Fixed

Expand Down
97 changes: 18 additions & 79 deletions plugins/main/public/components/agents/fim/inventory.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

import React, { Component } from 'react';
import {
EuiButtonEmpty,
EuiEmptyPrompt,
EuiFlexGroup,
EuiFlexItem,
Expand All @@ -26,9 +25,8 @@ import {
EuiTabs,
EuiTitle,
} from '@elastic/eui';
import { FilterBar, InventoryTable, RegistryTable } from './inventory/';
import { InventoryTable, RegistryTable } from './inventory/';
import { WzRequest } from '../../../react-services/wz-request';
import exportCsv from '../../../react-services/wz-csv';
import { getToasts } from '../../../kibana-services';
import { ICustomBadges } from '../../wz-search-bar/components';
import { filtersToObject } from '../../wz-search-bar';
Expand Down Expand Up @@ -194,45 +192,20 @@ export class Inventory extends Component {
const { isLoading } = this.state;
if (tabs.length > 1) {
return (
<div>
<EuiTabs>
{tabs.map((tab, index) => (
<EuiTab
onClick={() => this.onSelectedTabChanged(tab.id)}
isSelected={tab.id === this.state.selectedTabId}
disabled={tab.disabled}
key={index}>
{tab.name}&nbsp;{isLoading === true && <EuiLoadingSpinner size="s" />}
</EuiTab>
))}
</EuiTabs>
<EuiSpacer size="s" />
<EuiFlexGroup>
<EuiFlexItem />
<EuiFlexItem grow={false}>
<EuiButtonEmpty iconType="importAction" onClick={() => this.downloadCsv()}>
Export formatted
</EuiButtonEmpty>
</EuiFlexItem>
</EuiFlexGroup>
</div>
)
} else {
return (
<EuiFlexGroup>
<EuiFlexItem>
<EuiTitle size="s">
<h1> {tabs[0].name}&nbsp;{isLoading === true && <EuiLoadingSpinner size="s" />}</h1>
</EuiTitle>
</EuiFlexItem>
<EuiFlexItem grow={false}>
<EuiButtonEmpty iconType="importAction" onClick={() => this.downloadCsv()}>
Export formatted
</EuiButtonEmpty>
</EuiFlexItem>
</EuiFlexGroup>
)
}
<EuiTabs>
{tabs.map((tab, index) => (
<EuiTab
onClick={() => this.onSelectedTabChanged(tab.id)}
isSelected={tab.id === this.state.selectedTabId}
disabled={tab.disabled}
key={index}>
{tab.name}&nbsp;{isLoading === true && <EuiLoadingSpinner size="s" />}
</EuiTab>
))}
</EuiTabs>
);
};
return null;
}

showToast = (color, title, time) => {
Expand All @@ -243,44 +216,10 @@ export class Inventory extends Component {
});
};

async downloadCsv() {
const { filters } = this.state;
try {
const filtersObject = filtersToObject(filters);
const formatedFilters = Object.keys(filtersObject).map(key => ({name: key, value: filtersObject[key]}));
this.showToast('success', 'Your download should begin automatically...', 3000);
await exportCsv(
'/syscheck/' + this.props.agent.id,
[
{ name: 'type', value: this.state.selectedTabId === 'files' ? 'file' : this.state.selectedTabId },
...formatedFilters
],
`fim-${this.state.selectedTabId}`
);
} catch (error) {
const options: UIErrorLog = {
context: `${Inventory.name}.downloadCsv`,
level: UI_LOGGER_LEVELS.ERROR as UILogLevel,
severity: UI_ERROR_SEVERITIES.BUSINESS as UIErrorSeverity,
error: {
error: error,
message: error.message || error,
title: error.name,
},
};
getErrorOrchestrator().handleError(options);
}
}

renderTable() {
const { filters, syscheck, selectedTabId, customBadges, totalItemsRegistry, totalItemsFile } = this.state;
return (
<div>
<FilterBar
filters={filters}
onFiltersChange={this.onFiltersChange}
selectView={selectedTabId}
agent={this.props.agent} />
<>
{selectedTabId === 'files' &&
<InventoryTable
{...this.props}
Expand All @@ -297,8 +236,8 @@ export class Inventory extends Component {
totalItems={totalItemsRegistry}
onFiltersChange={this.onFiltersChange} />
}
</div>
)
</>
);
}

noConfiguredMonitoring() {
Expand Down
171 changes: 0 additions & 171 deletions plugins/main/public/components/agents/fim/inventory/filterBar.tsx

This file was deleted.

2 changes: 0 additions & 2 deletions plugins/main/public/components/agents/fim/inventory/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
export { FilterBar } from './filterBar';

export { InventoryTable } from './table';
export { RegistryTable } from './registry-table'
Loading